403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_internal/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_internal/commands/__pycache__/cache.cpython-311.pyc
�

�/�c����ddlZddlZddlmZddlmZmZddlmcm	cm
Z
ddlmZddl
mZmZddlmZmZddlmZee��ZGd�d	e��ZdS)
�N)�Values)�Any�List)�Command)�ERROR�SUCCESS)�CommandError�PipError)�	getLoggerc�j�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�ZdS)�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��|j�dddddd���|j�d|j��dS)	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 �>/usr/lib/python3/dist-packages/pip/_internal/commands/cache.py�add_optionszCacheCommand.add_options'sU���
� � �����(�M�
	!�	
�	
�	
�	
��'�'��4�=�9�9�9�9�9��options�argsc��|j|j|j|j|jd�}|js!t�d��tS|r
|d|vrBt�dd�	t|������tS|d}	||||dd���nC#t$r6}t�|jd��tcYd}~Sd}~wwxYwtS)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.run4s���%��'��)��-��%�
�
��� �	��L�L�W�X�X�X��L��	�t�A�w�h�.�.��L�L�1��	�	�&��*�*�+�+�
�
�
��L��a���	��H�V��W�d�1�2�2�h�/�/�/�/���	�	�	��L�L�����#�#�#��L�L�L�L�L�L�����	�����s�!B<�<
C<�+C7�1C<�7C<c�f�|rtd���t�|j��dS)N�Too many arguments)r	r0r%r/�rr!r"s   rr*zCacheCommand.get_cache_dirTs4���	5��3�4�4�4����G�%�&�&�&�&�&r c��|rtd���t|�|����}t|�|d����}|�|d��}|�|d��}tj|��}tj|��}tjd���	||||||����
��}	t�|	��dS)Nr8�*�http�wheelsa�
                    Package index page cache location: {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�http_cache_size�num_http_files�wheels_cache_location�
package_count�wheels_cache_size)
r	�len�_find_http_files�_find_wheels�
_cache_dir�
filesystem�format_directory_size�textwrap�dedent�format�stripr0r%)
rr!r"r@�num_packagesr>rAr?rC�messages
          rr+zCacheCommand.get_cache_infoZs���	5��3�4�4�4��T�2�2�7�;�;�<�<���4�,�,�W�c�:�:�;�;��"�o�o�g�v�>�>�� $����� B� B��$�:�;N�O�O��&�<�=R�S�S��
�O��	
�	
��V�$7� /�-�&;�*�"3�
����U�W�W�'	�,	���G�����r c��t|��dkrtd���|r	|d}nd}|�||��}|jdkr|�|��dS|�|��dS)Nr)r8rr;r)rDr	rFr�format_for_human�format_for_abspath)rr!r"�pattern�filess     rr,zCacheCommand.list_cache_items~s����t�9�9�q�=�=��3�4�4�4��	��1�g�G�G��G��!�!�'�7�3�3����'�)�)��!�!�%�(�(�(�(�(��#�#�E�*�*�*�*�*r rTc��|st�d��dSg}|D]Q}tj�|��}tj|��}|�d|�d|�d����Rt�d��t�d�t|������dS)NzNo locally built wheels cached.z - z (�)zCache contents:
�
)
r0r%�os�path�basenamerH�format_file_size�appendr2r3)rrT�results�filename�wheel�sizes      rrQzCacheCommand.format_for_human�s����	��K�K�9�:�:�:��F����	3�	3�H��G�$�$�X�.�.�E��.�x�8�8�D��N�N�1��1�1�$�1�1�1�2�2�2�2����'�(�(�(����D�I�I�f�W�o�o�.�.�/�/�/�/�/r c��|sdSg}|D]}|�|���t�d�t	|������dS)NrW)r\r0r%r2r3)rrTr]r^s    rrRzCacheCommand.format_for_abspath�sb���	��F����	%�	%�H��N�N�8�$�$�$�$����D�I�I�f�W�o�o�.�.�/�/�/�/�/r c��t|��dkrtd���|std���|�||d��}d}|ddkr||�|��z
}n|d�|d��z
}|st
�|��|D]1}tj|��t
�	d|���2t
�
d	t|����dS)
Nr)r8zPlease provide a patternrzNo matching packagesr;z for pattern "{}"z
Removed %szFiles removed: %s)rDr	rFrErLr0�warningrX�unlink�verboser%)rr!r"rT�no_matching_msgr^s      rr-zCacheCommand.remove_cache_items�s���t�9�9�q�=�=��3�4�4�4��	;��9�:�:�:��!�!�'�4��7�3�3��0����7�c�>�>��T�*�*�7�3�3�3�E�E�
�2�9�9�$�q�'�B�B�B�O��	,��N�N�?�+�+�+��	3�	3�H��I�h�����N�N�<��2�2�2�2����'��U���4�4�4�4�4r c�R�|rtd���|�|dg��S)Nr8r;)r	r-r9s   rr.zCacheCommand.purge_cache�s1���	5��3�4�4�4��&�&�w���6�6�6r �subdirc�L�tj�|j|��S)N)rXrYr2r/)rr!rhs   rrGzCacheCommand._cache_dir�s���w�|�|�G�-�v�6�6�6r c�X�|�|d��}tj|d��S)Nr<r;�rGrH�
find_files)rr!�http_dirs   rrEzCacheCommand._find_http_files�s(���?�?�7�F�3�3���$�X�s�3�3�3r rSc�n�|�|d��}|d|vrdndz}tj||��S)Nr=�-z*.whlz-*.whlrk)rr!rS�	wheel_dirs    rrFzCacheCommand._find_wheels�s@���O�O�G�X�6�6�	�$��w���W�W�H�E���$�Y��8�8�8r )rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usagerrr�str�intr6rr*r+r,rQrRr-r.rGrErF�r rr
r
s����������
�E�:�:�:�:��6���c���s�����@'�V�'�4��9�'��'�'�'�'�"�f�"�D��I�"�$�"�"�"�"�H
+��
+�d�3�i�
+�D�
+�
+�
+�
+�0�d�3�i�0�D�0�0�0�0�0��S�	�0�d�0�0�0�0�5�&�5��S�	�5�d�5�5�5�5�27�6�7��c��7�t�7�7�7�7�7�&�7�#�7�#�7�7�7�7�4��4�4��9�4�4�4�4�9�F�9�S�9�T�#�Y�9�9�9�9�9�9r r
)rXrJ�optparser�typingrr�pip._internal.utils.filesystem�	_internal�utilsrH�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr�pip._internal.exceptionsr	r
�pip._internal.utils.loggingrrqr0r
ryr r�<module>r�s��	�	�	�	�������������������3�3�3�3�3�3�3�3�3�3�3�3�2�2�2�2�2�2�9�9�9�9�9�9�9�9�;�;�;�;�;�;�;�;�1�1�1�1�1�1�	��8�	�	��P9�P9�P9�P9�P9�7�P9�P9�P9�P9�P9r 

Youez - 2016 - github.com/yon3zu
LinuXploit