XylotrechusZ
U
��.e� � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z m
Z
ddlmZ ddl
mZ erhdd lmZ ed
d� �ZG dd
� d
e�ZdS )zHTTP cache implementation.
� N)�contextmanager)� BaseCache)� FileCache)�adjacent_tmp_file�replace)�
ensure_dir)�MYPY_CHECK_RUNNING)�Optionalc c s( z
dV W n t tfk
r" Y nX dS )zvIf we can't access the cache then we can just skip caching and process
requests as if caching wasn't enabled.
N)�OSError�IOError� r r �?/usr/lib/python3.8/site-packages/pip/_internal/network/cache.py�suppressed_cache_errors s
r c s@ e Zd ZdZ� fdd�Zdd� Zdd� Zdd � Zd
d� Z� Z S )�
SafeFileCachezw
A file based cache which is safe to use even when the target directory may
not be accessible or writable.
c s( |d k st d��tt| ��� || _d S )Nz!Cache directory must not be None.)�AssertionError�superr �__init__� directory)�selfr �� __class__r r
r &