관리-도구
편집 파일: utils.cpython-38.pyc
U ʗRe � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZmZ ddlmZ ddlmZ ddlmZmZ dd lmZmZmZmZmZmZ dd lmZ ddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& ddl'm(Z( dd l)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/ dZ0e�1� Z2ddd�Z3d�4e�5dedd�d ��Z6ej7dk�rndd� Z8dd� Z dd� Z9dd � Z:dtd"d#�Z;d$d%� Z<d&d'� Z=ej>d(d)� �Z?d*d+� Z@d,d-� ZAd.d/� ZBd0d1� ZCdud2d3�ZDd4d5� ZEd6d7� ZFd8d9� ZGd:d;� ZHd<d=� ZId>d?� ZJd@dA� ZKdBdC� ZLeMdD�ZNdEdF� ZOdGdH� ZPdIdJ� ZQdKdL� ZRdMdN� ZSdOdP� ZTej>dQdR� �ZUdSdT� ZVdvdUdV�ZWdWdX� ZXdwdYdZ�ZYdxd\d]�ZZd^d_� Z[d`da� Z\db�]dc�Z^e^dd Z_e^de Z`dfdg� Zadhdi� Zbdjdk� Zcdldm� Zddndo� Zedpdq� Zfdrds� ZgdS )yz� requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. � N)�OrderedDict)�make_headers� parse_url� )�certs��__version__)�HEADER_VALIDATORS�to_native_string)�Mapping� basestring�bytes� getproxies�getproxies_environment� integer_types)�parse_http_list)�proxy_bypass�proxy_bypass_environment�quote�str�unquote�urlparse� urlunparse��cookiejar_from_dict)�FileModeWarning� InvalidHeader� InvalidURL�UnrewindableBodyError)�CaseInsensitiveDict)z.netrc�_netrc�P i� )�http�httpsz, z,\s*T)�accept_encodingzaccept-encoding�win32c C s� zdd l }W n tk r" Y dS X z6|�|jd�}t|�|d�d �}|�|d�d }W n ttfk rt Y dS X |r~|s�dS |�d�}|D ]T}|dkr�d| kr� d S |� dd �}|� dd�}|� d d�}t �|| t j�r� d S q�dS )Nr Fz;Software\Microsoft\Windows\CurrentVersion\Internet SettingsZProxyEnableZ ProxyOverride�;z<local>�.Tz\.�*z.*�?) �winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError� ValueError�split�replace�re�match�I)�hostr* ZinternetSettingsZproxyEnableZ proxyOverride�test� r9 ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/requests/utils.py�proxy_bypass_registryG s4 � r; c C s t � rt| �S t| �S dS )z�Return True, if the host should be bypassed. Checks proxy settings gathered from the environment, if specified, or the registry. N)r r r; )r7 r9 r9 r: r k s r c C s t | d�r| �� } | S )z/Returns an internal sequence dictionary update.�items)�hasattrr<