B š•Re„- ã @ s( d Z ddlZddlmZmZ ddlmZ ddlmZ ddl mZmZm Z mZmZ ddlmZ er¦ddlmZmZmZmZmZ dd lmZ dd lmZmZ eeeef Ze e ¡Z!yddl"a"W nN e#k rÔ da"Y n8 e$k r Z% ze! &dee%ƒ¡ da"W ddZ%[%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)ÚDictÚOptionalÚTupleÚListÚAny)ÚAuthInfo)ÚResponseÚRequestz*Keyring is skipped due to an exception: %sc C s | rt sdS yzy t j}W n tk r, Y n0X t d| ¡ || |ƒ}|dk rX|j|jfS dS |r„t d| ¡ t | |¡}|r„||fS W n6 tk r¼ } zt dt |ƒ¡ da W dd}~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 %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-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/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&