| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/requests/__pycache__/ |
Upload File : |
a
��Pe�v � @ sl d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl
mZ ddlm
Z
dd lmZmZmZmZ dd
lmZmZmZmZ ddlmZmZmZmZ ddlmZmZ dd
l m!Z!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3 ej4dk�r$ej5Z6nejZ6efdd�Z7efdd�Z8G dd� d�Z9G dd� de9�Z:dd� Z;dS )z�
requests.sessions
~~~~~~~~~~~~~~~~~
This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
� N)�OrderedDict)� timedelta� )�to_native_string)�HTTPAdapter)�_basic_auth_str)�Mapping� cookielib�urljoin�urlparse)�RequestsCookieJar�cookiejar_from_dict�extract_cookies_to_jar�
merge_cookies)�ChunkedEncodingError�ContentDecodingError�
InvalidSchema�TooManyRedirects)�
default_hooks�
dispatch_hook)�DEFAULT_REDIRECT_LIMIT�REDIRECT_STATI�PreparedRequest�Request)�codes)�CaseInsensitiveDict)
�
DEFAULT_PORTS�default_headers�get_auth_from_url�get_environ_proxies�get_netrc_auth�requote_uri�resolve_proxies�rewind_body�should_bypass_proxies�to_key_val_list�win32c C sp |du r| S | du r|S t |t�r,t | t�s0| S |t|��}|�t| �� dd� |�� D �}|D ]
}||= q`|S )z�Determines appropriate setting for a given request, taking into account
the explicit setting on that request, and the setting in the session. If a
setting is a dictionary, they will be merged together using `dict_class`
Nc S s g | ]\}}|d u r|�qS �N� )�.0�k�vr( r( �5/usr/lib/python3.9/site-packages/requests/sessions.py�
<listcomp>T � z!merge_setting.<locals>.<listcomp>)�
isinstancer r% �update�items)Zrequest_settingZsession_setting�
dict_classZmerged_settingZ none_keys�keyr( r( r, �
merge_setting= s ��r4 c C s@ |du s|� d�g kr| S | du s0| � d�g kr4|S t| ||�S )z�Properly merges both requests and session hooks.
This is necessary because when request_hooks == {'response': []}, the
merge breaks Session hooks entirely.
N�response)�getr4 )Z
request_hooksZ
session_hooksr2 r( r( r, �merge_hooks[ s
r7 c @ s>