403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pip/_internal/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pip/_internal/commands/__pycache__/cache.cpython-312.pyc
�

�k�f���ddlZddlZddlmZddlmZmZddlmZddl	m
Z
mZddlm
Z
mZddlmZddlmZee�ZGd	�d
e�Zy)�N)�Values)�Any�List)�Command)�ERROR�SUCCESS)�CommandError�PipError)�
filesystem)�	getLoggerc�,�eZdZdZdZdZdd�Zdedee	de
fd	�Zdedeeddfd
�Z
dedeeddfd�Zdedeeddfd�Zd
ee	ddfd�Zd
ee	ddfd�Zdedeeddfd�Zdedeeddfd�Zdede	de	fd�Zdedee	fd�Zdede	dee	fd�Zy)�CacheCommandaw
    Inspect and manage pip's wheel cache.

    Subcommands:

    - dir: Show the cache directory.
    - info: Show information about the cache.
    - list: List filenames of packages stored in the cache.
    - remove: Remove one or more package from the cache.
    - purge: Remove all items from the cache.

    ``<pattern>`` can be a glob expression or a package name.
    Tz�
        %prog dir
        %prog info
        %prog list [<pattern>] [--format=[human, abspath]]
        %prog remove <pattern>
        %prog purge
    �returnNc��|jjdddddd��|jjd|j�y)	Nz--format�store�list_format�human)r�abspathz:Select the output format among: human (default) or abspath)�action�dest�default�choices�helpr)�cmd_opts�
add_option�parser�insert_option_group)�selfs �>C:\Python312\Lib\site-packages\pip/_internal/commands/cache.py�add_optionszCacheCommand.add_options'sE���
�
� � �����(�M�
	!�	
�	
���'�'��4�=�=�9��options�argsc���|j|j|j|j|jd�}|j
stjd�tS|r|d|vr4tjddjt|���tS|d}	||||dd�tS#t$r2}tj|jd�tcYd}~Sd}~wwxYw)N)�dir�info�list�remove�purgez<pip cache commands can not function since cache is disabled.rzNeed an action (%s) to perform.z, �)�
get_cache_dir�get_cache_info�list_cache_items�remove_cache_items�purge_cache�	cache_dir�logger�errorr�join�sortedr
r#r)rr"r#�handlersr�es      r�runzCacheCommand.run3s����%�%��'�'��)�)��-�-��%�%�
��� � ��L�L�W�X��L��t�A�w�h�.��L�L�1��	�	�&��*�+�
��L��a���	��H�V��W�d�1�2�h�/�
���	�	��L�L������#��L��	�s�%B:�:	C5�'C0�*C5�0C5c�\�|rtd��tj|j�y)N�Too many arguments)r	r1r&r0�rr"r#s   rr+zCacheCommand.get_cache_dirSs#����3�4�4����G�%�%�&r!c	�6�|rtd��t|j|��}t|j|d��}|j	|d�}|j	|d�}|j	|d�}tjtj|�tj|�z�}tj|�}	tjd�j|||||||	��j�}
tj|
�y)Nr9�*�http-v2�http�wheelsa
                    Package index page cache location (pip v23.3+): {http_cache_location}
                    Package index page cache location (older pips): {old_http_cache_location}
                    Package index page cache size: {http_cache_size}
                    Number of HTTP files: {num_http_files}
                    Locally built wheels location: {wheels_cache_location}
                    Locally built wheels size: {wheels_cache_size}
                    Number of locally built wheels: {package_count}
                )�http_cache_location�old_http_cache_location�http_cache_size�num_http_files�wheels_cache_location�
package_count�wheels_cache_size)r	�len�_find_http_files�_find_wheels�
_cache_dirr�format_size�directory_size�format_directory_size�textwrap�dedent�format�stripr1r&)rr"r#rC�num_packagesr@rArDrBrF�messages           rr,zCacheCommand.get_cache_infoYs
����3�4�4��T�2�2�7�;�<���4�,�,�W�c�:�;��"�o�o�g�y�A��"&�/�/�'�6�"B�� $����� B��$�0�0��%�%�&9�:��'�'�(?�@�
A�
��'�<�<�=R�S��
�O�O��

