관리-도구
편집 파일: utils.cpython-312.pyc
� G��e�� � �Z � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZmZ ddlmZ ddlmZ ddlmZmZmZmZ dd lmZmZmZmZmZmZ dd lm Z! 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/ ddl0m1Z1 dZ2 ejf � Z4ddd�Z5djm ejn d ed�� d � � Z8ejr dk( rd� Z:d� Z"d� Z;d� Z<dHd�Z=d� Z>d� Z?ej� d � � ZAd!� ZBd"� ZCd#� ZDd$� ZEdHd%�ZFd&� ZGd'� ZHd(� ZId)� ZJd*� ZKd+� ZLd,� ZMd-� ZN eOd.� ZPd/� ZQd0� ZRd1� ZSd2� ZTd3� ZUd4� ZVej� d5� � ZWd6� ZXdId7�ZYd8� ZZdJd9�Z[dKd:�Z\d;� Z]d<� Z^d=j� d>� Z`e`d?z Zae`d@z ZbdA� ZcdB� ZddC� ZedD� ZfdE� ZgdF� ZhdG� Ziy)Lz� 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_BYTE�_HEADER_VALIDATORS_STR�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 � � dd l } |j |j d� }t |j |d� d � }|j |d� d }|r|sy|j d� }|D ]j }|dk( rd| vr y |j dd � }|j dd� }|j d d� }t j || t j � s�j y y# t $ r Y yw xY w# t t f$ r Y yw xY w)Nr Fz;Software\Microsoft\Windows\CurrentVersion\Internet Settings�ProxyEnable� ProxyOverride�;z<local>�.Tz\.�*z.*�?) �winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError� ValueError�split�replace�re�match�I)�hostr0 �internetSettings�proxyEnable� proxyOverride�tests ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/requests/utils.py�proxy_bypass_registryrC L s � � �� �%�~�~��(�(�N� �� �f�1�1�2B�M�R�ST�U�V�K�"�/�/�0@�/�R�ST�U�M� �-�� &�+�+�C�0� �!� �D��y� ��d�?���<�<��U�+�D��<�<��U�+�D��<�<��T�*�D��x�x��d�B�D�D�)�� � ��? � �� �� ��$� �� �s# �C �AC+ � C(�'C(�+C=�<C=c �B � 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 rC )r= s rB r r p s � � "�#�+�D�1�1�(��.�.� c �>