Hacked By AnonymousFox

Current Path : /proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyc

�
�Rec@s�ddlmZddlZddlZddlZejddkZerbeefZ	dZnBeZ	yejj
ZWn)ek
r�ejejd��ZnXdedd�fd��YZdefd	��YZdS(
i����(t
namedtupleNiitExtTypes	code datacBseZdZd�ZRS(s'ExtType represents ext type in msgpack.cCs�t|t�std��nt|t�s<td��nd|koSdknsgtd��ntt|�j|||�S(Nscode must be intsdata must be bytesiiscode must be 0~127(t
isinstancetintt	TypeErrortbytest
ValueErrortsuperRt__new__(tclstcodetdata((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyRs(t__name__t
__module__t__doc__R(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyRst	TimestampcBs�eZdZddgZdd�Zd�Zd�Zd�Zd�Ze	d	��Z
d
�Ze	d��Zd�Z
e	d
��Zd�Zd�Ze	d��ZRS(sRTimestamp 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.
    tsecondstnanosecondsicCs}t|t�std��nt|t�s<td��nd|koSdknsgtd��n||_||_dS(	s�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.
        sseconds must be an intergersnanoseconds must be an integerii
i	s?nanoseconds must be a non-negative integer less than 999999999.Niʚ;(Rt	int_typesRRRR(tselfRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt__init__-s
	cCsdj|j|j�S(s#String representation of Timestamp.s'Timestamp(seconds={0}, nanoseconds={1})(tformatRR(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt__repr__EscCs;t|�|jkr7|j|jko6|j|jkStS(s0Check for equality with another Timestamp object(ttypet	__class__RRtFalse(Rtother((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt__eq__Ks"cCs|j|�S(s(not-equals method (see :func:`__eq__()`)(R(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt__ne__SscCst|j|jf�S(N(thashRR(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt__hash__WscCs�t|�dkr1tjd|�d}d}nxt|�dkrptjd|�d}|d@}|d?}n9t|�dkr�tjd	|�\}}ntd
��t||�S(sUnpack 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
        is!Liis!QI����i"is!IqsFTimestamp type can only be created from 32, 64, or 96-bit byte objects(tlentstructtunpackRR(tbRRtdata64((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt
from_bytesZs	

	cCs�|jd?dkra|jd>|jB}|d@dkrLtjd|�}q|tjd|�}ntjd|j|j�}|S(s�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
        i"il��s!Ls!Qs!Iq(RRR tpack(RR#R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pytto_bytesuscCs1t|d�}t|dd�}t||�S(s�Create a Timestamp from posix timestamp in seconds.

        :param unix_float: Posix timestamp in seconds.
        :type unix_float: int or float.
        ii
i	iʚ;(RR(tunix_secRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt	from_unix�scCs|j|jdS(snGet the timestamp as a floating-point value.

        :returns: posix timestamp
        :rtype: float
        ge��A(RR(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pytto_unix�scCstt|d��S(s�Create a Timestamp from posix timestamp in nanoseconds.

        :param int unix_ns: Posix timestamp in nanoseconds.
        :rtype: Timestamp
        i
i	iʚ;(Rtdivmod(tunix_ns((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pytfrom_unix_nano�scCs|jd|jS(s~Get the timestamp as a unixtime in nanoseconds.

        :returns: posix timestamp in nanoseconds
        :rtype: int
        i
i	iʚ;(RR(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pytto_unix_nano�scCstjj|j�t�S(slGet the timestamp as a UTC datetime.

        Python 2 is not supported.

        :rtype: datetime.
        (tdatetimet
fromtimestampR)t_utc(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pytto_datetime�scCstj|j��S(suCreate a Timestamp from datetime with tzinfo.

        Python 2 is not supported.

        :rtype: Timestamp
        (RR(t	timestamp(tdt((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt
from_datetime�s(RR
Rt	__slots__RRRRRtstaticmethodR$R&R(R)R,R-R1R4(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyR"s										(tcollectionsRR.tsysR tversion_infotPY2RtlongRtNoneR0ttimezonetutctAttributeErrort	timedeltaRtobjectR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/msgpack/ext.pyt<module>s	


Hacked By AnonymousFox1.0, Coded By AnonymousFox