%PDF- %PDF-
Direktori : /lib/python3/dist-packages/httplib2/__pycache__/ |
Current File : //lib/python3/dist-packages/httplib2/__pycache__/__init__.cpython-312.pyc |
� ZճcA � � � d Z dZdZg d�ZdZdZddlZddlZddlZddl Z ddl Z ddl mZ ddlZ ddl Z ddlZdd lmZ ddlZdd lmZ ddlmZ ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl!Z!ddl"Z#ddl$Z$ ddl%Z%ddl'm(Z( ddl)� ddl*m*Z* d� Z+g d�Z,dZ-dZ.dZ/g d�Z0dZ1 e2d� Z3ddl4m5Z5 e5jl � Z7 e8edd� xs e8ed� Z9 dQd�Z:d� Z;d� Z< ejz d� Z>d� Z?d � Z@ ejz d!� ZA ejz d"ej� � ZCd#� ZD ejz d$� ZEd%� ZFd&� ZGd'� ZHdZId(� ZJd)� ZKd*� ZLd+� ZMd,� ZNd-� ZO G d.� d/eP� ZQ G d0� d1eQ� ZR G d2� d3eQ� ZS G d4� d5eQ� ZT G d6� d7eQ� ZU G d8� d9eQ� ZVeReUeSeTeVd:�ZWg d;�ZX G d<� d=eP� ZY G d>� d?eP� ZZ G d@� dAeZ� Z[ G dB� dCeP� Z\ G dD� dEeP� Z]dRdF�Z^dSdG�Z_ G dH� dIej� j� � Zb G dJ� dKej� j� � ZdebeddL�Ze G dM� dNeP� Zf G dO� dPeg� Zhy# e&$ r dd l'm%Z% Y ���w xY w)Tz+Small, fast HTTP client library for Python.z!Joe Gregorio (joe@bitworking.org)zCopyright 2006, Joe Gregorio) �!Thomas Broyer (t.broyer@ltgt.net)zJames AntillzXavier Verges FarrerozJonathan FeinbergzBlair ZajaczSam RubyzLouis NyffeneggerzMark PilgrimzAlex Yu�MITz0.20.4� N)�header)�gettext)�md5)�sha1� )�socks)�auth)�*)�iri2uric �Z � t t d� r| d uxr | t j uS | d uS )N�_GLOBAL_DEFAULT_TIMEOUT)�hasattr�socketr )�timeouts �3/usr/lib/python3/dist-packages/httplib2/__init__.py�has_timeoutr 9 s3 � ��v�0�1��d�"�T�w�f�6T�6T�'T�T��$��� )� debuglevel�FailedToDecompressContent�Http� HttpLib2Error� ProxyInfo� RedirectLimit�RedirectMissingLocation�Response�RETRIES�"UnimplementedDigestAuthOptionError�&UnimplementedHmacDigestAuthOptionError� � )� connectionz keep-alivezproxy-authenticatezproxy-authorization�te�trailers�transfer-encoding�upgrade)�GET�HEAD�OPTIONS�TRACE)�, �- �. �/ i3 �4 )�certs�PROTOCOL_TLS�PROTOCOL_SSLv23c �\ � t t d� st d� �t j t � }| rt j nt j |_ |�It |d� r2t |t � rt t j |� }||_ nt d� �|�It |d� r2t |t � rt t j |� }||_ nt d� �t |d� r| |_ |j |� |r|j! |||� |S )N� SSLContextz0httplib2 requires Python 3.2+ for ssl.SSLContext�maximum_versionzHsetting tls_maximum_version requires Python 3.7 and OpenSSL 1.1 or newer�minimum_versionzHsetting tls_minimum_version requires Python 3.7 and OpenSSL 1.1 or newer�check_hostname)r �ssl�RuntimeErrorr5 �DEFAULT_TLS_VERSION� CERT_NONE� CERT_REQUIRED�verify_mode� isinstance�str�getattr� TLSVersionr6 r7 r8 �load_verify_locations�load_cert_chain)�"disable_ssl_certificate_validation�ca_certs� cert_file�key_filer6 r7 �key_password�contexts r �_build_ssl_contextrK � s � � �3��%��M�N�N��n�n�0�1�G�+M�#�-�-�SV�Sd�Sd�G�� �"��7�-�.��/�3�/�")�#�.�.�/�"J��&5�G�#��i�j�j��"��7�-�.��/�3�/�")�#�.�.�/�"J��&5�G�#��i�j�j� �w�(�)�%G�!G����!�!�(�+����� �8�\�B��Nr c �$ � t t � }|j | j dd� j d� D �cg c] }|j � �� c}� t | j � � D �cg c] }||vs�|�� c}S c c}w c c}w )Nr# � �,)�list� HOP_BY_HOP�extend�get�split�strip�keys)�response�hopbyhop�xr s r �_get_end2end_headersrY � sk � ��J��H��O�O����\�2�(F�(L�(L�S�(Q�R�1�Q�W�W�Y�R�S�!%�h�m�m�o�!6�Q�v�&��:P�F�Q�Q�� S��Qs �B�7 B �B c � � t | j � dkD rLt | j d t j � r| j d j S | j S t | d� rX| j }t |j d t j � r|j d j S |j S y )Nr � socket_err)�len�argsr? r �error�errnor r[ )�e�e_ints r �_errno_from_exceptionrb � s� � � �1�6�6�{�Q��",�Q�V�V�A�Y����"E�q�v�v�a�y���R�1�7�7�R� �q�,������&0����A�����&M�u�z�z�!�}�"�"�^�SX�S^�S^�^�r z9^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?c �t � t j | � j � }|d |d |d |d |d fS )z�Parses a URI using the regex given in Appendix B of RFC 3986. (scheme, authority, path, query, fragment) = parse_uri(uri) r � � � � )�URI�match�groups)�urirj s r � parse_urirl � s? � � �Y�Y�s�^� "� "� $�F��1�I�v�a�y�&��)�V�A�Y��q� �B�Br c � � t | � \ }}}}}|r|st d| z � �|j � }|j � }|sd}|xr dj ||g� xs |}|j � }|dz |z |z }||||fS )Nz(Only absolute URIs are allowed. uri = %s�/�?z://)rl �RelativeURIError�lower�join)rk �scheme� authority�path�query�fragment�request_uri� defrag_uris r �urlnormrz � s� � �1:�3��.�V�Y��e�X����I�C�O�P�P����!�I� �\�\�^�F���� �3�C�H�H�d�E�]�3�;�t�K� �\�\�^�F��%��)�+�k�9�J��9�k�:�5�5r z^\w+://z[^\w\-_.()=!]+c �& � t | t � r| }| j d� } n| j d� }t |� j � }t j d| � } t j d| � } | dd } dj | |f� S )z�Return a filename suitable for the cache. Strips dangerous and common characters to create a filename we can use to store the cache in. �utf-8rM N�Z rN ) r? �bytes�decode�encode�_md5� hexdigest� re_url_scheme�sub� re_unsaferr )�filename�filename_bytes�filemd5s r �safenamer� � s� � � �(�E�"�!���?�?�7�+��!����1���>�"�,�,�.�G�� � ��X�.�H��}�}�R��*�H� ���}�H��8�8�X�w�'�(�(r z(?:\r\n)?[ \t]+c �� � t | j � D ��cg c]K \ }}t |� j � t j t |� d� j � f��M c}}� S c c}}w )N� )�dict�items�_convert_byte_strrq �NORMALIZE_SPACEr� rT )�headers�key�values r �_normalize_headersr� sg � �� !(� � �� ���e� �s� #� )� )� +�_�-@�-@�AR�SX�AY�[^�-_�-e�-e�-g�i� �� �� s �AA1 c �>