/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/__pycache__
a ���h�+ � @ s d dl mZ d dlZd dlmZmZmZmZ d dlm Z d dl mZmZ d dl mZ d dlmZ dd lmZmZmZ dd lmZ ddlmZ ddlmZ er�d d l mZ d dlmZ eeef Zeeeef Z neZ ed�Z!ed�Z"ddddd�dd�Z#G dd� de �Z$dS )� )�annotationsN)�Iterable�Iterator�Mapping�Sequence)�cache)� TYPE_CHECKING�TypeVar)�AbstractProvider)�InstallRequirement� )� Candidate� Constraint�Requirement)�REQUIRES_PYTHON_IDENTIFIER)�Factory)�ExplicitRequirement)� Preference)�RequirementInformation�D�VzMapping[str, V]�strzD | V)�mapping� identifier�default�returnc C s8 || v r| | S |� d�\}}}|r4|| v r4| | S |S )ai Get item from a package name lookup mapping with a resolver identifier. This extra logic is needed when the target mapping is keyed by package name, which cannot be directly looked up with an identifier (which may contain requested extras). Additional logic is added to also look up a value by "cleaning up" the extras from the identifier. �[)� partition)r r r �name�open_bracket�_� r! �V/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/provider.py�_get_with_identifier5 s r# c @ s� e Zd ZdZddddddd�d d �Zddd�d d�Zddddddd�dd�Zddddddd�dd�Zddddd�dd �Ze e d!d"dd#�d$d%���Zd"d&d'�d(d)�Zd*S )+�PipProvidera� Pip's provider implementation for resolvelib. :params constraints: A mapping of constraints specified by the user. Keys are canonicalized project names. :params ignore_dependencies: Whether the user specified ``--no-deps``. :params upgrade_strategy: The user-specified upgrade strategy. :params user_requested: A set of canonicalized package names that the user supplied for pip to install/upgrade. r zdict[str, Constraint]�boolr zdict[str, int]�None)�factory�constraints�ignore_dependencies�upgrade_strategy�user_requestedr c C s"