HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/botocore/__pycache__/compat.cpython-36.pyc
3

�T_�-�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZeje�Zej�r�ddlmZGdd	�d	ej�Zdd
lmZddlmZddlmZdd
lmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddl%m&Z&ddl'm(Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/e)Z0e1Z1eZ2dd�Z3dd�Z4dDdd�Z5dEd!d"�Z6�ndd
l7mZddl7mZddl7mZdd
l7mZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$dd#l8m9Z9ddl:m-Z-e;Z0dd$l.m<Z1dd%l.m=Z/ddl>m&Z&dd&l*m?Z+Gd'd	�d	e9�ZdFd(d)�Z2d*d�Z3d+d�Z4dGd,d�Z5dHd-d"�Z6dd.l@mAZAyddlBjCjDZEWn"eFk
�r�ddlGjCjHZEYnXeEjIZJddlKZKd/d0�ZLeMd1d2��ZNeMd3d4��ZOeNe_NeOe_Od5d6�ZPd7d8�ZQyejR�d9ZSWneTk
�rJd:ZSYnXd;d<�ZUdId=d>�ZVd?d@�ZWdAdB�ZXyddClYmZZZWn"eFk
�r�ddCl@mZZZYnXdS)J�N)�floor)�six)�MD5UnavailableError)�tzlocal)�
exceptions)�http_clientc@seZdZdS)�HTTPHeadersN)�__name__�
__module__�__qualname__�rr�/usr/lib/python3.6/compat.pyr#sr)�quote)�	urlencode)�unquote)�unquote_plus)�urlparse)�urlsplit)�
urlunsplit)�urljoin)�	parse_qsl)�parse_qs)�HTTPResponse)�IOBase)�encodebytes)�
formatdate)�zip_longestcCs|jjjjj|�dS)z�Set the timeout of the socket from an HTTPResponse.

        :param http_response: An instance of ``httplib.HTTPResponse``

        N)�_fp�fp�raw�_sock�
settimeout)�
http_response�timeoutrrr
�set_socket_timeout=sr$cCstj|�dS)N�)�inspectZgetfullargspec)�funcrrr
�accepts_kwargsEsr(cCs|S)Nr)�s�encoding�errorsrrr
�ensure_unicodeJsr,�utf-8�strictcCs8t|t�r|j||�St|t�r$|Stdt|���dS)Nz#Expected str or bytes, received %s.)�
isinstance�str�encode�bytes�
ValueError�type)r)r*r+rrr
�ensure_bytesNs


r5)�Message)�izip)�izip_longest)�encodestringc@seZdZdd�ZdS)rccsx|jD]\}}|VqWdS)N)Z_headers)�selfZfield�valuerrr
�__iter__lszHTTPHeaders.__iter__N)r	r
rr<rrrr
rhscCs|j|�}t|�j|�S)N)r1r�decode)r;r*Zbyte_stringrrr
�unquote_strps
r>cCs|jjjj|�dS)z�Set the timeout of the socket from an HTTPResponse.

        :param http_response: An instance of ``httplib.HTTPResponse``

        N)rrr r!)r"r#rrr
r$zscCstj|�dS)Nr%)r&Z
getargspec)r'rrr
r(�scCst|tj�r|St|||�S)N)r/rZ	text_type�unicode)r)r*r+rrr
r,�scCs8t|t�r|j||�St|t�r$|Stdt|���dS)Nz%Expected str or unicode, received %s.)r/r?r1r0r3r4)r)r*r+rrr
r5�s


)�OrderedDictcCstjddtjdd�dS)N�ignorez+A true SSLContext object is not available.*z.*urllib3\.util\.ssl_)�message�category�module)�warnings�filterwarningsrZInsecurePlatformWarningrrrr
�filter_ssl_warnings�s
rGcCs(|�}x|j�D]\}}|||<qW|S)N)�items)�cls�d�new_instance�keyr;rrr
�	from_dict�srMcCs$|�}x|D]\}}|||<qW|S)Nr)rIZpairsrKrLr;rrr
�
from_pairs�srNcCstj|�}|S)zI
    This used to be a compat shim for 2.6 but is now just an alias.
    )�copy)�kwargs�copy_kwargsrrr
