'3ݡ. 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!fdZ" G d d Z# G d de# Z$ G d de$ Z% G d d Z& G d de# Z'dS )zCache Management N)AnyDictListOptionalSet)Taginterpreter_nameinterpreter_version)canonicalize_name)InvalidWheelFilename) FormatControl)Link)Wheel) TempDirectory tempdir_kinds)path_to_urldreturnc t j | ddd }t j | d S )z'Return a stable sha224 of a dictionary.T),:) sort_keys separatorsensure_asciiascii)jsondumpshashlibsha224encode hexdigest)r ss /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/cache.py _hash_dictr$ sB 1$OOOA>!((7++,,66888 c e Zd ZdZdededee ddf fdZdede e fd Z ded ede e fdZdedefdZ ded ee de e defdZ 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_dirformat_controlallowed_formatsr Nc t |r!t j | sJ |pd | _ || _ || _ ddh}| j | |k sJ d S )Nsourcebinary) super__init__ospathisabsr( r) r* union)selfr( r) r* _valid_formats __class__s r# r/ zCache.__init__( s 8 i 8 8888"*d,."H-#)).99^KKKKKKr% linkc " d|j i}|j |j |j ||j <