U ÀÒ.eÞ' ã @ sÌ d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z mZmZ ddl mZ ddlmZ ddlmZ d Zd Zdd„ ZG d d„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZdS )z] requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. é N)Ú b64encodeé )ÚurlparseÚstrÚ basestring)Úextract_cookies_to_jar)Úto_native_string)Úparse_dict_headerz!application/x-www-form-urlencodedzmultipart/form-datac C s– t | tƒs&tjd | ¡td� t| ƒ} t |tƒsLtjd |¡td� t|ƒ}t | tƒr`| d¡} t |tƒrt| d¡}dtt d | |f¡ƒ ¡ ƒ }|S )zReturns a Basic Auth string.z·Non-string usernames will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({!r}) to a string or bytes object in the near future to avoid problems.)Úcategoryz·Non-string passwords will no longer be supported in Requests 3.0.0. Please convert the object you've passed in ({!r}) to a string or bytes object in the near future to avoid problems.Úlatin1zBasic ó :)Ú isinstancer ÚwarningsÚwarnÚformatÚDeprecationWarningr Úencoder r ÚjoinÚstrip)ÚusernameÚpasswordZauthstr© r ú=/usr/lib/python3.8/site-packages/pip/_vendor/requests/auth.pyÚ_basic_auth_str s0 ýû ýû ÿr c @ s e Zd ZdZdd„ ZdS )ÚAuthBasez4Base class that all auth implementations derive fromc C s t dƒ‚d S )NzAuth hooks must be callable.)ÚNotImplementedError©ÚselfÚrr r r Ú__call__K s zAuthBase.__call__N©Ú__name__Ú __module__Ú__qualname__Ú__doc__r r r r r r H s r c @ s0 e Zd ZdZdd„ Zdd„ Zdd„ Zdd „ Zd S )Ú HTTPBasicAuthz?Attaches HTTP Basic Authentication to the given Request object.c C s || _ || _d S ©N)r r ©r r r r r r Ú__init__R s zHTTPBasicAuth.__init__c C s( t | jt|dd ƒk| jt|dd ƒkgƒS ©Nr r ©Úallr Úgetattrr ©r Úotherr r r Ú__eq__V s þzHTTPBasicAuth.__eq__c C s | |k S r&