| 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/network/__pycache__/ |
Upload File : |
�
�/�ca � �� � d Z ddlZddlmZ ddlmZmZ ddlmZ ddl m
Z
ddlmZ ddl
mZmZ dd lmZ d
edefd�Zeded
fd�� � Z G d� de� � ZdS )zHTTP cache implementation.
� N)�contextmanager)� Generator�Optional)� BaseCache)� FileCache)�Response)�adjacent_tmp_file�replace)�
ensure_dir�response�returnc �$ � t | dd� � S )N�
from_cacheF)�getattr)r s �=/usr/lib/python3/dist-packages/pip/_internal/network/cache.py�
is_from_cacher s � ��8�\�5�1�1�1� )NNNc # �6 K � dV � dS # t $ r Y dS w xY w)zvIf we can't access the cache then we can just skip caching and process
requests as if caching wasn't enabled.
N)�OSError� r r �suppressed_cache_errorsr s: � � � �
�
��������
�
�
����
���s �
�
�c � � � e Zd ZdZdeddf� fd�Zdedefd�Zdedee fd �Z dded
edee
ddfd�Zdeddfd
�Z� xZ
S )�
SafeFileCachezw
A file based cache which is safe to use even when the target directory may
not be accessible or writable.
� directoryr
Nc �n �� |�
J d� � �t � � � � � || _ d S )Nz!Cache directory must not be None.)�super�__init__r )�selfr � __class__s �r r zSafeFileCache.__init__% s9 �� ��$�$�&I�$�$�$�
��������"����r �namec � � t j |� � }t |d d� � � |gz }t j j | j g|�R � S )N� )r �encode�list�os�path�joinr )r r �hashed�partss r �_get_cache_pathzSafeFileCache._get_cache_path* sL � � �!�$�'�'���V�B�Q�B�Z� � �F�8�+���w�|�D�N�3�U�3�3�3�3r �keyc � � | � |� � }t � � 5 t |d� � 5 }|� � � cd d d � � cd d d � � S # 1 swxY w Y d d d � � d S # 1 swxY w Y d S )N�rb)r* r �open�read)r r+ r&