U ʗRe' @ s d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z ddlmZm Z mZ ddlmZ ddlmZ d Zd Zdd ZG d d dZG dd deZG dd deZG dd deZdS )z] requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. N) b64encode )to_native_string) basestringstrurlparse)extract_cookies_to_jar)parse_dict_headerz!application/x-www-form-urlencodedzmultipart/form-datac C s t | ts&tjd| td t| } t |tsPtjdt|td t|}t | trd| d} t |trx|d}dt t d| |f }|S )zReturns a Basic Auth string.zNon-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.)categoryzNon-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 warningswarnformatDeprecationWarningr typeencoder r joinstrip)usernamepasswordauthstr r /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/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 dd S )NzAuth hooks must be callable.)NotImplementedErrorselfrr r r __call__H s zAuthBase.__call__N__name__ __module____qualname____doc__r! r r r r r E 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__O s zHTTPBasicAuth.__init__c C s( t | jt|dd k| jt|dd kgS Nr r allr getattrr r otherr r r __eq__S s zHTTPBasicAuth.__eq__c C s | |k S r( r r/ r r r __ne__[ s zHTTPBasicAuth.__ne__c C s t | j| j|jd<