OwlCyberSecurity - MANAGER
Edit File: package_finder.cpython-312.pyc
� "��g�� � � � d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z m Z mZmZm Z mZmZmZ ddlmZ ddlmZ ddlmZ ddlmZmZ dd lmZ dd lmZmZmZm Z ddl!m"Z"m#Z# ddl$m%Z% dd l&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z= ddl>m?Z? ddl@mAZA e rddlBmCZC g d�ZD e5eE� ZFeed eeGeHf f ZIeeGeGeGee eG eIf ZJ d9de)deeGeGeGf d eKd!eKfd"�ZL G d#� d$ej� � ZN G d%� d&� ZOd'ee% d(e e9 d)eHd!ee% fd*�ZPe G d+� d,� � ZQ ed-�.� G d/� d0� � ZR G d1� d2� ZS G d3� d4� ZTd5eHd6eHd!eGfd7�ZUd5eHd6eHd!e eH fd8�ZVy):z!Routines related to PyPI, indexes� N)� dataclass)� TYPE_CHECKING� FrozenSet�Iterable�List�Optional�Set�Tuple�Union)� specifiers)�Tag)�canonicalize_name)�InvalidVersion�_BaseVersion)�parse)�BestVersionAlreadyInstalled�DistributionNotFound�InvalidWheelFilename�UnsupportedWheel)� LinkCollector�parse_links)�InstallationCandidate)� FormatControl)�Link)�SearchScope)�SelectionPreferences)�TargetPython)�Wheel)�InstallRequirement)� getLogger)�WHEEL_EXTENSION)�Hashes)� indent_log)�build_netloc)�check_requires_python)�SUPPORTED_EXTENSIONS)� TypeGuard)r �BestCandidateResult� PackageFinder� �link�version_info�ignore_requires_python�returnc �x � t | j |�� }|sfdj t t |� � }|s#t j d|| j | � yt j d|| j | � y# t j $ r$ t j d| j | � Y yw xY w)aa Return whether the given Python version is compatible with a link's "Requires-Python" value. :param version_info: A 3-tuple of ints representing the Python major-minor-micro version to check. :param ignore_requires_python: Whether to ignore the "Requires-Python" value if the given Python version isn't compatible. )r, �.z4Link requires a different Python (%s not in: %r): %sFzBIgnoring failed Requires-Python check (%s not in: %r) for link: %sz2Ignoring invalid Requires-Python (%r) for link: %sT) r% �requires_python�join�map�str�logger�verbose�debugr �InvalidSpecifier)r+ r, r- � is_compatible�versions �Q/opt/hc_python/lib/python3.12/site-packages/pip/_internal/index/package_finder.py�_check_link_requires_pythonr<