관리-도구
편집 파일: auth.cpython-311.pyc
� �Re�/ � � � d Z ddlZddlmZmZmZmZmZ ddl m Z mZ ddlm Z mZ ddlmZ ddlmZ ddlmZmZmZmZmZ dd lmZ ee� � Zeeeef Z ddlan;# e $ r daY n2e!$ r+Z"e�# d ee"� � � � daY dZ"["ndZ"["ww xY wdee dee d ee fd�Z$ G d� de � � Z%dS )z�Network Authentication Helpers Contains interface (MultiDomainBasicAuth) and associated glue code for providing credentials in the context of network requests. � N)�Any�Dict�List�Optional�Tuple)�AuthBase� HTTPBasicAuth)�Request�Response)�get_netrc_auth)� getLogger)�ask� ask_input�ask_password�remove_auth_from_url�split_auth_netloc_from_url)�AuthInfo�*Keyring is skipped due to an exception: %s�url�username�returnc � � | rt sdS t j }t � d| � � || |� � }|�|j |j fS dS # t $ r Y nw xY w|r6t � d| � � t j | |� � }|r||fS nA# t $ r4}t � dt |� � � � da Y d}~nd}~ww xY wdS )z3Return the tuple auth for a given url from keyring.Nz'Getting credentials from keyring for %sz$Getting password from keyring for %sr )�keyring�get_credential�logger�debugr �password�AttributeError�get_password� Exception�warning�str)r r r �credr �excs ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/network/auth.py�get_keyring_authr&