관리-도구
편집 파일: utils.cpython-39.pyc
a ��Re�z � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZ ddlmZ ddlmZ ddlmZ dd lmZ dd lmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% ddl&m'Z' ddl(m)Z) dd l*m+Z+m,Z,m-Z-m.Z. dZ/e�0� Z1ddd�Z2d�3e�4dedd�d ��Z5ej6dk�rbdd� Z7dd� Zdd� Z8dd� Z9dqd!d"�Z:d#d$� Z;d%d&� Z<ej=d'd(� �Z>d)d*� Z?d+d,� Z@d-d.� ZAd/d0� ZBdrd1d2�ZCd3d4� ZDd5d6� ZEd7d8� ZFd9d:� ZGd;d<� ZHd=d>� ZId?d@� ZJdAdB� ZKeLdC�ZMdDdE� ZNdFdG� ZOdHdI� ZPdJdK� ZQdLdM� ZRdNdO� ZSej=dPdQ� �ZTdRdS� ZUdsdTdU�ZVdVdW� ZWdtdYdZ�ZXd[d\� ZYd]d^� ZZd_�[d`�Z\e\da Z]e\db Z^dcdd� Z_dedf� Z`dgdh� Zae�bdi�Zce�bdj�Zddkdl� Zedmdn� Zfdodp� ZgdS )uz� requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. � N)�OrderedDict)�make_headers� ��__version__)�certs)�to_native_string)�parse_http_list)�quote�urlparse�bytes�str�unquote� getproxies�proxy_bypass� urlunparse� basestring� integer_types�is_py3�proxy_bypass_environment�getproxies_environment�Mapping��cookiejar_from_dict)�CaseInsensitiveDict)� InvalidURL� InvalidHeader�FileModeWarning�UnrewindableBodyError)z.netrc�_netrc�P i� )�http�httpsz, z,\s*T)�accept_encodingzaccept-encoding�win32c C s� zt rdd l}ndd l}W n ty. Y dS 0 z6|�|jd�}t|�|d�d �}|�|d�d }W n tyz Y dS 0 |r�|s�dS |� d�}|D ]T}|dkr�d| vr� d S |� dd �}|� dd�}|� d d�}t�|| tj �r� d S q�dS )Nr Fz;Software\Microsoft\Windows\CurrentVersion\Internet SettingsZProxyEnableZ ProxyOverride�;z<local>�.Tz\.�*z.*�?)r �winreg�_winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError�split�replace�re�match�I)�hostr) ZinternetSettingsZproxyEnableZ proxyOverride�test� r8 ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/requests/utils.py�proxy_bypass_registry6 sF ����� 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: )r6 r8 r8 r9 r ] s r c C s t | d�r| �� } | S )z/Returns an internal sequence dictionary update.�items)�hasattrr; )�dr8 r8 r9 �dict_to_sequencei s r>