( ` d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZm Z m Z mZmZm Z mZ d dlmZ d dlmZ d dlmZmZmZ d dlmZ d dlmZmZ erd dlmZ ej e Z d Z! G d de Z" G d d e Z#de"de#fdZ$ e j% d de"de"de&fd Z'dS ) N) TYPE_CHECKINGDictList NamedTupleOptionalTupleUnion)WHEEL_EXTENSION)Hashes)redact_auth_from_urlsplit_auth_from_netlocsplitext)KeyBasedCompareMixin)path_to_urlurl_to_path)HTMLPage)sha1sha224sha384sha256sha512md5c e Zd ZdZg dZ d*dedeeedf dee d ee d eddf fd Z defd Z defdZedefd Z edefd Zedefd Zedefd Zedefd Zedefd Zdeeef fdZedefd Zedefd Z ej d Zedee fd Z ej d Zedee fd Z ej d d e Z edee fd Z!edee fd Z"edefd! Z#edefd" Z$defd#Z%edefd$ Z&edefd% Z'edefd& Z(edefd' Z)d(ee* defd)Z+ xZ,S )+Linkz:Represents a parsed link from a Package Index's simple URL)_parsed_url_url comes_fromrequires_python yanked_reasoncache_link_parsingNTurlr r r r r returnc 6 | d rt | }t j | | _ || _ || _ |r|nd| _ || _ t |t || _ dS )a :param url: url of the resource pointed to (href of the link) :param comes_from: instance of HTMLPage where the link was found, or string. :param requires_python: String containing the `Requires-Python` metadata field, specified in PEP 345. This may be specified by a data-requires-python attribute in the HTML link tag, as described in PEP 503. :param yanked_reason: the reason the file has been yanked, if the file has been yanked, or None if the file hasn't been yanked. This is the value of the "data-yanked" attribute, if present, in a simple repository HTML link. If the file has been yanked but no reason was provided, this should be the empty string. See PEP 592 for more information and the specification. :param cache_link_parsing: A flag that is used elsewhere to determine whether resources retrieved from this link should be cached. PyPI index urls should generally have this set to False, for example. z\\N)keydefining_class) startswithr urllibparseurlsplitr r r r r super__init__r r )selfr! r r r r __class__s /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/models/link.pyr+ z Link.__init__( s <