PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/msgpack/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-39.pyc

a

��Re��@s�ddlmZddlZddlZddlZejddkZerDeefZ	dZ
n4eZ	zejjZ
Wn"e
yve�e�d��Z
Yn0Gdd�dedd��ZGdd�de�ZdS)	�)�
namedtupleN�cs eZdZdZ�fdd�Z�ZS)�ExtTypez'ExtType represents ext type in msgpack.csVt|t�std��t|t�s$td��d|kr8dksBntd��tt|��|||�S)Nzcode must be intzdata must be bytesr�zcode must be 0~127)�
isinstance�int�	TypeError�bytes�
ValueError�superr�__new__)�cls�code�data��	__class__���/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/msgpack/ext.pyrs

zExtType.__new__)�__name__�
__module__�__qualname__�__doc__r�
__classcell__rrrrrsrz	code datac@s�eZdZdZddgZd dd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
dd��Zdd�Ze
dd��Z
dd�Ze
dd��Zdd�Zdd�Ze
dd��ZdS)!�	TimestampaRTimestamp represents the Timestamp extension type in msgpack.

    When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`. When using pure-Python
    msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and unpack `Timestamp`.

    This class is immutable: Do not override seconds and nanoseconds.
    �seconds�nanosecondsrcCsRt|t�std��t|t�s$td��d|kr8dksBntd��||_||_dS)a�Initialize a Timestamp object.

        :param int seconds:
            Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
            May be negative.

        :param int nanoseconds:
            Number of nanoseconds to add to `seconds` to get fractional time.
            Maximum is 999_999_999.  Default is 0.

        Note: Negative times (before the UNIX epoch) are represented as negative seconds + positive ns.
        zseconds must be an intergerznanoseconds must be an integerr�ʚ;z?nanoseconds must be a non-negative integer less than 999999999.N)r�	int_typesrr
rr)�selfrrrrr�__init__-s

�zTimestamp.__init__cCsd�|j|j�S)z#String representation of Timestamp.z'Timestamp(seconds={0}, nanoseconds={1}))�formatrr�rrrr�__repr__Es�zTimestamp.__repr__cCs*t|�|jur&|j|jko$|j|jkSdS)z0Check for equality with another Timestamp objectF)�typerrr�r�otherrrr�__eq__Ks�zTimestamp.__eq__cCs|�|�S)z(not-equals method (see :func:`__eq__()`))r&r$rrr�__ne__SszTimestamp.__ne__cCst|j|jf�S)N)�hashrrr!rrr�__hash__WszTimestamp.__hash__cCs�t|�dkr"t�d|�d}d}nTt|�dkrPt�d|�d}|d@}|d?}n&t|�dkrnt�d	|�\}}ntd
��t||�S)aUnpack bytes into a `Timestamp` object.

        Used for pure-Python msgpack unpacking.

        :param b: Payload from msgpack ext message with code -1
        :type b: bytes

        :returns: Timestamp object unpacked from msgpack ext payload
        :rtype: Timestamp
        ��!Lr��!Ql���"��!IqzFTimestamp type can only be created from 32, 64, or 96-bit byte objects)�len�struct�unpackr
r)�brr�data64rrr�
from_bytesZs
�zTimestamp.from_bytescCs\|jd?dkrF|jd>|jB}|d@dkr8t�d|�}qXt�d|�}nt�d|j|j�}|S)z�Pack this Timestamp object into bytes.

        Used for pure-Python msgpack packing.

        :returns data: Payload for EXT message with code -1 (timestamp type)
        :rtype: bytes
        r.rl��r+r-r0)rrr2�pack)rr5rrrr�to_bytesuszTimestamp.to_bytescCs&t|d�}t|dd�}t||�S)z�Create a Timestamp from posix timestamp in seconds.

        :param unix_float: Posix timestamp in seconds.
        :type unix_float: int or float.
        �r)rr)�unix_secrrrrr�	from_unix�szTimestamp.from_unixcCs|j|jdS)znGet the timestamp as a floating-point value.

        :returns: posix timestamp
        :rtype: float
        ge��A�rrr!rrr�to_unix�szTimestamp.to_unixcCstt|d��S)z�Create a Timestamp from posix timestamp in nanoseconds.

        :param int unix_ns: Posix timestamp in nanoseconds.
        :rtype: Timestamp
        r)r�divmod)�unix_nsrrr�from_unix_nano�szTimestamp.from_unix_nanocCs|jd|jS)z~Get the timestamp as a unixtime in nanoseconds.

        :returns: posix timestamp in nanoseconds
        :rtype: int
        rr<r!rrr�to_unix_nano�szTimestamp.to_unix_nanocCstj�dt�tj|��d�S)zlGet the timestamp as a UTC datetime.

        Python 2 is not supported.

        :rtype: datetime.
        r)r)�datetime�
fromtimestamp�_utc�	timedeltar=r!rrr�to_datetime�s�zTimestamp.to_datetimecCst�|���S)zuCreate a Timestamp from datetime with tzinfo.

        Python 2 is not supported.

        :rtype: Timestamp
        )rr;�	timestamp)�dtrrr�
from_datetime�szTimestamp.from_datetimeN)r)rrrr�	__slots__rr"r&r'r)�staticmethodr6r8r;r=r@rArFrIrrrrr"s&




r)�collectionsrrB�sysr2�version_info�PY2r�longrrD�timezone�utc�AttributeErrorrEr�objectrrrrr�<module>s

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic