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/utils/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

X��eG\�@sRddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZ
ddlmZddlmZddlmZmZmZddlmZddlmZmZddlmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*ddl+m,Z,dd	l-m.Z.dd
l/m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6m7Z7dd
l8m9Z9ddl:m;Z;ddl<m=Z=gd�Z>e�?e@�ZAe(d�ZBe&e'eCeCefZDe&eEeEeEfZFe&eGe&e$eGe$eGffZHeeeeCgefZIeeeeDgefZJeGd�dd�ZKe&eEdfe&eEeEeEfd�dd�ZLeGdd�dd�ZMeGd�dd�ZNe0de1d�e2d �d!�d�eGeOe$eIdd#�d$d%��ZPedd&�d'd(�ZQedd&�d)d*�ZReRd+�eee)eDeCfeIdd,�d-d.�ZSeGeGd�d/d0�ZTd�eGeGeGd2�d3d4�ZUeGe!eGeGd5�d6d7�ZVeGdd8�d9d:�ZWeGe!eGeGd5�d;d<�ZXeGeGd8�d=d>�ZYeGeGd8�d?d@�ZZeGeEdA�dBdC�Z[e\eGdD�dEdF�Z]e!e!ee&e#eGe#eEfdG�dHdI�Z^eGeOd�dJdK�Z_ej`feeEe eaddfdL�dMdN�Zbd�eGeOeGdO�dPdQ�ZceGe&eGeGfd�dRdS�ZdeGeGddT�dUdV�ZeeGeOd�dWdX�ZfeeddY�dZd[�ZgGd\d]�d]e�ZhejieGe ehddfd^�d_d`��Zjeehd�dadb�Zkeehd�dcdd�Zleee'ede�dfdg�ZmeGe$eEeGdh�didj�Znd�eGeGeGdl�dmdn�ZoeGe&e$eGe$eEfdo�dpdq�ZpeGeHdo�drds�ZqeGeGdo�dtdu�ZreGeeGge&edffe&eGeHfdv�dwdx�ZseGeHdo�dydz�ZteGe&eGdo�d{d|�ZueGe&eGeGe&e$eGe$eGffd}�d~d�ZveGeGd}�d�d��ZweGeGd}�d�d��Zxe,eGd��d�d��ZyGd�d��d��ZzeGezd��d�d��Z{eGezd}�d�d��Z|eOdd��d�d��Z}dd�d�d��Z~eOd�d�d��Zd�eGeEe&eeEfd��d�d��Z�e!ee"e&eefd��d�d��Z�eeBgeOfe!eBe&e!eBe!eBfd��d�d��Z�Gd�d��d�e.�Z�dS)��N)�partial)�StringIO)�filterfalse�tee�zip_longest)�Path)�FunctionType�
TracebackType)�Any�BinaryIO�Callable�ContextManager�Dict�	Generator�Iterable�Iterator�List�Optional�TextIO�Tuple�Type�TypeVar�Union�cast)�Requirement)�BuildBackendHookCaller)�retry�stop_after_delay�
wait_fixed)�__version__)�CommandError�ExternallyManagedEnvironment)�get_major_minor_version)�WINDOWS)�running_under_virtualenv)�rmtree�display_path�
backup_dir�ask�splitext�format_size�is_installable_dir�normalize_path�renames�get_prog�captured_stdout�
ensure_dir�remove_auth_from_url�check_externally_managed� ConfiguredBuildBackendHookCaller�T��returncCs>tj�tj�t�dd�}tj�|�}dt�d|�dt��d�S)Nz..zpip z from z	 (python �))�os�path�join�dirname�__file__�abspathrr")Zpip_pkg_dir�r>�</usr/lib/python3.9/site-packages/pip/_internal/utils/misc.py�get_pip_versionLsr@.)�py_version_infor6cCsDt|�dkr"|dt|�d7}nt|�dkr:|dd�}td|�S)ax
    Convert a tuple of ints representing a Python version to one of length
    three.

    :param py_version_info: a tuple of ints representing a Python version,
        or None to specify no version. The tuple can have any length.

    :return: a tuple of length three if `py_version_info` is non-None.
        Otherwise, return `py_version_info` unchanged (i.e. None).
    �)rN�VersionInfo)�lenr)rAr>r>r?�normalize_version_infoSs
