403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.7/site-packages/pip/_internal/index/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.7/site-packages/pip/_internal/index/__pycache__/sources.cpython-37.pyc
B

�N�a��	@s0ddlZddlZddlZddlZddlmZmZmZmZddl	m
Z
ddlmZddl
mZmZddlmZe�e�Zee
ZeeZeegee
fZeegefZGdd�d�Zeed	�d
d�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�Z eeeeeeeeeefd�dd�Z!dS)�N)�Callable�Iterable�Optional�Tuple)�InstallationCandidate)�Link)�path_to_url�url_to_path)�is_urlc@s>eZdZeeed�dd��Zed�dd�Ze	d�dd�Z
dS)	�
LinkSource)�returncCs
t��dS)z,Returns the underlying link, if there's one.N)�NotImplementedError)�self�r�?/usr/lib/python3.7/site-packages/pip/_internal/index/sources.py�linkszLinkSource.linkcCs
t��dS)z9Candidates found by parsing an archive listing HTML file.N)r
)rrrr�page_candidatesszLinkSource.page_candidatescCs
t��dS)z,Links found by specifying archives directly.N)r
)rrrr�
file_linksszLinkSource.file_linksN)�__name__�
__module__�__qualname__�propertyrrr�FoundCandidatesr�
FoundLinksrrrrrrsr)�file_urlrcCstj|dd�ddkS)NF)�strictrz	text/html)�	mimetypesZ
guess_type)rrrr�
_is_html_file#src@sTeZdZdZeedd�dd�Zeee	d�dd��Z
ed�d	d
�Ze
d�dd�ZdS)
�_FlatDirectorySourcez�Link source specified by ``--find-links=<path-to-dir>``.

    This looks the content of the directory, and returns:

    * ``page_candidates``: Links listed on each HTML file in the directory.
    * ``file_candidates``: Archives in the directory.
    N)�candidates_from_page�pathrcCs||_t�tj�|��|_dS)N)�_candidates_from_page�pathlibZPath�osr �realpath�_path)rrr rrr�__init__0sz_FlatDirectorySource.__init__)rcCsdS)Nr)rrrrr8sz_FlatDirectorySource.linkccsBx<|j��D].}tt|��}t|�s&q|�t|��EdHqWdS)N)r%�iterdirr�strrr!r)rr �urlrrrr<s
z$_FlatDirectorySource.page_candidatesccs8x2|j��D]$}tt|��}t|�r&qt|�VqWdS)N)r%r'rr(rr)rr r)rrrrCs
z_FlatDirectorySource.file_links)rrr�__doc__�CandidatesFromPager(r&rrrrrrrrrrrrr'src@sTeZdZdZeedd�dd�Zeeed�dd��Z	e
d�d	d
�Zed�dd�Z
dS)
�_LocalFileSourceaC``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.

    If a URL is supplied, it must be a ``file:`` URL. If a path is supplied to
    the option, it is converted to a URL first. This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    N)rrrcCs||_||_dS)N)r!�_link)rrrrrrr&Usz_LocalFileSource.__init__)rcCs|jS)N)r-)rrrrr]sz_LocalFileSource.linkccs&t|jj�sdS|�|j�EdHdS)N)rr-r)r!)rrrrrasz _LocalFileSource.page_candidatesccst|jj�rdS|jVdS)N)rr-r))rrrrrfsz_LocalFileSource.file_links)rrrr*r+rr&rrrrrrrrrrrr,Ksr,c@sVeZdZdZeeedd�dd�Zee	ed�dd��Z
ed�d	d
�Ze
d�dd�ZdS)
�_RemoteFileSourcez�``--find-links=<url>`` or ``--[extra-]index-url=<url>``.

    This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    N)r�page_validatorrrcCs||_||_||_dS)N)r!�_page_validatorr-)rrr/rrrrr&usz_RemoteFileSource.__init__)rcCs|jS)N)r-)rrrrrsz_RemoteFileSource.linkccs&|�|j�sdS|�|j�EdHdS)N)r0r-r!)rrrrr�sz!_RemoteFileSource.page_candidatesccs|jVdS)N)r-)rrrrr�sz_RemoteFileSource.file_links)rrrr*r+�
PageValidatorrr&rrrrrrrrrrrr.lsr.c@sTeZdZdZeedd�dd�Zeeed�dd��Z	e
d�d	d
�Zed�dd�Z
dS)
�_IndexDirectorySourcez�``--[extra-]index-url=<path-to-directory>``.

    This is treated like a remote URL; ``candidates_from_page`` contains logic
    for this by appending ``index.html`` to the link.
    N)rrrcCs||_||_dS)N)r!r-)rrrrrrr&�sz_IndexDirectorySource.__init__)rcCs|jS)N)r-)rrrrr�sz_IndexDirectorySource.linkccs|�|j�EdHdS)N)r!r-)rrrrr�sz%_IndexDirectorySource.page_candidatescCsdS)Nrr)rrrrr�sz _IndexDirectorySource.file_links)rrrr*r+rr&rrrrrrrrrrrr2�sr2)�locationrr/�
expand_dir�cache_link_parsingrc	Cs�d}d}tj�|�r"t|�}|}n$|�d�r:|}t|�}nt|�rF|}|dkrbd}t�||�dS|dkr�t	||t
||d�d�}||fStj�|�r�|r�t||d�}nt
|t
||d�d�}||fStj�|�r�t|t
||d�d�}||fSt�d|�|dfS)	Nzfile:zVLocation '%s' is ignored: it is either a non-existing path or lacks a specific scheme.)NN)r5)rr/r)rr )rrz?Location '%s' is ignored: it is neither a file nor a directory.)r#r �existsr�
startswithr	r
�loggerZwarningr.r�isdirrr2�isfiler,)	r3rr/r4r5r r)�msg�sourcerrr�build_source�sL	


r=)"Zloggingrr#r"�typingrrrrZpip._internal.models.candidaterZpip._internal.models.linkrZpip._internal.utils.urlsrr	Zpip._internal.vcsr
Z	getLoggerrr8rrr+�boolr1rr(rrr,r.r2r=rrrr�<module>s2
$! 

Youez - 2016 - github.com/yon3zu
LinuXploit