8flddlmZddlZddlZGddeddZGddZdS)) namedtupleNc"eZdZdZfdZxZS)ExtTypez'ExtType represents ext type in msgpack.ct|tstdt|tstdd|cxkrdksnt dt |||S)Nzcode must be intzdata must be bytesrzcode must be 0~127) isinstanceint TypeErrorbytes ValueErrorsuper__new__)clscodedata __class__s w/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/msgpack/ext.pyrzExtType.__new__ s$$$ 0.// /$&& 2011 1DC122 2wwsD$///)__name__ __module__ __qualname____doc__r __classcell__)rs@rrrs>11000000000rrz code dataceZdZdZddgZddZdZdZdZd Z e d Z d Z e d Z d Ze dZdZdZe dZdS) TimestampaVTimestamp 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 nanosecondsrct|tstdt|tstdd|cxkrdksntd||_||_dS)aInitialize 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 neg. seconds + pos. ns. zseconds must be an integerznanoseconds must be an integerrʚ;z?nanoseconds must be a non-negative integer less than 999999999.N)rr r r rr)selfrrs r__init__zTimestamp.__init__s'3'' :899 9+s++ ><== =[((((5((((^__ _ &rc(d|jd|jdS)z#String representation of Timestamp.zTimestamp(seconds=z, nanoseconds=)rrr s r__repr__zTimestamp.__repr__5s SDLSS@PSSSSrcrt||jur |j|jko|j|jkSdS)z0Check for equality with another Timestamp objectF)typerrrr others r__eq__zTimestamp.__eq__9s9 ;;$. ( (<5=0ZT5EIZ5Z Zurc.|| S)z(not-equals method (see :func:`__eq__()`))r+r)s r__ne__zTimestamp.__ne__?s;;u%%%%rc8t|j|jfS)N)hashrrr%s r__hash__zTimestamp.__hash__CsT\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_bytesFs 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 r6rlr3r5r8)rrr:pack)r r=rs rto_byteszTimestamp.to_bytesas 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_unixvs;h!m$$8a<5011 +...rc&|j|jdz zS)znGet the timestamp as a floating-point value. :returns: posix timestamp :rtype: float geAr$r%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&%0011rc&|jdz|jzS)z~Get the timestamp as a unixtime in nanoseconds. :returns: posix timestamp in nanoseconds :rtype: int rr$r%s r to_unix_nanozTimestamp.to_unix_nanos |e#d&666rctjj}tjd|tj|zS)zRGet the timestamp as a UTC datetime. :rtype: `datetime.datetime` r)r)datetimetimezoneutc fromtimestamp timedeltarG)r rQs r to_datetimezTimestamp.to_datetimesH # ..q#669KTXT`T`TbTb9c9c9cccrcZt|S)zQCreate a Timestamp from datetime with tzinfo. :rtype: Timestamp )rrE timestamp)dts r from_datetimezTimestamp.from_datetimes ""2<<>>222rN)r)rrrr __slots__r!r&r+r-r0 staticmethodr>rArErGrKrMrTrXrrrrs(M*I'''',TTT &&&666//\/4*//\/55522\2777ddd33\333rr) collectionsrrOr:rrr[rrr]s""""""  0 0 0 0 0jjK00 0 0 0U3U3U3U3U3U3U3U3U3U3r