관리-도구
편집 파일: auth.cpython-38.opt-1.pyc
U ��.eo+ � @ s d Z ddlZddlmZmZ ddlmZ ddlmZ ddl mZmZm Z mZmZ ddlmZ er�ddlmZ dd lmZmZmZ dd lmZ eeeef Ze�e�ZzddlZW nL e k r� dZY n6 e!k r� Z" ze�#dee"�� dZW 5 dZ"["X Y nX dd � Z$G dd� de�Z%dS )z�Network Authentication Helpers Contains interface (MultiDomainBasicAuth) and associated glue code for providing credentials in the context of network requests. � N)�AuthBase� HTTPBasicAuth)�get_netrc_auth)�parse)�ask� ask_input�ask_password�remove_auth_from_url�split_auth_netloc_from_url)�MYPY_CHECK_RUNNING)�Values)�Dict�Optional�Tuple)�AuthInfo�*Keyring is skipped due to an exception: %sc C s� | rt sdS z�z t j}W n tk r, Y n4X t�d| � || |�}|dk rZ|j|jfW S W dS |r�t�d| � t �| |�}|r�||fW S W n2 tk r� } zt� dt |�� W 5 d}~X Y nX dS )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�AttributeError�logger�debug�username�passwordZget_password� Exception�warning�str)�urlr r Zcredr �exc� r �>/usr/lib/python3.8/site-packages/pip/_internal/network/auth.py�get_keyring_auth. s, �r c @ s` e Zd Zddd�Zdd� Zddd�Zd d � Zdd� Zd d� Zdd� Z dd� Z dd� Zdd� ZdS )�MultiDomainBasicAuthTNc C s || _ || _i | _d | _d S )N)� prompting� index_urls� passwords�_credentials_to_save)�selfr"