rE)r9r6c
CsRzt�|�Wn>tyL}z&|jtjkr8|jtjkr8�WYd}~n
d}~00dS)z os.path.makedirs without EEXIST.N)r8�makedirs�OSError�errnoZEEXISTZ	ENOTEMPTY)r9�er>r>r?r0fs
r0c
CsPz2tj�tjd�}|dvr*tj�d�WS|WSWntttfyJYn0dS)Nr)z__main__.pyz-cz -m pip�pip)	r8r9�basename�sys�argv�
executable�AttributeError�	TypeError�
IndexError)�progr>r>r?r.ps
r.TrBg�?)Zreraise�stop�waitF)�dir�
ignore_errors�onexcr6cCsZ|rt}|durt}tttttft�|d�}tj	dkrHt
j||d�nt
j||d�dS)N�rW)rB�)�onerror)�_onerror_ignore�_onerror_reraiserrr�OnExc�OnErr�rmtree_errorhandlerrL�version_info�shutilr%)rUrVrWZhandlerr>r>r?r%~s�
r%)�_argsr6cGsdS�Nr>�rbr>r>r?r[�sr[cGs�dSrcr>rdr>r>r?r\�sr\rX)�funcr9�exc_inforWr6cCs�zt�|�j}Wnty$YdS0|tj@s|zt�||tjB�WntyXYn$0z||�WdStyzYn0t|t�s�|\}}}||||�dS)a1
    `rmtree` error handler to 'force' a file remove (i.e. like `rm -f`).

    * If a file is readonly then it's write flag is set and operation is
      retried.

    * `onerror` is the original callback from `rmtree(... onerror=onerror)`
      that is chained at the end if the "rm -f" still fails.
    N)r8�stat�st_moderG�S_IWRITE�chmod�
isinstance�
BaseException)rer9rfrWrh�_r>r>r?r_�s"


r_cCsFtj�tj�|��}|�t��tjj�rBd|tt���d�}|S)zTGives the display value for a given path, making it relative to cwd
    if possible.�.N)r8r9�normcaser=�
