관리-도구
편집 파일: cache.cpython-311.pyc
� �Re�$ � �z � d Z ddlZddlZddlZddlZddlmZmZmZm Z m Z ddlmZm Z mZ ddlmZ ddlmZ ddlmZ ddlmZ dd lmZ dd lmZmZ ddlmZ ej e� � Z dee!e!f d e!fd�Z" G d� d� � Z# G d� de#� � Z$ G d� de$� � Z% G d� d� � Z& G d� de#� � Z'dS )zCache Management � N)�Any�Dict�List�Optional�Set)�Tag�interpreter_name�interpreter_version)�canonicalize_name)�InvalidWheelFilename)� FormatControl)�Link)�Wheel)� TempDirectory� tempdir_kinds)�path_to_url�d�returnc � � t j | ddd�� � }t j |� d� � � � � � � S )z'Return a stable sha224 of a dictionary.T)�,�:)� sort_keys� separators�ensure_ascii�ascii)�json�dumps�hashlib�sha224�encode� hexdigest)r �ss ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/cache.py� _hash_dictr$ sB � �� �1���$�O�O�O�A��>�!�(�(�7�+�+�,�,�6�6�8�8�8� c � � � e Zd ZdZdededee ddf� fd�Zdede e fd �Z ded ede e fd�Zdedefd�Z ded ee de e defd�Z� xZS )�Cachean An abstract class - provides cache directories for data from links :param cache_dir: The root of the cache. :param format_control: An object of FormatControl class to limit binaries being read from the cache. :param allowed_formats: which formats of files the cache should store. ('binary' and 'source' are the only allowed values) � cache_dir�format_control�allowed_formatsr Nc � �� t � � � � � |r!t j � |� � sJ �|pd | _ || _ || _ ddh}| j � |� � |k sJ �d S )N�source�binary) �super�__init__�os�path�isabsr( r) r* �union)�selfr( r) r* �_valid_formats� __class__s �r# r/ zCache.__init__( s� �� � ���������8��� � �i� 8� 8�8�8�8�"�*�d���,���.���"�H�-���#�)�)�.�9�9�^�K�K�K�K�K�Kr% �linkc �" � d|j i}|j �|j �|j ||j <