intellecton/venv/lib/python3.12/site-packages/msgpack/__pycache__/ext.cpython-312.pyc

78 lines
8.1 KiB
Text
Raw Normal View History

<EFBFBD>
K<>j^<00><00>X<00>ddlZddlZddlmZGd<03>dedd<05><00>ZGd<06>d<07>Zy)<08>N)<01>
namedtuplec<00>"<00><00>eZdZdZ<03>fd<02>Z<04>xZS)<03>ExtTypez'ExtType represents ext type in msgpack.c<00><><00><01>t|t<00>s td<01><00>t|t<00>s td<02><00>d|cxkrdkst d<05><00>t d<05><00>t
<00>|<00>|||<02>S)Nzcode must be intzdata must be bytesr<00>zcode must be 0~127)<07>
isinstance<EFBFBD>int<6E> TypeError<6F>bytes<65>
ValueError<EFBFBD>super<65>__new__)<04>cls<6C>code<64>data<74> __class__s <20><>N/home/antigravity/intellecton/venv/lib/python3.12/site-packages/msgpack/ext.pyrzExtType.__new__ sl<00><><00><19>$<24><03>$<24><1B>.<2E>/<2F> /<2F><19>$<24><05>&<26><1B>0<>1<> 1<><10>D<EFBFBD><1F>C<EFBFBD><1F><1C>1<>2<> 2<> <20><1C>1<>2<> 2<><14>w<EFBFBD><EFBFBD>s<EFBFBD>D<EFBFBD>$<24>/<2F>/<2F>)<06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r<00> __classcell__)rs@rrrs<00><><00>1<>0<>0rrz code datac<00><><00>eZdZdZddgZdd<04>Zd<05>Zd<06>Zd<07>Zd<08>Z e
d <09><00>Z d
<EFBFBD>Z e
d <0B><00>Z d <0C>Ze
d <0A><00>Zd<0E>Zd<0F>Ze
d<10><00>Zy)<13> 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.
<20>seconds<64> nanosecondsc<00><><00>t|t<00>s td<01><00>t|t<00>s td<02><00>d|cxkrdkstd<05><00>td<05><00>||_||_y)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 neg. seconds + pos. ns.
zseconds must be an integerznanoseconds must be an integerr<00>ʚ;z?nanoseconds must be a non-negative integer less than 999999999.N)rr r
r rr)<03>selfrrs r<00>__init__zTimestamp.__init__si<00><00><1A>'<27>3<EFBFBD>'<27><1B>8<>9<> 9<><19>+<2B>s<EFBFBD>+<2B><1B><<3C>=<3D> =<3D><11>[<5B>(<28>5<EFBFBD>(<28><1C>^<5E>_<> _<>)<29><1C>^<5E>_<> _<><1E><04> <0C>&<26><04>rc<00><<00>d|j<00>d|j<00>d<03>S)z#String representation of Timestamp.zTimestamp(seconds=z, nanoseconds=<3D>)<29>rr<00>r s r<00>__repr__zTimestamp.__repr__5s#<00><00>#<23>D<EFBFBD>L<EFBFBD>L<EFBFBD>><3E><1E><04>@P<>@P<>?Q<>QR<51>S<>Src<00><><00>t|<01>|jur4|j|jk(xr|j|jk(Sy)z0Check for equality with another Timestamp objectF)<04>typerrr<00>r <00>others r<00>__eq__zTimestamp.__eq__9s><00><00> <0F><05>;<3B>$<24>.<2E>.<2E> (<28><17><<3C><<3C>5<EFBFBD>=<3D>=<3D>0<>Z<>T<EFBFBD>5E<35>5E<35><15>IZ<49>IZ<49>5Z<35> Z<>rc<00>&<00>|j|<01> S)z(not-equals method (see :func:`__eq__()`))r+r)s r<00>__ne__zTimestamp.__ne__?s<00><00><17>;<3B>;<3B>u<EFBFBD>%<25>%<25>%rc<00>D<00>t|j|jf<02>S)N)<03>hashrrr%s r<00>__hash__zTimestamp.__hash__Cs<00><00><13>T<EFBFBD>\<5C>\<5C>4<EFBFBD>#3<>#3<>4<>5<>5rc<00>8<00>t|<00>dk(rtjd|<00>d}d}net|<00>dk(r$tjd|<00>d}|dz}|dz }n3t|<00>dk(rtjd |<00>\}}n td
<EFBFBD><00>t ||<02>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
<20><00>!Lr<00><00>!Ql<00><EFBFBD><00>"<00> <00>!IqzFTimestamp type can only be created from 32, 64, or 96-bit byte objects)<05>len<65>struct<63>unpackr r)<04>brr<00>data64s r<00>
from_byteszTimestamp.from_bytesFs<><00><00> <0F>q<EFBFBD>6<EFBFBD>Q<EFBFBD>;<3B><1C>m<EFBFBD>m<EFBFBD>D<EFBFBD>!<21>,<2C>Q<EFBFBD>/<2F>G<EFBFBD><1B>K<EFBFBD> <10><11>V<EFBFBD>q<EFBFBD>[<5B><1B>]<5D>]<5D>4<EFBFBD><11>+<2B>A<EFBFBD>.<2E>F<EFBFBD><1C>1<>1<>G<EFBFBD> <20>B<EFBFBD>,<2C>K<EFBFBD> <10><11>V<EFBFBD>r<EFBFBD>\<5C>#)<29>=<3D>=<3D><15><01>#:<3A> <20>K<EFBFBD><17><1C>X<><0E> <0E><19><17>+<2B>.<2E>.rc<00>(<00>|jdz dk(rT|jdz|jz}|dzdk(rtjd|<01>}|Stjd|<01>}|Stjd|j|j<00>}|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
r6rl<00><EFBFBD>r3r5r8)rrr:<00>pack)r r=rs r<00>to_byteszTimestamp.to_bytesas<><00><00> <11>L<EFBFBD>L<EFBFBD>B<EFBFBD> <1E>1<EFBFBD> $<24><19>%<25>%<25><12>+<2B>d<EFBFBD>l<EFBFBD>l<EFBFBD>:<3A>F<EFBFBD><15>*<2A>*<2A>a<EFBFBD>/<2F><1D>{<7B>{<7B>4<EFBFBD><16>0<><04><14> <0B> <1E>{<7B>{<7B>4<EFBFBD><16>0<><04><14> <0B><1A>;<3B>;<3B>u<EFBFBD>d<EFBFBD>&6<>&6<><04> <0C> <0C>E<>D<EFBFBD><13> rc<00>X<00>t|dz<00>}t|dzdz<00>}t||<02>S)z<>Create a Timestamp from posix timestamp in seconds.
:param unix_float: Posix timestamp in seconds.
:type unix_float: int or float
<20>r)r r)<03>unix_secrrs r<00> from_unixzTimestamp.from_unixvs2<00><00><16>h<EFBFBD>!<21>m<EFBFBD>$<24><07><19>8<EFBFBD>a<EFBFBD><<3C>5<EFBFBD>0<>1<> <0B><18><17>+<2B>.<2E>.rc<00>:<00>|j|jdz zS)znGet the timestamp as a floating-point value.
:returns: posix timestamp
:rtype: float
ge<><65>Ar$r%s r<00>to_unixzTimestamp.to_unix<69>s<00><00> <14>|<7C>|<7C>d<EFBFBD>.<2E>.<2E><13>4<>4<>4rc<00>&<00>tt|d<01><00>S)z<>Create a Timestamp from posix timestamp in nanoseconds.
:param int unix_ns: Posix timestamp in nanoseconds.
:rtype: Timestamp
r)r<00>divmod)<01>unix_nss r<00>from_unix_nanozTimestamp.from_unix_nano<6E>s<00><00><19>&<26><17>%<25>0<>1<>1rc<00>:<00>|jdz|jzS)z~Get the timestamp as a unixtime in nanoseconds.
:returns: posix timestamp in nanoseconds
:rtype: int
rr$r%s r<00> to_unix_nanozTimestamp.to_unix_nano<6E>s<00><00> <14>|<7C>|<7C>e<EFBFBD>#<23>d<EFBFBD>&6<>&6<>6<>6rc<00><><00>tjj}tjjd|<01>tj|j
|j dz<00><03>zS)zRGet the timestamp as a UTC datetime.
:rtype: `datetime.datetime`
r<00><>)r<00> microseconds)<07>datetime<6D>timezone<6E>utc<74> fromtimestamp<6D> timedeltarr)r rSs r<00> to_datetimezTimestamp.to_datetime<6D>sV<00><00>
<17><1F><1F>#<23>#<23><03><17> <20> <20>.<2E>.<2E>q<EFBFBD>#<23>6<><18>9K<39>9K<39><18>L<EFBFBD>L<EFBFBD>t<EFBFBD>/?<3F>/?<3F>4<EFBFBD>/G<>:
<EFBFBD>
<EFBFBD>
rc<00>d<00>tt|j<00><00>|jdz<00><02>S)zQCreate a Timestamp from datetime with tzinfo.
:rtype: Timestamp
rOr$)rr <00> timestamp<6D> microsecond)<01>dts r<00> from_datetimezTimestamp.from_datetime<6D>s&<00><00> <19><13>R<EFBFBD>\<5C>\<5C>^<5E>!4<>"<22>.<2E>.<2E>SW<53>BW<42>X<>XrN)r)rrrr<00> __slots__r!r&r+r-r0<00> staticmethodr>rArErGrKrMrVr[<00>rrrrs<><00><00><08><1B>M<EFBFBD>*<2A>I<EFBFBD>'<27>,T<01><15> &<26>6<><12>/<2F><12>/<2F>4<14>*<12>/<2F><12>/<2F>5<><12>2<><12>2<>7<>
<EFBFBD><12>Y<01><12>Yrr)rQr:<00> collectionsrrrr^rr<00><module>r`s/<00><01><0F> <0A>"<22>
0<>j<EFBFBD><19>K<EFBFBD>0<>
0<>WY<01>WYr