관리-도구
편집 파일: utils.cpython-310.pyc
o ƚ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 ��Z5ej6dkr�dd� 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� ZBdqd1d2�ZCd3d4� ZDd5d6� ZEd7d8� ZFd9d:� ZGd;d<� ZHd=d>� ZId?d@� ZJdAdB� ZKeLdC�ZMdDdE� ZNdFdG� ZOdHdI� ZPdJdK� ZQdLdM� ZRdNdO� ZSej=dPdQ� �ZTdRdS� ZUdrdTdU�ZVdVdW� ZWdsdYdZ�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 )tz� 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� z t rdd l}ndd l}W n ty Y dS w z|�|jd�}t|�|d�d �}|�|d�d }W n ty= Y dS w |rB|sDdS |� d�}|D ]*}|dkrXd| vrX d S |� dd �}|� dd�}|� d d�}t�|| tj �ru d S qKdS )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-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/requests/utils.py�proxy_bypass_registry6 sN �������� �r: c C s t � rt| �S t| �S )z�Return True, if the host should be bypassed. Checks proxy settings gathered from the environment, if specified, or the registry. )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>