startswith�getcwd�seprD�r9r>r>r?r&�sr&�.bak)rU�extr6cCs6d}|}tj�||�r.|d7}|t|�}q||S)z\Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)�)r8r9�exists�str)rUru�n�	extensionr>r>r?r'�sr')�message�optionsr6cCs2tj�dd���D]}||vr|Sqt||�S)NZPIP_EXISTS_ACTION�)r8�environ�get�splitr()r{r|�actionr>r>r?�ask_path_exists�s
r�)r{r6cCstj�d�rtd|����dS)z&Raise an error if no input is allowed.ZPIP_NO_INPUTz5No input was expected ($PIP_NO_INPUT set); question: N)r8r~r�	Exception�r{r>r>r?�_check_no_input�s�r�cCsFt|�t|�}|����}||vr<td�|d�|���q|SqdS)z@Ask the message interactively, with the given possible responsesz>Your response ({!r}) was not one of the expected responses: {}z, N)r��input�strip�lower�print�formatr:)r{r|Zresponser>r>r?r(�s
��r(cCst|�t|�S)zAsk for input interactively.)r�r�r�r>r>r?�	ask_input�sr�cCst|�t�|�S)z!Ask for a password interactively.)r��getpassr�r>r>r?�ask_password�sr�)�valr6cCs2|��}|dvrdS|dvr dStd|����dS)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )�yZyes�t�trueZon�1rv)ry�no�fZfalseZoff�0rzinvalid truth value N)r��
ValueError)r�r>r>r?�	strtoboolsr�)�bytesr6cCs`|dkr|ddd�d�S|dkr6t|d��d�S|dkrN|dd�d�St|��d�SdS)	Ni@Bg@�@i�z.1fz MBi'z kBz bytes)�int)r�r>r>r?r*sr*)�rowsr6cs@dd�|D�}dd�t|ddi�D���fdd�|D�}|�fS)z�Return a list of formatted rows and a list of column sizes.

    For example::

    >>> tabulate([['foobar', 2000], [0xdeadbeef]])
    (['foobar     2000', '3735928559'], [10, 4])
    cSsg|]}ttt|���qSr>)�tuple�maprx��.0�rowr>r>r?�
<listcomp>'�ztabulate.<locals>.<listcomp>cSsg|]}ttt|���qSr>)�maxr�rD)r��colr>r>r?r�(r��	fillvaluer}cs$g|]}d�ttj|������qS)� )r:r�rx�ljust�rstripr��Zsizesr>r?r�)r�)r)r��tabler>r�r?�tabulatesr�cCsHtj�|�sdStj�tj�|d��r*dStj�tj�|d��rDdSdS)atIs path is a directory containing pyproject.toml or setup.py?

    If pyproject.toml exists, this is a PEP 517 project. Otherwise we look for
    a legacy setuptools layout by identifying setup.py. We don't check for the
    setup.cfg because using it without setup.py is only available for PEP 517
    projects, which are already covered by the pyproject.toml check.
    Fzpyproject.tomlTzsetup.py)r8r9�isdir�isfiler:rsr>r>r?r+-sr+)�file�sizer6ccs|�|�}|sq|VqdS)z7Yield pieces of data from a file-like object until EOF.N)�read)r�r��chunkr>r>r?�read_chunks>s
r�)r9�resolve_symlinksr6cCs6tj�|�}|rtj�|�}ntj�|�}tj�|�S)zN
    Convert a path to its canonical, case-normalized, absolute version.

    )r8r9�
expanduser�realpathr=ro)r9r�r>r>r?r,Is
r,cCs@t�|�\}}|���d�r8|dd�|}|dd�}||fS)z,Like os.path.splitext, but take off .tar tooz.tar���N)�	posixpathr)r��endswith)r9�baserur>r>r?r)Vs
r))�old�newr6cCsxtj�|�\}}|r.|r.tj�|�s.t�|�t�||�tj�|�\}}|rt|rtzt�|�WntyrYn0dS)z7Like os.renames(), but handles renaming across devices.N)	r8r9r�rwrFra�move�
removedirsrG)r�r��head�tailr>r>r?r-_s
r-cCst�s
dS|�ttj��S)z�
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    Caution: this function assumes the head of path has been normalized
    with normalize_path.
    T)r$rpr,rL�prefixrsr>r>r?�is_localps	r�)�msg�argsr6cGstj|g|�R�dSrc)�logger�info)r�r�r>r>r?�write_output~sr�c@s<eZdZUeed<eedd�dd��Zeed�dd��Z	dS)	�
StreamWrapper�orig_stream)r�r6cCs|�}||_|Src)r�)�clsr��retr>r>r?�from_stream�szStreamWrapper.from_streamr5cCs|jjSrc)r��encoding��selfr>r>r?r��szStreamWrapper.encodingN)
�__name__�
__module__�__qualname__r�__annotations__�classmethodr��propertyrxr�r>r>r>r?r��s

r�)�stream_namer6c
csLtt|�}tt|t�|��ztt|�VWtt||�ntt||�0dS)z�Return a context manager used by captured_stdout/stdin/stderr
    that temporarily replaces the sys stream *stream_name* with a StringIO.

    Taken from Lib/support/__init__.py in the CPython repo.
    N)�getattrrL�setattrr�r�)r�Zorig_stdoutr>r>r?�captured_output�s

r�cCstd�S)z�Capture the output of sys.stdout:

       with captured_stdout() as stdout:
           print('hello')
       self.assertEqual(stdout.getvalue(), 'hello
')

    Taken from Lib/support/__init__.py in the CPython repo.
    �stdout�r�r>r>r>r?r/�s	r/cCstd�S)z 
    See captured_stdout().
    �stderrr�r>r>r>r?�captured_stderr�sr�)�
sequential�namedr6cOsDtt|tt|���fi|��}dd�|��D�}||d<tdd|�S)NcSsi|]\}}||�qSr>r>)r��key�valuer>r>r?�
<dictcomp>�r�zenum.<locals>.<dictcomp>Zreverse_mapping�Enumr>)�dict�zip�rangerD�items�type)r�r�Zenums�reverser>r>r?�enum�sr�)�host�portr6cCs.|dur|Sd|vr d|�d�}|�d|��S)z.
    Build a netloc from a host-port pair
    N�:�[�]r>)r�r�r>r>r?�build_netloc�s
r��https)�netloc�schemer6cCs8|�d�dkr*d|vr*d|vr*d|�d�}|�d|��S)z)
    Build a full URL from a netloc.
    r���@r�r�z://)�count)r�r�r>r>r?�build_url_from_netloc�sr�)r�r6cCs t|�}tj�|�}|j|jfS)z2
    Return the host-port pair from a netloc.
    )r��urllib�parse�urlparse�hostnamer�)r��url�parsedr>r>r?�parse_netloc�sr�cCstd|vr|dfS|�dd�\}}d}d|vr>|�dd�\}}n
|d}}tj�|�}|durhtj�|�}|||ffS)zp
    Parse out and remove the auth information from a netloc.

    Returns: (netloc, (username, password)).
    r�)NNrvNr�)�rsplitr�r�r��unquote)r��authZpw�userr>r>r?�split_auth_from_netloc�s
rcCsPt|�\}\}}|dur|S|dur.d}d}ntj�|�}d}|�|�d|��S)z�
    Replace the sensitive data in a netloc with "****", if it exists.

    For example:
        - "user:pass@example.com" returns "user:****@example.com"
        - "accesstoken@example.com" returns "****@example.com"
    N�****r}z:****r�)rr�r��quote)r�r�passwordr>r>r?�
redact_netloc�sr)r��transform_netlocr6cCsJtj�|�}||j�}|j|d|j|j|jf}tj�|�}|t	d|�fS)aRTransform and replace netloc in a url.

    transform_netloc is a function taking the netloc and returning a
    tuple. The first element of this tuple is the new netloc. The
    entire tuple is returned.

    Returns a tuple containing the transformed url as item 0 and the
    original tuple returned by transform_netloc as item 1.
    r�NetlocTuple)
r�r��urlsplitr�r�r9�query�fragment�
urlunsplitr)r�rZpurlZnetloc_tupleZ
url_piecesZsurlr>r>r?�_transform_urls

rcCst|�Src)r�r�r>r>r?�_get_netloc srcCs
t|�fSrc)rr
r>r>r?�_redact_netloc$sr)r�r6cCst|t�\}\}}|||fS)z�
    Parse a url into separate netloc, auth, and url with no auth.

    Returns: (url_without_auth, netloc, (username, password))
    �rr)r�Zurl_without_authr�r�r>r>r?�split_auth_netloc_from_url(srcCst|t�dS)z7Return a copy of url with 'username:password@' removed.rr�r�r>r>r?r14sr1cCst|t�dS)z.Replace the password in a given url with ****.r)rrrr>r>r?�redact_auth_from_url;sr)�reqr6cCs&|jst|�St|��|jt|j��S)z:Replace the password in a given requirement url with ****.)r�rx�replacer)rr>r>r?�redact_auth_from_requirement@src@sJeZdZeedd�dd�Zed�dd�Zed�dd	�Zeed
�dd�Z	dS)
�
HiddenTextN)�secret�redactedr6cCs||_||_dSrc)rr)r�rrr>r>r?�__init__HszHiddenText.__init__r5cCsdt|��d�S)Nz<HiddenText �>)rxr�r>r>r?�__repr__LszHiddenText.__repr__cCs|jSrc�rr�r>r>r?�__str__OszHiddenText.__str__)�otherr6cCs t|�t|�krdS|j|jkS)NF)r�r)r�rr>r>r?�__eq__SszHiddenText.__eq__)
r�r�r�rxrrrr
�boolr r>r>r>r?rGsr)r�r6cCst|dd�S)Nrr)r)r�r>r>r?�
hide_value\sr"cCst|�}t||d�S)Nr)rr)r�rr>r>r?�hide_url`sr#)�
modifying_pipr6cCs|ddtjj��dtjj�dtjj��g}|oDtoDtj�tjd�|v}|rxtj	ddgtjdd�}t
d�d�|����dS)	z�Protection of pip.exe from modification on Windows

    On Windows, any operation modifying pip should be run as:
        python -m pip ...
    rJrnrz-mrvNz3To modify pip, please run the following command:
{}r�)
rLr`�major�minorr#r8r9rKrMrNr r�r:)r$Z	pip_namesZshould_show_use_python_msgZnew_commandr>r>r?�(protect_pip_from_modification_on_windowses����r'cCs<t�r
dStj�t�d�d�}tj�|�s.dSt�|��dS)z�Check whether the current environment is externally managed.

    If the ``EXTERNALLY-MANAGED`` config file is found, the current environment
    is considered externally managed, and an ExternallyManagedEnvironment is
    raised.
    NZstdlibzEXTERNALLY-MANAGED)	r$r8r9r:�	sysconfigZget_pathr�r!Zfrom_config)Zmarkerr>r>r?r2sr2cCstjduotj��S)zIs this console interactive?N)rL�stdin�isattyr>r>r>r?�is_console_interactive�sr+�)r9�	blocksizer6cCsft��}d}t|d��8}t||d�D]}|t|�7}|�|�q$Wd�n1sT0Y||fS)z5Return (hash, length) for path using hashlib.sha256()r�rb)r�N)�hashlibZsha256�openr�rD�update)r9r-�h�lengthr��blockr>r>r?�	hash_file�s*r5)�iterabler6cCst|�}t||�S)zb
    Return paired elements.

    For example:
        s -> (s0, s1), (s2, s3), (s4, s5), ...
    )�iterr)r6r>r>r?�pairwise�sr8)�predr6r6cCs t|�\}}t||�t||�fS)z�
    Use a predicate to partition entries into false entries and true entries,
    like

        partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
    )rr�filter)r9r6�t1�t2r>r>r?�	partition�s
r=c	s�eZdZdeeeeeeedeed��fdd�
Zdeeeee	ee
effeeed��fdd�
Zdeeeee	ee
effed	��fd
d�
Zdeeeee	ee
effeeed��fdd
�
Z
deeee	ee
effe
ed��fdd�
Zd eeee	ee
effe
ed��fdd�
Zd!eeee	ee
effe
ed��fdd�
Zd"eeeee	ee
effeed��fdd�
Zd#eeeee	ee
effeed��fdd�
Z�ZS)$r3N).N)�
config_holder�
source_dir�
build_backend�backend_path�runner�python_executablecst��|||||�||_dSrc)�superrr>)r�r>r?r@rArBrC��	__class__r>r?r�s	
�z)ConfiguredBuildBackendHookCaller.__init__)�wheel_directory�config_settings�metadata_directoryr6cs|jj}t�j|||d�S�N)rHrI)r>rHrD�build_wheel�r�rGrHrI�csrEr>r?rK�s�z,ConfiguredBuildBackendHookCaller.build_wheel)�sdist_directoryrHr6cs|jj}t�j||d�S�N)rH)r>rHrD�build_sdist)r�rNrHrMrEr>r?rP�sz,ConfiguredBuildBackendHookCaller.build_sdistcs|jj}t�j|||d�SrJ)r>rHrD�build_editablerLrEr>r?rQ�s�z/ConfiguredBuildBackendHookCaller.build_editable)rHr6cs|jj}t�j|d�SrO)r>rHrD�get_requires_for_build_wheel�r�rHrMrEr>r?rR�sz=ConfiguredBuildBackendHookCaller.get_requires_for_build_wheelcs|jj}t�j|d�SrO)r>rHrD�get_requires_for_build_sdistrSrEr>r?rT�sz=ConfiguredBuildBackendHookCaller.get_requires_for_build_sdistcs|jj}t�j|d�SrO)r>rHrD�get_requires_for_build_editablerSrEr>r?rU�sz@ConfiguredBuildBackendHookCaller.get_requires_for_build_editableT)rIrH�_allow_fallbackr6cs|jj}t�j|||d�S�N)rIrHrV)r>rHrD� prepare_metadata_for_build_wheel�r�rIrHrVrMrEr>r?rX�s�zAConfiguredBuildBackendHookCaller.prepare_metadata_for_build_wheelcs|jj}t�j|||d�SrW)r>rHrD�#prepare_metadata_for_build_editablerYrEr>r?rZs�zDConfiguredBuildBackendHookCaller.prepare_metadata_for_build_editable)NNN)NN)N)NN)N)N)N)NT)NT)r�r�r�r
rxrrrrrrrKrPrQrRrTrUr!rXrZ�
__classcell__r>r>rEr?r3�s��
�������������	����r3)FN)rt)T)r�)r,)��
contextlibrHr�r/�ioZloggingr8r�rargrLr(�urllib.parser��	functoolsrr�	itertoolsrrr�pathlibr�typesrr	�typingr
rrr
rrrrrrrrrrrrZ"pip._vendor.packaging.requirementsrZpip._vendor.pyproject_hooksrZpip._vendor.tenacityrrrrJrZpip._internal.exceptionsr r!Zpip._internal.locationsr"Zpip._internal.utils.compatr#Zpip._internal.utils.virtualenvr$�__all__Z	getLoggerr�r�r4rlZExcInfor�rCrxrr]r^r@rEr0r.r!r%r[r\r_r&r'r�r�r(r�r�r��floatr*r�r+�DEFAULT_BUFFER_SIZEr�r�r,r)r-r�r�r��contextmanagerr�r/r�r�r�r�r�rrrrrrr1rrrr"r#r'r2r+r5r8r=r3r>r>r>r?�<module>s�H
"
��	�
�)	(��
	
 	
�� �

Youez - 2016 - github.com/yon3zu
LinuXploit