rQ�s
rQcCs|j�S)z�
    Returns the total seconds in a ``datetime.timedelta``.

    This used to be a compat shim for 2.6 but is now just an alias.

    :param delta: The timedelta object
    :type delta: ``datetime.timedelta``
    )�
total_seconds)Zdeltarrr
rR�s	rRTFcOstrtj||�St��dS)a�
    Attempts to get an md5 hashing object.

    :param raise_error_if_unavailable: raise an error if md5 is unavailable on
        this system. If False, None will be returned if it is unavailable.
    :type raise_error_if_unavailable: bool
    :param args: Args to pass to the MD5 constructor
    :param kwargs: Key word arguments to pass to the MD5 constructor
    :return: An MD5 hashing object if available. If it is unavailable, None
        is returned if raise_error_if_unavailable is set to False.
    N)�
MD5_AVAILABLE�hashlib�md5r)�argsrPrrr
�get_md5�srWcCs,|dkrtj}|dkrt|�Stj|�SdS)N�win32)�sys�platform�_windows_shell_split�shlex�split)r)rZrrr
�compat_shell_split�s
r^cCs>|sgSg}g}d}d}x�|D]�}|dkr4|d7}q|dkr�|dkr~|jdtt|d���|d}d}|dkr~|jd�q|}|jd�q|dkr�|r�|dkr�|jd|�d}|r�|jdj|��g}q|dkr�|jd|�d}|j|�qW|�rtd
|��|dk�r$|jd|�|�r:|jdj|��|S)aSplits up a windows command as the built-in command parser would.

    Windows has potentially bizarre rules depending on where you look. When
    spawning a process via the Windows C runtime (which is what python does
    when you call popen) the rules are as follows:

    https://docs.microsoft.com/en-us/cpp/cpp/parsing-cpp-command-line-arguments

    To summarize:

    * Only space and tab are valid delimiters
    * Double quotes are the only valid quotes
    * Backslash is interpreted literally unless it is part of a chain that
      leads up to a double quote. Then the backslashes escape the backslashes,
      and if there is an odd number the final backslash escapes the quote.

    :param s: The command string to split up into parts.
    :return: A list of command components.
    Fr�\��"r%�� �	z"No closing quotation in string: %s)rcrd)�append�intr�joinr3)r)Z
componentsZbuffZ	is_quotedZnum_backslashes�	characterZ	remainderrrr
r[�sJ



r[cCs(tjdkrddlm}t|fStfSdS)NrXr)�
tzwinlocal)rYrZ�dateutil.tzrir)rirrr
�get_tzinfo_optionsQs
rk)�MutableMapping)NN)r-r.)r-)r-r.)r-r.)N)[rOZdatetimerYr&rErTZloggingr\ZmathrZbotocore.vendoredrZbotocore.exceptionsrrjrZurllib3rZ	getLoggerr	ZloggerZPY3Zbotocore.vendored.six.movesrZHTTPMessagerZurllib.parserrrrrrrrrrZhttp.clientr�ior�_IOBase�base64rZemail.utilsr�	itertoolsrZ	file_type�zipr>r$r(r,r5ZurllibZ
email.messager6Zemail.Utils�filer7r8Zhttplibr9�collectionsr@Zxml.etree.cElementTreeZetreeZcElementTreeZETree�ImportErrorZxml.etree.ElementTreeZElementTreeZ
ParseErrorZ
XMLParseErrorZjsonrG�classmethodrMrNrQrRrUrSr3rWr^r[rk�collections.abcrlrrrr
�<module>s�





	


^