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.9/site-packages/pip/_internal/index/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/pip/_internal/index/__pycache__/sources.cpython-39.pyc
a

W��e�!�
@slddlZddlZddlZddlmZddlmZmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZddlmZddlmZddlmZmZddlmZe�e�ZeeZeeZ eegeefZ!eege"fZ#Gd	d
�d
�Z$e%e"d�dd
�Z&Gdd�d�Z'Gdd�de$�Z(Gdd�de$�Z)Gdd�de$�Z*Gdd�de$�Z+e%e!e#e"e"e%ee
e%e
e$fd�dd�Z,dS)�N)�defaultdict)�Callable�Dict�Iterable�List�Optional�Tuple)�InvalidSdistFilename�InvalidVersion�InvalidWheelFilename�canonicalize_name�parse_sdist_filename�parse_wheel_filename)�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.9/site-packages/pip/_internal/index/sources.py�linkszLinkSource.linkcCs
t��dS)z9Candidates found by parsing an archive listing HTML file.Nrrrrr�page_candidates#szLinkSource.page_candidatescCs
t��dS)z,Links found by specifying archives directly.Nrrrrr�
file_links'szLinkSource.file_linksN)�__name__�
__module__�__qualname__�propertyrrr�FoundCandidatesr�
FoundLinksrrrrrrsr)�file_urlrcCstj|dd�ddkS)NF)�strictrz	text/html)�	mimetypesZ
guess_type)r&rrr�
_is_html_file,sr)c@sbeZdZdZedd�dd�Zdd�dd�Zeeed�d	d
��Z	ee
eeefd�dd��ZdS)
�_FlatDirectoryToUrlsz"Scans directory and caches resultsN)�pathrcCs ||_g|_tt�|_d|_dS)NF)�_path�_page_candidatesr�list�_project_name_to_urls�_scanned_directory)rr+rrr�__init__3s
z_FlatDirectoryToUrls.__init__rc
Cs�t�|j�D]�}t|j�}t|�r0|j�|�qzt|j	�d}WnFt
tfy�zt|j	�d}Wnt
tfy�YYqYn0Yn0|j|�|�qd|_dS)zrScans directory once and populates both page_candidates
        and project_name_to_urls at the same time
        rTN)�os�scandirr,rr+r)r-�appendr�namerr
r
r	r/r0)r�entry�urlZproject_filenamerrr�_scan_directory9s
z$_FlatDirectoryToUrls._scan_directorycCs|js|��|jS�N)r0r8r-rrrrrPsz$_FlatDirectoryToUrls.page_candidatescCs|js|��|jSr9)r0r8r/rrrr�project_name_to_urlsWsz)_FlatDirectoryToUrls.project_name_to_urls)r r!r"�__doc__�strr1r8r#rrrr:rrrrr*0sr*c@sleZdZUdZiZeeefed<e	eedd�dd�Z
eee
d�dd	��Zed�d
d�Zed�dd
�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.
    �_paths_to_urlsN)�candidates_from_pager+�project_namercCsD||_t|�|_||jvr(|j||_nt|d�|_|j|j|<dS)N)r+)�_candidates_from_pager�
_project_namer>�
_path_to_urlsr*)rr?r+r@rrrr1js

z_FlatDirectorySource.__init__rcCsdSr9rrrrrrzsz_FlatDirectorySource.linkccs&|jjD]}|�t|��EdHqdSr9)rCrrAr�rr7rrrr~sz$_FlatDirectorySource.page_candidatesccs"|jj|jD]}t|�VqdSr9)rCr:rBrrDrrrr�sz_FlatDirectorySource.file_links)r r!r"r;r>rr<r*�__annotations__�CandidatesFromPager1r#rrrr$rr%rrrrrr=_s
�r=c@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�r?rrcCs||_||_dSr9�rA�_link�rr?rrrrr1�sz_LocalFileSource.__init__rcCs|jSr9�rJrrrrr�sz_LocalFileSource.linkccs&t|jj�sdS|�|j�EdHdSr9)r)rJr7rArrrrr�sz _LocalFileSource.page_candidatesccst|jj�rdS|jVdSr9)r)rJr7rrrrr�sz_LocalFileSource.file_links�r r!r"r;rFrr1r#rrr$rr%rrrrrrG�s�rGc@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_validatorrrcCs||_||_||_dSr9)rA�_page_validatorrJ)rr?rOrrrrr1�sz_RemoteFileSource.__init__rcCs|jSr9rLrrrrr�sz_RemoteFileSource.linkccs&|�|j�sdS|�|j�EdHdSr9)rPrJrArrrrr�sz!_RemoteFileSource.page_candidatesccs|jVdSr9rLrrrrr�sz_RemoteFileSource.file_links)r r!r"r;rF�
PageValidatorrr1r#rrr$rr%rrrrrrN�s
�
rNc@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.
    NrHcCs||_||_dSr9rIrKrrrr1�sz_IndexDirectorySource.__init__rcCs|jSr9rLrrrrr�sz_IndexDirectorySource.linkccs|�|j�EdHdSr9rIrrrrr�sz%_IndexDirectorySource.page_candidatescCsdS)Nrrrrrrr�sz _IndexDirectorySource.file_linksrMrrrrrR�s�rR)�locationr?rO�
expand_dir�cache_link_parsingr@rc
Csd}d}tj�|�r"t|�}|}n$|�d�r:|}t|�}nt|�rF|}|durbd}t�||�dS|dur�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)rU)r?rOr)r?r+r@)r?rz?Location '%s' is ignored: it is neither a file nor a directory.)r2r+�existsr�
startswithrr�loggerZwarningrNr�isdirr=rR�isfilerG)
rSr?rOrTrUr@r+r7�msg�sourcerrr�build_source�sZ	

�
��
�
��r])-Zloggingr(r2�collectionsr�typingrrrrrrZpip._vendor.packaging.utilsr	r
rrr
rZpip._internal.models.candidaterZpip._internal.models.linkrZpip._internal.utils.urlsrrZpip._internal.vcsrZ	getLoggerr rXr$r%rF�boolrQrr<r)r*r=rGrNrRr]rrrr�<module>s:  	
/(! �

Youez - 2016 - github.com/yon3zu
LinuXploit