"JdddlmZddlZddlZddlZejddkZereefZ dZ n9eZ ej j Z n)#e $r!ej ejdZ YnwxYwGddeddZGddeZdS) ) namedtupleNc"eZdZdZfdZxZS)ExtTypez'ExtType represents ext type in msgpack.c$t|tstdt|tstdd|cxkrdksnt dt t ||||S)Nzcode must be intzdata must be bytesrzcode must be 0~127) isinstanceint TypeErrorbytes ValueErrorsuperr__new__)clscodedata __class__s J/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/msgpack/ext.pyrzExtType.__new__s$$$ 0.// /$&& 2011 1DC122 2Wc""**3d;;;)__name__ __module__ __qualname____doc__r __classcell__)rs@rrrs>11<<<<<<<<<== =[****7****Q  &rcBd|j|jS)z#String representation of Timestamp.z'Timestamp(seconds={0}, nanoseconds={1}))formatrrr"s r__repr__zTimestamp.__repr__Es$8?? L$*   rcrt||jur |j|jko|j|jkSdS)z0Check for equality with another Timestamp objectF)typerrrr"others r__eq__zTimestamp.__eq__Ks= ;;$. ( (  -W$2BeFW2W urc.|| S)z(not-equals method (see :func:`__eq__()`))r,r*s r__ne__zTimestamp.__ne__Ss;;u%%%%rc8t|j|jfS)N)hashrrr&s r__hash__zTimestamp.__hash__WsT\4#34555rclt|dkrtjd|d}d}ntt|dkr&tjd|d}|dz}|dz }n;t|dkrtjd |\}}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)lenstructunpackr r)brrdata64s r from_byteszTimestamp.from_bytesZs q66Q;;mD!,,Q/GKK VVq[[]4++A.F11G B,KK VVr\\#)=#:#: KX +...rc|jdz dkrG|jdz|jz}|dzdkrtjd|}n6tjd|}n tjd|j|j}|S)zPack this Timestamp object into bytes. Used for pure-Python msgpack packing. :returns data: Payload for EXT message with code -1 (timestamp type) :rtype: bytes r7rlr4r6r9)rrr;pack)r"r>rs rto_byteszTimestamp.to_bytesus LB 1 $ $%+dl:F**a//{400{400;ud&6 EED rcpt|dz}t|dzdz}t||S)zCreate a Timestamp from posix timestamp in seconds. :param unix_float: Posix timestamp in seconds. :type unix_float: int or float. r )r r)unix_secrrs r from_unixzTimestamp.from_unixs;h!m$$8a<7233 +...rc&|j|jdz zS)znGet the timestamp as a floating-point value. :returns: posix timestamp :rtype: float geArrr&s rto_unixzTimestamp.to_unixs |d.444rc0tt|dS)zCreate a Timestamp from posix timestamp in nanoseconds. :param int unix_ns: Posix timestamp in nanoseconds. :rtype: Timestamp r )rdivmod)unix_nss rfrom_unix_nanozTimestamp.from_unix_nanos&'2233rc&|jdz|jzS)z~Get the timestamp as a unixtime in nanoseconds. :returns: posix timestamp in nanoseconds :rtype: int r rHr&s r to_unix_nanozTimestamp.to_unix_nanos |g%(888rctjdttj|zS)zlGet the timestamp as a UTC datetime. Python 2 is not supported. :rtype: datetime. r)r)datetime fromtimestamp_utc timedeltarIr&s r to_datetimezTimestamp.to_datetimesC ..q$77(:LLLNN; ; ;   rcZt|S)zuCreate a Timestamp from datetime with tzinfo. Python 2 is not supported. :rtype: Timestamp )rrF timestamp)dts r from_datetimezTimestamp.from_datetimes ""2<<>>222rN)r)rrrr __slots__r#r'r,r.r1 staticmethodr?rBrFrIrMrOrUrYrrrr"s"M*I''''0   &&&666//\/4*//\/55544\4999    33\333rr) collectionsrrQsysr; version_infoPY2r longr!rStimezoneutcAttributeErrorrTrobjectrr\rrrfs(""""""  qQ8d I DDI8 $ 888 x !3!3A!6!6778 < < < <