HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyc
�
1�3\c@s�ddlZddlZddlmZmZddlmZddlmZmZm	Z	m
Z
ddlmZm
Z
mZmZejd�Zdefd	��YZded
�Zdd�Zdd�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd�Z!dd�Z"dd�Z#dd�Z$dd�Z%dd�Z&dd�Z'dd�Z(dd�Z)dd�Z*dd�Z+dd �Z,dd!�Z-ied"6ed6ed#6ed$6ed%6ed&6ed'6ed(6Z.i	d)�d*6d+�d,6d-�d.6d/�d06e*d16e+d26e,d36e-d46d5�d66Z/ied"6ed6e d#6e!d$6e"d%6e#d&6e$d76e%d86e&d96e'd:6e(d;6e)d<6Z0d=e1fd>��YZ2d?�Z3d@�Z4dS(Ai����N(tdatetimet	timedelta(tBytesIOi(ttimezonetxrangetbyte_as_integertunpack_float16(tCBORTagt	undefinedtbreak_markertCBORSimpleValuesO^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(?:\.(\d+))?(?:Z|([+-]\d\d):(\d\d))$tCBORDecodeErrorcBseZdZRS(s<Raised when an error occurs deserializing a CBOR datastream.(t__name__t
__module__t__doc__(((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyR
scCs�|dkr|S|dkr9tjd|jd��dS|dkrbtjd|jd��dS|dkr�tjd	|jd
��dS|dkr�tjd|jd
��dS|dkr�|r�dStd|��dS(Nis>Biiis>Hiis>Liis>Qiis%unknown unsigned integer subtype 0x%x(tstructtunpacktreadtNoneR(tdecodertsubtypetshareable_indextallow_indefinite((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_uintscCst||�}|dS(Ni(R(RRRtuint((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt
decode_negint#scCs�t||dt�}|dkr�t�}xntr�t|jd��}|dkrX|St||d@�}|j|�}|j|�q-Wn
|j|�SdS(NRii�i(RtTrueRt	bytearrayRRtextend(RRRtlengthtbuftinitial_bytetvalue((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_bytestring)s		cCst||�jd�S(Nsutf-8(R!tdecode(RRR((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt
decode_string;scCs�g}|j||�t||dt�}|dkrpxftrl|j�}|tkr\Pq:|j|�q:Wn0x-t|�D]}|j�}|j|�q}W|S(NR(t
set_shareableRRRR"R	tappendR(RRRtitemsRR t_titem((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_array@s	cCs�i}|j||�t||dt�}|dkryxxtru|j�}|tkr\Pq:|j�}|||<q:Wn9x6t|�D](}|j�}|j�}|||<q�W|jr�|j||�S|SdS(NR(R$RRRR"R	Rtobject_hook(RRRt
dictionaryRtkeyR R'((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt
decode_mapUs"		cCs�t||�}|dkr4|j�}|j|�S|j�}tj|�}|re||||�St||�}|jr�|j|||�S|SdS(Ni(Rt_allocate_shareableR"tsemantic_decoderstgetRttag_hook(RRRttagnumR tsemantic_decoderttag((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_semanticos
	cCs$|dkrt|�St||�S(Ni(R
tspecial_decoders(RRR((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_special�s
c	Cs�tj|�}|r�|j�\	}}}}}}	}
}}|rlttdt|�dt|���}
n	tj}
tt|�t|�t|�t|�t|�t|	�t|
p�d�|
�Stdj	|���dS(Nthourstminutesisinvalid datetime string: {}(
ttimestamp_retmatchtgroupsRRtinttutcRRtformat(RR RR;tyeartmonthtdaythourtminutetsecondtmicrotoffset_htoffset_mttz((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_datetime_string�s'*	9cCstj|tj�S(N(Rt
fromtimestampRR>(RR R((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_epoch_datetime�scCs#ddlm}t||�d�S(Ni����(thexlifyi(tbinasciiRMR=(RR RRM((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_positive_bignum�scCst||�dS(Ni(RO(RR R((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_negative_bignum�scCs<ddlm}||d�}||d�}|d|S(Ni����(tDecimaliii
(tdecimalRQ(RR RRQtexptmantissa((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_fraction�scCs<ddlm}||d�}||d�}|d|S(Ni����(RQiii(RRRQ(RR RRQRSRT((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_bigfloat�scCs\y|j|}Wn!tk
r4td|��nX|dkrTtd|��n|SdS(Nsshared reference %d not founds(shared value %d has not been initialized(t_shareablest
IndexErrorRR(RR Rtshared((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_sharedref�s
cCsddlm}||�S(Ni����(tFraction(t	fractionsR[(RR RR[((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_rational�scCs
tj|�S(N(tretcompile(RR R((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt
decode_regexp�scCs ddlm}|�j|�S(Ni����(tParser(temail.parserRatparsestr(RR RRa((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_mime�scCsddlm}|d|�S(Ni����(tUUIDtbytes(tuuidRe(RR RRe((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_uuid�scCs
t|�S(N(tset(RR R((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt
decode_set�scCs#ttjd|jd��d�S(Ns>Bii(R
RRR(RR((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_simple_value�scCs|jd�}t|�S(Ni(RR(RRtpayload((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_float16�scCstjd|jd��dS(Ns>fii(RRR(RR((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_float32�scCstjd|jd��dS(Ns>dii(RRR(RR((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_float64�siiiiiiicCstS(N(tFalse(tself((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt<lambda>ticCstS(N(R(Rq((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyRrRsicCsdS(N(R(Rq((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyRr
RsicCstS(N(R(Rq((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyRrRsiiiiicCstS(N(R	(Rq((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyRrRsiiii#i$i%itCBORDecodercBsSeZdZdZddd�Zd�Zd�Zd�Zdd	�Z	d
�Z
RS(
s�
    Deserializes a CBOR encoded byte stream.

    :param tag_hook: Callable that takes 3 arguments: the decoder instance, the
        :class:`~cbor2.types.CBORTag` and the shareable index for the resulting object, if any.
        This callback is called for any tags for which there is no built-in decoder.
        The return value is substituted for the CBORTag object in the deserialized output.
    :param object_hook: Callable that takes 2 arguments: the decoder instance and the dictionary.
        This callback is called for each deserialized :class:`dict` object.
        The return value is substituted for the dict in the deserialized output.
    tfpR1R*RWcCs(||_||_||_g|_dS(N(RuR1R*RW(RqRuR1R*((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt__init__5s			cCs!|jjd�t|j�dS(Ni(RWR%Rtlen(Rq((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyR.;scCs |dk	r||j|<ndS(s
        Set the shareable value for the last encountered shared value marker, if any.

        If the given index is ``None``, nothing is done.

        :param index: the value of the ``shared_index`` argument to the decoder
        :param value: the shared value

        N(RRW(RqtindexR ((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyR$?s
cCsI|jj|�}t|�|krEtdj|t|����n|S(sk
        Read bytes from the data stream.

        :param int amount: the number of bytes to read

        sCpremature end of stream (expected to read {} bytes, got {} instead)(RuRRwRR?(Rqtamounttdata((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyRLs
	cCs�y0t|jjd��}|d?}|d@}Wn4tk
rf}tdj|jj�|���nXt|}y||||�SWnGtk
r��n4tk
r�}tdj|jj�|���nXdS(s�
        Decode the next value from the stream.

        :raises CBORDecodeError: if there is any problem decoding the stream

        iiis(error reading major type at index {}: {}s$error decoding value at index {}: {}N(RRuRt	ExceptionRR?ttelltmajor_decoders(RqRRt
major_typeRteR((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyR"Zs
	

cCs1|j}t|�|_|j�}||_|S(s:
        Wrap the given bytestring as a file and call :meth:`decode` with it as the argument.

        This method was intended to be used from the ``tag_hook`` hook when an object needs to be
        decoded separately from the rest but while still taking advantage of the shared value
        registry.

        (RuRR"(RqRtold_fptretval((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytdecode_from_bytesqs
			(RuR1R*RWN(RR
Rt	__slots__RRvR.R$RR"R�(((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyRt&s		
	cKst|�}t||�j�S(s�
    Deserialize an object from a bytestring.

    :param bytes payload: the bytestring to serialize
    :param kwargs: keyword arguments passed to :class:`~.CBORDecoder`
    :return: the deserialized object

    (RRtR"(RltkwargsRu((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytloads�s	cKst||�j�S(s�
    Deserialize an object from an open file.

    :param fp: the input file (any file-like object)
    :param kwargs: keyword arguments passed to :class:`~.CBORDecoder`
    :return: the deserialized object

    (RtR"(RuR�((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pytload�s	(5R^RRRtioRtcompatRRRRttypesRRR	R
R_R:R{RRRpRRR!R#R)R-R5R7RJRLRORPRURVRZR]R`RdRhRjRkRmRnRoR}R6R/tobjectRtR�R�(((sM/usr/lib64/python2.7/site-packages/mercurial/thirdparty/cbor/cbor2/decoder.pyt<module>s�""

	






[