403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/site-packages/pip/_internal/network/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/site-packages/pip/_internal/network/__pycache__/cache.cpython-313.pyc
�

��i�����SrSSKJr SSKrSSKrSSKJr SSKJr SSK	J	r	 SSK
JrJrJ
r
 SSKJr SS	KJr SS
KJr SSKJrJrJr SSKJr SS
jr\SSj5r"SS\5rg)zHTTP cache implementation.�)�annotationsN)�	Generator)�contextmanager)�datetime)�Any�BinaryIO�Callable)�SeparateBodyBaseCache)�SeparateBodyFileCache)�Response)�adjacent_tmp_file�copy_directory_permissions�replace)�
ensure_dirc��[USS5$)N�
from_cacheF)�getattr)�responses �=C:\Python313\Lib\site-packages\pip/_internal/network/cache.py�
is_from_cachers���8�\�5�1�1�c#�6# �Sv� g![a gf=f7f)znIf we can't access the cache then we can just skip caching and process
requests as if caching wasn't enabled.
N)�OSError�rr�suppressed_cache_errorsrs���

�
���
��
�s��	��
���c�^�\rSrSrSrSU4SjjrSSjrSSjrSSjrSSjr	SSjr
SSS	jjrSS
jrSSjr
SSjrSS
jrSrU=r$)�
SafeFileCache�'a
A file based cache which is safe to use even when the target directory may
not be accessible or writable.

There is a race condition when two processes try to write and/or read the
same entry at the same time, since each entry consists of two separate
files (https://github.com/psf/cachecontrol/issues/324).  We therefore have
additional logic that makes sure that both files to be present before
returning an entry; this fixes the read side of the race condition.

For the write side, we assume that the server will only ever return the
same data for the same URL, which ought to be the case for files pip is
downloading.  PyPI does not have a mechanism to swap out a wheel for
another wheel, for example.  If this assumption is not true, the
CacheControl issue will need to be fixed.
c�B>�UcS5e[TU]5 Xlg)Nz!Cache directory must not be None.)�super�__init__�	directory)�selfr"�	__class__s  �rr!�SafeFileCache.__init__9s%����$�I�&I�I�$�
����"�rc��[R"U5n[USS5U/-n[RR
"UR/UQ76$)N�)r�encode�list�os�path�joinr")r#�name�hashed�partss    r�_get_cache_path�SafeFileCache._get_cache_path>sG��'�-�-�d�3���V�B�Q�Z� �F�8�+���w�w�|�|�D�N�N�3�U�3�3rc��URU5nUS-n[RRU5(a$[RRU5(dg[	5 [US5nUR
5sSSS5 sSSS5 $!,(df   O=fSSS5 g!,(df   g=f�N�.body�rb)r0r*r+�existsr�open�read)r#�key�
metadata_path�	body_path�fs     r�get�SafeFileCache.getFs����,�,�S�1�
�!�G�+�	������}�-�-�"�'�'�.�.��2K�2K��
$�
&��m�T�*�a��v�v�x�+�*�'�
&�*�*��*�'�
&�
&�s$�*
B5�7B�	B5�
B(	�$B5�5
Cc�N�[5 [[RR	U55 [U5nU"U5 [
URU5 SSS5 [WRU5 SSS5 g!,(df   N-=f!,(df   g=f)zICommon file writing logic with proper permissions and atomic replacement.N)
rrr*r+�dirnamer
rr"rr-)r#r+�writer_funcr<s    r�_write_to_file�SafeFileCache._write_to_filePsm��
$�
&��r�w�w���t�,�-�"�4�(�A��A��+�4�>�>�1�=�	)�
�A�F�F�D�!�'�
&�)�(��'�
&�s"�4B�B�B�
B	�B�
B$c�2^�URUU4Sj5 g)Nc�&>�URT5$�N)�write)r<�datas �r�<lambda>�&SafeFileCache._write.<locals>.<lambda>^s
���A�G�G�D�Mr�rB)r#r+rHs  `r�_write�SafeFileCache._write]s������D�"9�:rc�2^�URUU4Sj5 g)Nc�2>�[R"TU5$rF)�shutil�copyfileobj)r<�source_files �rrI�.SafeFileCache._write_from_io.<locals>.<lambda>as���F�,>�,>�{�A�,NrrK)r#r+rRs  `r�_write_from_io�SafeFileCache._write_from_io`s������D�"N�Orc�H�URU5nURXB5 grF�r0rL)r#r9�value�expiresr+s     r�set�SafeFileCache.setcs ���#�#�C�(�����D� rc��URU5n[5 [R"U5 SSS5 [5 [R"US-5 SSS5 g!,(df   N;=f!,(df   g=f�Nr4)r0rr*�remove)r#r9r+s   r�delete�SafeFileCache.deleteisV���#�#�C�(��
$�
&��I�I�d�O�'�
$�
&��I�I�d�W�n�%�'�
&�'�
&��
&�
&�s�A(�A9�(
A6�9
Bc�"�URU5nUS-n[RRU5(a$[RRU5(dg[	5 [US5sSSS5 $!,(df   g=fr3)r0r*r+r6rr7)r#r9r:r;s    r�get_body�SafeFileCache.get_bodyps`���,�,�S�1�
�!�G�+�	������}�-�-�"�'�'�.�.��2K�2K��
$�
&��	�4�(�'�
&�
&�s�*B�
Bc�N�URU5S-nURX25 gr]rW)r#r9�bodyr+s    r�set_body�SafeFileCache.set_bodyys#���#�#�C�(�7�2�����D�rc�N�URU5S-nURX25 g)z3Set the body of the cache entry from a file object.r4N)r0rT)r#r9�	body_filer+s    r�set_body_from_io�SafeFileCache.set_body_from_io}s%���#�#�C�(�7�2�����D�,r)r")r"�str�return�None)r-rlrmrl)r9rlrmzbytes | None)r+rlrAzCallable[[BinaryIO], Any]rmrn)r+rlrH�bytesrmrn)r+rlrRrrmrnrF)r9rlrXrorYzint | datetime | Nonermrn)r9rlrmrn)r9rlrmzBinaryIO | None)r9rlrerormrn)r9rlrirrmrn)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r!r0r=rBrLrTrZr_rbrfrj�__static_attributes__�
__classcell__)r$s@rrr'sl����"#�
4� �"�;�P�HL�!��!�$�!�/D�!�	
�!�&�)� �-�-rr)rrrm�bool)rmzGenerator[None, None, None])rt�
__future__rr*rP�collections.abcr�
contextlibrr�typingrrr	�pip._vendor.cachecontrol.cacher
�pip._vendor.cachecontrol.cachesr�pip._vendor.requests.modelsr�pip._internal.utils.filesystemr
rr�pip._internal.utils.miscrrrrrrr�<module>r�s`�� �"�	�
�%�%��*�*�@�A�0���
0�2��
��
�Y-�)�Y-r

Youez - 2016 - github.com/yon3zu
LinuXploit