��V�$7�(?� /�-�&;�*�"3����U�W�+	�0	���G�r!c���t|�dkDrtd��|r|d}nd}|j||�}|jdk(r|j	|�y|j|�y)Nr*r9rr<r)rGr	rIr�format_for_human�format_for_abspath)rr"r#�pattern�filess     rr-zCacheCommand.list_cache_items�sf���t�9�q�=��3�4�4���1�g�G��G��!�!�'�7�3�����'�)��!�!�%�(��#�#�E�*r!rXc�b�|stjd�yg}|D]N}tjj	|�}tj|�}|jd|�d|�d���Ptjd�tjdjt|���y)NzNo locally built wheels cached.z - z (�)zCache contents:
�
)
r1r&�os�path�basenamer�format_file_size�appendr3r4)rrX�results�filename�wheel�sizes      rrUzCacheCommand.format_for_human�s�����K�K�9�:�����	3�H��G�G�$�$�X�.�E��.�.�x�8�D��N�N�S���r�$��q�1�2�	3�	���'�(����D�I�I�f�W�o�.�/r!c�d�|r.tjdjt|���yy)Nr[)r1r&r3r4)rrXs  rrVzCacheCommand.format_for_abspath�s#����K�K��	�	�&��-�0�1�r!c��t|�dkDrtd��|std��|j||d�}d}|ddk(r||j|�z
}n|d|d�d�z
}|stj|�|D]-}t
j|�tjd	|��/tjd
t|��y)Nr*r9zPlease provide a patternrzNo matching packagesr<z for pattern "�"z
Removed %szFiles removed: %s)
rGr	rIrHr1�warningr\�unlink�verboser&)rr"r#rX�no_matching_msgrbs      rr.zCacheCommand.remove_cache_items�s����t�9�q�=��3�4�4���9�:�:��!�!�'�4��7�3��0����7�c�>��T�*�*�7�3�3�E�
���Q��y��:�:�O���N�N�?�+��	3�H��I�I�h���N�N�<��2�	3�	���'��U��4r!c�B�|rtd��|j|dg�S)Nr9r<)r	r.r:s   rr/zCacheCommand.purge_cache�s&����3�4�4��&�&�w���6�6r!�subdirc�V�tjj|j|�S)N)r\r]r3r0)rr"rms   rrJzCacheCommand._cache_dir�s���w�w�|�|�G�-�-�v�6�6r!c��|j|d�}|j|d�}tj|d�tj|d�zS)Nr>r=r<�rJr�
find_files)rr"�old_http_dir�new_http_dirs    rrHzCacheCommand._find_http_files�sN�����w��7�����w�	�:���$�$�\�3�7�*�:O�:O��#�;
�
�	
r!rWc�h�|j|d�}|d|vrdndz}tj||�S)Nr?�-z*.whlz-*.whlrp)rr"rW�	wheel_dirs    rrIzCacheCommand._find_wheels�s9���O�O�G�X�6�	�$��w��W�H�E���$�$�Y��8�8r!)rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager rr�str�intr7rr+r,r-rUrVr.r/rJrHrI�r!rrrsN�����
�E�
:��6���c���s��@'�V�'�4��9�'��'�(�f�(�D��I�(�$�(�T
+��
+�d�3�i�
+�D�
+�0�d�3�i�0�D�0�2��S�	�2�d�2�5�&�5��S�	�5�d�5�27�6�7��c��7�t�7�7�&�7�#�7�#�7�
��
�4��9�
�9�F�9�S�9�T�#�Y�9r!r)r\rN�optparser�typingrr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr�pip._internal.exceptionsr	r
�pip._internal.utilsr�pip._internal.utils.loggingrrwr1rrr!r�<module>r�s8��	����2�9�;�*�1�	�8�	��R9�7�R9r!

Youez - 2016 - github.com/yon3zu
LinuXploit