3 ”Re’ ã @ s¤ d dl mZ d dlZd dlZd dlZejd dkZerDeefZ dZ n6eZ yejjZ W n$ e k rx ejejd ƒƒZ Y nX G dd„ deddƒƒZG dd„ deƒZdS ) é )Ú namedtupleNé c s e Zd ZdZ‡ fdd„Z‡ ZS )ÚExtTypez'ExtType represents ext type in msgpack.c sX t |tƒstdƒ‚t |tƒs$tdƒ‚d| ko6dkn sDtdƒ‚tt| ƒj| ||ƒ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-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/msgpack/ext.pyr s zExtType.__new__)Ú__name__Ú __module__Ú__qualname__Ú__doc__r Ú __classcell__r r )r r r s r z code datac @ s’ e Zd ZdZddgZd dd„Zdd„ Zd d „ Zdd„ Zd d„ Z e dd„ ƒZdd„ Ze dd„ ƒZ dd„ Ze dd„ ƒZdd„ Zdd„ Ze dd„ ƒZdS )!Ú TimestampaR Timestamp 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Únanosecondsr c C sT t |tƒstdƒ‚t |tƒs$tdƒ‚d| ko6dk n sDtdƒ‚|| _|| _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.Ni Êš;)r Ú int_typesr r r r )Úselfr r r r r Ú__init__- s zTimestamp.__init__c C s dj | j| jƒS )z#String representation of Timestamp.z'Timestamp(seconds={0}, nanoseconds={1}))Úformatr r )r r r r Ú__repr__E s zTimestamp.__repr__c C s* t |ƒ| jkr&| j|jko$| j|jkS dS )z0Check for equality with another Timestamp objectF)Útyper r r )r Úotherr r r Ú__eq__K s zTimestamp.__eq__c C s | j |ƒ S )z(not-equals method (see :func:`__eq__()`))r$ )r r# r r r Ú__ne__S s zTimestamp.__ne__c C s t | j| jfƒS )N)Úhashr r )r r r r Ú__hash__W s zTimestamp.__hash__c C s€ t | ƒdkr"tjd| ƒd }d}nTt | ƒdkrPtjd| ƒd }|d@ }|d? }n&t