관리-도구
편집 파일: sessions.cpython-312.pyc
� G��e�v � � � 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 ejh dk( r ejj Z6nej Z6efd�Z7efd�Z8 G d� d� Z9 G d� de9� Z:d� Z;y)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 � � |�| S | �|S t |t � rt | t � s| S |t |� � }|j t | � � |j � D ��cg c] \ }}|�� |�� }}}|D ] }||= � |S c c}}w )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` )� isinstancer r&