File: //opt/alt/python37/lib/python3.7/site-packages/requests/__pycache__/auth.cpython-37.pyc
B
;Ytv
(:� @ 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�sPtjd�t|��td� t|�}t | t�rd| �d�} t |t�rx|�d�}dt t
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 �type�encoder r �join�strip)�username�passwordZauthstr� r �>/opt/alt/python37/lib/python3.7/site-packages/requests/auth.py�_basic_auth_str s&