3 ”Re„- ã @ s( d Z ddlZddlmZmZ ddlmZ ddlmZ ddl mZmZm Z mZmZ ddlmZ er¦ddlmZmZmZmZmZ dd lmZ dd lmZmZ eeeef Zeje ƒZ!yddl"a"W nN e#k rÔ da"Y n8 e$k �r Z% ze!j&dee%ƒƒ da"W Y ddZ%[%X 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)ÚDictÚOptionalÚTupleÚListÚAny)ÚAuthInfo)ÚResponseÚRequestz*Keyring is skipped due to an exception: %sc C sÆ | st rdS yzy t j}W n tk r0 Y n0X tjd| ƒ || |ƒ}|dk r\|j|jfS dS |rˆtjd| ƒ t j| |ƒ}|rˆ||fS W n6 tk rÀ } ztj dt |ƒƒ da W Y dd}~X nX dS )z3Return the tuple auth for a given url from keyring.Nz'Getting credentials from keyring for %sz$Getting password from keyring for %sz*Keyring is skipped due to an exception: %s)ÚkeyringÚget_credentialÚAttributeErrorÚloggerÚdebugÚusernameÚpasswordÚget_passwordÚ ExceptionÚwarningÚstr)Úurlr r Úcredr Úexc© r" ú‰/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/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&