%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/__pycache__/pickle.cpython-38.pyc

U

na	@shdZddlmZddlmZddlmZmZmZddlm	Z	ddl
mZddlZddlm
Z
dd	lmZmZddlZddlZddlZddlZd
ddd
dddddg	ZzddlmZeddZWnek
rdZYnXeefZdZddddddddgZdZ d Z!Gd!d
d
e"Z#Gd"dde#Z$Gd#dde#Z%Gd$d%d%e"Z&zdd&l'm(Z(Wnek
rldZ(YnXd'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;Z=d<Z>d=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOZQdPZRdQZSdRZTdSZUdTZVdUZWdVZXdWZYdXZZdYZ[dZZ\d[Z]d\Z^d]Z_eOeYeZe[gZ`d^Zad_Zbd`ZcdaZddbZedcZfddZgdeZhdfZidgZjdhZkdiZldjZmdkZndlZoepdmdneqDGdodpdpZrGdqdrdrZsdsdtZtdudvZudwdxZvdydzZwGd{d|d|ZxGd}d~d~ZyddddddZzddddddZ{dddddddZ|dddddddZ}z0ddlm#Z#m$Z$m%Z%m~Z~mZmZmZmZmZWn4ek
rexeyZ~Zeze{e|e}f\ZZZZYnXddZedkrdddlZejddZejdeddddejdddddejddddeZejr*en:ejs<en(ddlZejD]ZeeZeeqJdS)aCreate portable serialized representations of Python objects.

See module copyreg for a mechanism for registering custom picklers.
See module pickletools source for extensive comments.

Classes:

    Pickler
    Unpickler

Functions:

    dump(object, file)
    dumps(object) -> string
    load(file) -> object
    loads(string) -> object

Misc variables:

    __version__
    format_version
    compatible_formats

)FunctionType)dispatch_table)_extension_registry_inverted_registry_extension_cache)islice)partialN)maxsize)packunpackPickleError
PicklingErrorUnpicklingErrorPickler	Unpicklerdumpdumpsloadloads)PickleBufferrTFz4.0z1.0z1.1z1.2z1.3z2.0z3.0z5.0c@seZdZdZdS)rz6A common base class for the other pickling exceptions.N__name__
__module____qualname____doc__rr"/usr/local/lib/python3.8/pickle.pyrIsc@seZdZdZdS)r
z]This exception is raised when an unpicklable object is passed to the
    dump() method.

    Nrrrrrr
Msc@seZdZdZdS)raThis exception is raised when there is a problem unpickling an object,
    such as a security violation.

    Note that other exceptions may also be raised during unpickling, including
    (but not necessarily limited to) AttributeError, EOFError, ImportError,
    and IndexError.

    NrrrrrrTsc@seZdZddZdS)_StopcCs
||_dSN)valueselfr!rrr__init__bsz_Stop.__init__N)rrrr$rrrrrasr)PyStringMap(.012FIJKLMNPQRSTUVXabcd}eghijl]opqrst)uGsI01
sI00
BCcCsg|]}td|r|qS)z[A-Z][A-Z0-9_]+$)rematch).0xrrr
<listcomp>srnc@sFeZdZdZdZddZddZddZdd
dZdd
Z	ddZ
dS)_FramerricCs||_d|_dSr )
file_write
current_frame)r#rprrrr$sz_Framer.__init__cCst|_dSr )ioBytesIOrqr#rrr
start_framingsz_Framer.start_framingcCs*|jr&|jdkr&|jddd|_dS)NrTforce)rqtellcommit_framertrrrend_framingsz_Framer.end_framingFcCsf|jrb|j}||jks|rb|}|j}t||jkrP|ttdt|||t	
|_dS)N<Q)rqrx_FRAME_SIZE_TARGET	getbufferrplen_FRAME_SIZE_MINFRAMEr
rrrs)r#rwfdatawriterrrrysz_Framer.commit_framecCs |jr|j|S||SdSr )rqrrpr#rrrrrsz
_Framer.writecCs,|j}|jr|jdd||||dS)NTrv)rprqry)r#headerpayloadrrrrwrite_large_bytess
z_Framer.write_large_bytesN)F)rrrrr|r$rurzryrrrrrrros
roc@s6eZdZdddZddZddZdd	Zd
dZdS)
	_UnframerNcCs||_||_d|_dSr )	file_read
file_readlinerq)r#rr	file_tellrrrr$	sz_Unframer.__init__cCs|jrb|j|}|dkrJt|dkrJd|_t|}|||dd<|S|t|kr^td|St|}|||dd<|SdSNr$pickle exhausted before end of frame)rqreadintor~rr)r#bufnrrrrsz_Unframer.readintocCsT|jrF|j|}|s.|dkr.d|_||St||krBtd|S||SdSr)rqreadrr~rr#rrrrrrs
z_Unframer.readcCsF|jr:|j}|s"d|_|S|ddkr6td|S|SdS)N
r)rqreadlinerrrrrrr,s
z_Unframer.readlinecCs2|jr|jdkrtdt|||_dS)Nz4beginning of a new frame before end of current frame)rqrrrrrsrr#
frame_sizerrr
load_frame9s
z_Unframer.load_frame)N)rrrr$rrrrrrrrrs



rc	Csj|dD]V}|dkr&td||z|}t||}Wq
tk
r^td||dYq
Xq
||fS)N.z<locals>z&Can't get local attribute {!r} on {!r}z Can't get attribute {!r} on {!r})splitAttributeErrorformatgetattr)objnamesubpathparentrrr
_getattributeBs"
rc	Cst|dd}|dk	r|StjD]X\}}|dks&|dks&|dkrHq&z t||d|krf|WSWq&tk
r|Yq&Xq&dS)z$Find the module an object belong to.rN__main____mp_main__r)rsysmodulescopyitemsrr)rrmodule_namemodulerrrwhichmoduleOs rcCsh|dkrdS|d?d}|j|ddd}|dkrd|dkrd|dd	krd|d
d@dkrd|dd}|S)
aEncode a long to a two's complement little-endian binary string.
    Note that 0 is a special case, returning an empty string, to save a
    byte in the LONG1 pickling context.

    >>> encode_long(0)
    b''
    >>> encode_long(255)
    b'\xff\x00'
    >>> encode_long(32767)
    b'\xff\x7f'
    >>> encode_long(-256)
    b'\x00\xff'
    >>> encode_long(-32768)
    b'\x00\x80'
    >>> encode_long(-128)
    b'\x80'
    >>> encode_long(127)
    b'\x7f'
    >>>
    rrlittleT	byteordersignedrN)
bit_lengthto_bytes)rmnbytesresultrrrencode_longbsrcCstj|dddS)a\Decode a long from a two's complement little-endian binary string.

    >>> decode_long(b'')
    0
    >>> decode_long(b"\xff\x00")
    255
    >>> decode_long(b"\xff\x7f")
    32767
    >>> decode_long(b"\x00\xff")
    -256
    >>> decode_long(b"\x00\x80")
    -32768
    >>> decode_long(b"\x80")
    -128
    >>> decode_long(b"\x7f")
    127
    rTr)int
from_bytes)rrrrdecode_longsrc@seZdZd;dddddZddZdd	Zd
dZdd
ZddZd<ddZ	ddZ
ddZd=ddZiZ
ddZee
ed<ddZee
e<ddZee
e<ddZee
e<d d!Zee
e<d"d#Zee
e<erd$d%Zee
e<d&d'Zee
e<d(d)Zee
e <d*d+Z!e!e
e"<d,Z#d-d.Z$d/d0Z%e%e
e&<e'dk	r@e%e
e'<d1d2Z(d3d4Z)e)e
e*<d5d6Z+e+e
e,<d>d7d8Z-d9d:Z.e-e
e/<e.e
e<dS)?_PicklerNTfix_importsbuffer_callbackcCs|dkrt}|dkrt}n"d|kr.tks<ntdt|dk	rT|dkrTtd||_z|j|_Wntk
rtdYnXt|j|_	|j	j|_|j	j
|_i|_t
||_|dk|_d|_|o|dk|_dS)	a!This takes a binary file for writing a pickle data stream.

        The optional *protocol* argument tells the pickler to use the
        given protocol; supported protocols are 0, 1, 2, 3, 4 and 5.
        The default protocol is 4. It was introduced in Python 3.4, and
        is incompatible with previous versions.

        Specifying a negative protocol version selects the highest
        protocol version supported.  The higher the protocol used, the
        more recent the version of Python needed to read the pickle
        produced.

        The *file* argument must have a write() method that accepts a
        single bytes argument. It can thus be a file object opened for
        binary writing, an io.BytesIO instance, or any other custom
        object that meets this interface.

        If *fix_imports* is True and *protocol* is less than 3, pickle
        will try to map the new Python 3 names to the old module names
        used in Python 2, so that the pickle data stream is readable
        with Python 2.

        If *buffer_callback* is None (the default), buffer views are
        serialized into *file* as part of the pickle stream.

        If *buffer_callback* is not None, then it can be called any number
        of times with a buffer view.  If the callback returns a false value
        (such as None), the given buffer is out-of-band; otherwise the
        buffer is serialized in-band, i.e. inside the pickle stream.

        It is an error if *buffer_callback* is not None and *protocol*
        is None or smaller than 5.
        Nrzpickle protocol must be <= %drz#buffer_callback needs protocol >= 5z"file must have a 'write' attributerr)DEFAULT_PROTOCOLHIGHEST_PROTOCOL
ValueError_buffer_callbackr_file_writer	TypeErrorroframerr_write_large_bytesmemorprotobinfastr)r#fileprotocolrrrrrr$s*#



z_Pickler.__init__cCs|jdS)aClears the pickler's "memo".

        The memo is the data structure that remembers which objects the
        pickler has already seen, so that shared or recursive objects
        are pickled by reference and not by value.  This method is
        useful when re-using picklers.
        N)rclearrtrrr
clear_memosz_Pickler.clear_memocCsrt|dstd|jjf|jdkr<|ttd|j|jdkrP|j	|
||t|jdS)z7Write a pickled representation of obj to the open file.rz2Pickler.__init__() was not called by %s.__init__()<BrN)
hasattrr
	__class__rrrPROTOr
rrusaveSTOPrzr#rrrrrs





z
_Pickler.dumpcCsL|jr
dSt||jkstt|j}|||||f|jt|<dS)zStore an object in the memo.N)ridrAssertionErrorr~rput)r#ridxrrrmemoizes
z_Pickler.memoizecCsT|jdkrtS|jr:|dkr*ttd|Sttd|Sntt|ddSdS)Nrr<Iascii
)	rMEMOIZErBINPUTr
LONG_BINPUTPUTreprencode)r#rrrrrs
z_Pickler.putcCs@|jr*|dkrttd|Sttd|Stt|ddS)Nrrrrr)rBINGETr
LONG_BINGETGETrrr#irrrgets
z_Pickler.getc
Cs|j||}|dk	r.|r.||dS|jt|}|dk	r^|||ddSt}t	|dd}|dk	r~||}|tkr@t
|}|j|}|dk	r|||dSt	|dt|}|dk	r||}njt
|t
r||dSt	|dd}|dk	r||j}n0t	|dd}|dk	r.|}ntd|j|ft|tr\|||dSt|tsttd|t|}	d|	krd	ksntd
||j|d|idS)Nrreducer_overrider
__reduce_ex__
__reduce__zCan't pickle %r object: %rz%s must return string or tuplerz2Tuple returned by %s must have two to six elementsr)rry
persistent_id	save_persrrrrNotImplementedrtypedispatchr
issubclasssave_globalrr
r
isinstancestrtupler~save_reduce)
r#rsave_persistent_idpidrmrvreducetrlrrrrsZ









z
_Pickler.savecCsdSr rrrrrr]sz_Pickler.persistent_idcCsb|jr |j|dd|tn>z |tt|ddWntk
r\tdYnXdS)NF)rrr2persistent IDs in protocol 0 must be ASCII strings)	rrr	BINPERSIDPERSIDrrUnicodeEncodeErrorr
r#rrrrras z_Pickler.save_persc
Cs>t|tstdt|s"td|j}|j}	t|dd}
|jdkr|
dkr|\}}}t|dsntd	|
|dk	r||j
k	rtd		|
|jd
kr|||||||	tn,t|j
|f||}|||d|	tn|jdkr^|
dkr^|d
}t|dstd|dk	r8||j
k	r8td|dd}|||||	tn|||||	t|dk	rt||jkr|	t||jt|d
n
|||dk	r|||dk	r|||dk	r:|dkr
|||	tn0|||||||	t|	t|	tdS)Nz'args from save_reduce() must be a tuplez(func from save_reduce() must be callablerr
__newobj_ex____new__z#args[0] from {} args has no __new__z(args[0] from {} args has the wrong classrr
__newobj__rz+args[0] from __newobj__ args has no __new__z0args[0] from __newobj__ args has the wrong classr)rrr
callablerrrrrrr	NEWOBJ_EXrrREDUCENEWOBJrrPOPrr_batch_appends_batch_setitemsBUILDTUPLE2)
r#funcargsstate	listitems	dictitemsstate_setterrrr	func_nameclskwargsrrrrmsz







"







z_Pickler.save_reducecCs|tdSr )rNONErrrr	save_nonesz_Pickler.save_nonecCs4|jdkr||rtntn||r*tntdS)Nr)rrNEWTRUENEWFALSETRUEFALSErrrr	save_bools
z_Pickler.save_boolcCs.|jr~|dkrN|dkr.|ttd|dS|dkrN|ttd|dSd|krbdkr~nn|ttd|dS|jd	krt|}t|}|d
kr|t	td||n|t
td||dSd|krdkrnn|tt|
ddn|tt|
dd
dS)Nrrr<Hii<irrrrsL
)rrBININT1r
BININT2BININTrrr~LONG1LONG4INTrrLONGr#rencodedrrrr	save_longs*
z_Pickler.save_longcCs<|jr|ttd|n|tt|dddS)N>drr)rrBINFLOATr
FLOATrrrrrr
save_floatsz_Pickler.save_floatcCs|jdkr@|s |jtd|dn|jtjt|ddf|ddSt|}|dkrj|tt	d||nf|dkr|jdkr|
tt	d	||n<||jj
kr|
tt	d
||n|tt	d
||||dS)Nrrrlatin1rrrr{r)rrbytescodecsrrr~rSHORT_BINBYTESr
r	BINBYTES8rr|BINBYTESrr#rrrrr
save_bytess"
z_Pickler.save_bytescCs|jdkr:|s |jtd|dn|jtt|f|ddSt|}||jjkrf|tt	d||n|
tt	d||dS)Nrrr7r{)rr	bytearrayr:r~rr|r
BYTEARRAY8r
rr?rrrsave_bytearray)s
z_Pickler.save_bytearrayc	Cs|jdkrtd|t}|js*tdd}|jdk	rFt||}|rp|jr`||q|	|n|
t|jr|
tW5QRXdS)Nrz0PickleBuffer can only pickled with protocol >= 5zHPickleBuffer can not be pickled when pointing to a non-contiguous bufferT)
rr
raw
contiguousrboolreadonlyr@tobytesrCrNEXT_BUFFERREADONLY_BUFFER)r#rmin_bandrrrsave_picklebuffer8s



z_Pickler.save_picklebuffercCs|jr|dd}t|}|dkrF|jdkrF|ttd||nf|dkrp|jdkrp|ttd||n<||j	j
kr|ttd||n|ttd||nT|d	d
}|dd}|d
d}|dd}|dd}|t
|dd||dS)Nutf-8
surrogatepassrrrr9r{r\z\u005cz\u0000
z\u000a
z\u000dz\u001araw-unicode-escaper)rrr~rrSHORT_BINUNICODEr
rBINUNICODE8rr|
BINUNICODEreplaceUNICODErr0rrrsave_strRs&z_Pickler.save_strcCs:|s(|jr|tn|ttdSt|}|j}|j}|dkr|jdkr|D]}||qRt	||kr|
|t	|d}|t||n|t||
|dS|j}|t|D]}||qt	||kr$|
|t	|d}|jr|t|n|t|d|dS|t|
|dS)Nrrrr)rrEMPTY_TUPLEMARKTUPLEr~rrrrrr_tuplesize2coderPOP_MARK)r#rrrrelementrrrrr
save_tupleis:


z_Pickler.save_tuplecCs8|jr|tn|tt||||dSr )rr
EMPTY_LISTr]LISTrrrrrr	save_lists

z_Pickler.save_listicCs|j}|j}|js0|D]}|||tqdSt|}tt||j}t|}|dkr||t	|D]}||qd|t
n|r||d|t||jkr8dSq8dSNrr)rrrAPPENDiterlistr
_BATCHSIZEr~r]APPENDS)r#rrrrmittmprrrrrs(



z_Pickler._batch_appendscCs<|jr|tn|tt||||dSr )rr
EMPTY_DICTr]DICTrrrrrrr	save_dicts

z_Pickler.save_dictc	Cs|j}|j}|js<|D] \}}|||||tqdSt|}tt||j}t|}|dkr|t	|D]\}}||||qp|t
n(|r|d\}}|||||t||jkrDdSqDdSrf)rrrSETITEMrhrirrjr~r]SETITEMS)	r#rrrkvrlrmrrrrrs0



z_Pickler._batch_setitemscCs|j}|j}|jdkr0|jtt|f|ddS|t||t|}tt	||j
}t|}|dkr|t|D]}||qv|t
||j
krJdSqJdSNrr7r)rrrrsetri	EMPTY_SETrrhrrjr~r]ADDITEMS)r#rrrrlbatchritemrrrsave_sets"



z_Pickler.save_setcCs|j}|j}|jdkr0|jtt|f|ddS|t|D]}||q<t||jkr||t	|
|jt|ddS|t||dSru)
rrrr	frozensetrir]rrr`r	FROZENSETr)r#rrrrzrrrsave_frozensets

 z_Pickler.save_frozensetc

Csd|j}|j}|dkr t|dd}|dkr.|j}t||}z(t|ddtj|}t||\}}Wn.t	t
tfk
rtd|||fdYnX||k	rtd|||f|j
dkr&t||f}	|	r&|	dkst|	dkr|ttd|	n0|	d	kr|ttd
|	n|ttd|	dS|dd}
||krB|
}|j
d
krl|||||tn||k	r|t||
fn|j
dkr|tt|ddt|ddn|jrtj}tj}||f|kr|||f\}}n||kr||}z(|tt|ddt|ddWn,tk
rTtd|||j
fdYnX| |dS)Nrrlevelz(Can't pickle %r: it's not found as %s.%sz2Can't pickle %r: it's not the same object as %s.%srrrr&r'r(rrrrNrrz?can't pickle global identifier '%s.%s' using pickle protocol %i)!rrrrr
__import__rrrImportErrorKeyErrorrr
rrrrEXT1r
EXT2EXT4
rpartitionrSTACK_GLOBALrGLOBALr:r_compat_pickleREVERSE_NAME_MAPPINGREVERSE_IMPORT_MAPPINGrr)
r#rrrrrrobj2rcodelastnamer_name_mappingr_import_mappingrrrrs










z_Pickler.save_globalcCs`|tdkr|jtd|dS|ttkr:|jttf|dS|tdkrV|jtd|dS||S)Nr r7.).)rrrrrrrr	save_typeasz_Pickler.save_type)N)T)NNNNN)N)0rrrr$rrrrrrrrrrr rr%rFr2rr6floatr@r:rCrA_HAVE_PICKLE_BUFFERrMrr[rrbrrerirjrrpdictr%rr{rvr~r|rrrrrrrrsj9
	
F
u1		

B	rc@seZdZdddddddZdd	Zd
dZdd
ZiZddZeee	d<ddZ
e
eed<ddZeee
d<ddZeeed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<dd Zeeed<d!d"Zeeed<d#d$Zeeed<d%d&Zeeed<d'd(Z e ee!d<d)d*Z"e"ee#d<d+d,Z$e$ee%d<d-d.Z&e&ee'd<d/d0Z(d1d2Z)e)ee*d<d3d4Z+e+ee,d<d5d6Z-e-ee.d<d7d8Z/e/ee0d<d9d:Z1e1ee2d<d;d<Z3e3ee4d<d=d>Z5e5ee6d<d?d@Z7e7ee8d<dAdBZ9e9ee:d<dCdDZ;e;ee<d<dEdFZ=e=ee>d<dGdHZ?e?ee@d<dIdJZAeAeeBd<dKdLZCeCeeDd<dMdNZEeEeeFd<dOdPZGeGeeHd<dQdRZIeIeeJd<dSdTZKeKeeLd<dUdVZMeMeeNd<dWdXZOeOeePd<dYdZZQeQeeRd<d[d\ZSeSeeTd<d]d^ZUeUeeVd<d_d`ZWeWeeXd<dadbZYdcddZZeZee[d<dedfZ\e\ee]d<dgdhZ^e^ee_d<didjZ`e`eead<dkdlZbebeecd<dmdnZdedeeed<dodpZfefeegd<dqdrZheheeid<dsdtZjejeekd<dudvZldwdxZmdydzZneneeod<d{d|Zpepeeqd<d}d~Zrereesd<ddZteteeud<ddZveveewd<ddZxexeeyd<ddZzezee{d<ddZ|e|ee}d<ddZ~e~eed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<ddZeeed<dS)
_UnpicklerTASCIIstrictNrencodingerrorsbufferscCsH|dk	rt|nd|_|j|_|j|_i|_||_||_d|_	||_
dS)aThis takes a binary file for reading a pickle data stream.

        The protocol version of the pickle is detected automatically, so
        no proto argument is needed.

        The argument *file* must have two methods, a read() method that
        takes an integer argument, and a readline() method that requires
        no arguments.  Both methods should return bytes.  Thus *file*
        can be a binary file object opened for reading, an io.BytesIO
        object, or any other custom object that meets this interface.

        The file-like object must have two methods, a read() method
        that takes an integer argument, and a readline() method that
        requires no arguments.  Both methods should return bytes.
        Thus file-like object can be a binary file object opened for
        reading, a BytesIO object, or any other custom object that
        meets this interface.

        If *buffers* is not None, it should be an iterable of buffer-enabled
        objects that is consumed each time the pickle stream references
        an out-of-band buffer view.  Such buffers have been given in order
        to the *buffer_callback* of a Pickler object.

        If *buffers* is None (the default), then the buffers are taken
        from the pickle stream, assuming they are serialized there.
        It is an error for *buffers* to be None if the pickle stream
        was produced with a non-None *buffer_callback*.

        Other optional arguments are *fix_imports*, *encoding* and
        *errors*, which are used to control compatibility support for
        pickle stream generated by Python 2.  If *fix_imports* is True,
        pickle will try to map the old Python 2 names to the new names
        used in Python 3.  The *encoding* and *errors* tell pickle how
        to decode 8-bit string instances pickled by Python 2; these
        default to 'ASCII' and 'strict', respectively. *encoding* can be
        'bytes' to read theses 8-bit string instances as bytes objects.
        Nr)rh_buffersr_file_readliner
_file_readrrrrr)r#rrrrrrrrr$rs'z_Unpickler.__init__c
Cst|dstd|jjft|j|j|_|jj|_|jj	|_	|jj
|_
g|_g|_|jj
|_
d|_|j}|j}z4|d}|stt|tst||d|qtWn,tk
r}z|jWYSd}~XYnXdS)zRead a pickled object representation from the open file.

        Return the reconstituted object hierarchy specified in the file.
        rz4Unpickler.__init__() was not called by %s.__init__()rrN)rrrrrrr	_unframerrrr	metastackstackappendrrEOFErrorrbytes_typesrrr!)r#rrkeystopinstrrrrs,




z_Unpickler.loadcCs |j}|j|_|jj|_|Sr )rrpoprr#rrrrpop_marks
z_Unpickler.pop_markcCstddS)Nz%unsupported persistent id encountered)rrrrrpersistent_loadsz_Unpickler.persistent_loadcCs:|dd}d|kr"tks0ntd|||_dS)Nrrzunsupported pickle protocol: %d)rrrr)r#rrrr
load_protosz_Unpickler.load_protorcCs8td|d\}|tjkr(td||j|dS)Nr{zframe size > sys.maxsize: %d)rrrr	rrrrrrrrs
z_Unpickler.load_framecCsLz|ddd}Wntk
r6tdYnX|||dS)Nrrr)rdecodeUnicodeDecodeErrorrrrrrrrload_persids
z_Unpickler.load_persidcCs|j}|||dSr )rrrrrrrrload_binpersids
z_Unpickler.load_binpersidcCs|ddSr rrtrrr	load_nonesz_Unpickler.load_nonecCs|ddS)NFrrtrrr
load_falsesz_Unpickler.load_falsecCs|ddS)NTrrtrrr	load_truesz_Unpickler.load_truecCsL|}|tddkrd}n |tddkr4d}n
t|d}||dS)NrFTr)rr$r#rr)r#rvalrrrload_ints
z_Unpickler.load_intcCs|td|dddS)Nr(rrrrrrtrrrload_binintsz_Unpickler.load_binintcCs||dddSrf)rrrtrrrload_binint1sz_Unpickler.load_binint1cCs|td|dddS)Nr'rrrrtrrrload_binint2sz_Unpickler.load_binint2cCs@|dd}|r,|ddkr,|dd}|t|ddS)NrLr)rrr)r#rrrr	load_longsz_Unpickler.load_longcCs*|dd}||}|t|dSrf)rrrrrrr
load_long1s
z_Unpickler.load_long1cCs>td|d\}|dkr"td||}|t|dS)Nr(rrz#LONG pickle has negative byte count)rrrrrrrrr
load_long4s

z_Unpickler.load_long4cCs|t|dddSNr)rrrrtrrr
load_float!sz_Unpickler.load_floatcCs|td|dddS)Nr3rrrrtrrr
load_binfloat%sz_Unpickler.load_binfloatcCs"|jdkr|S||j|jSdS)Nr:)rrrr"rrr_decode_string)s
z_Unpickler._decode_stringcCsl|dd}t|dkrF|d|dkrF|ddkrF|dd}ntd||t|ddS)Nrrrs"'rz)the STRING opcode argument must be quoted)rr~rrrr;
escape_decoderrrrload_string2s
(z_Unpickler.load_stringcCs@td|d\}|dkr"td||}|||dS)Nr(rrz(BINSTRING pickle has negative byte count)rrrrrr#r~rrrrload_binstring<s

z_Unpickler.load_binstringcCs:td|d\}|tkr&tdt|||dS)Nrrz2BINBYTES exceeds system's maximum size of %d bytesrrr	rrr#r~rrr
load_binbytesEsz_Unpickler.load_binbytescCs |t|ddddS)NrrU)rrrrtrrrload_unicodeMsz_Unpickler.load_unicodecCsBtd|d\}|tkr&tdt|t||dddS)Nrrz4BINUNICODE exceeds system's maximum size of %d bytesrNrOrrr	rrrrrrrload_binunicodeQsz_Unpickler.load_binunicodecCsBtd|d\}|tkr&tdt|t||dddS)Nr{rz5BINUNICODE8 exceeds system's maximum size of %d bytesrNrOrrrrrload_binunicode8Ysz_Unpickler.load_binunicode8cCs:td|d\}|tkr&tdt|||dS)Nr{rz3BINBYTES8 exceeds system's maximum size of %d bytesrrrrrload_binbytes8asz_Unpickler.load_binbytes8cCsFtd|d\}|tkr&tdtt|}||||dS)Nr{rz4BYTEARRAY8 exceeds system's maximum size of %d bytes)rrr	rrArr)r#r~brrrload_bytearray8is
z_Unpickler.load_bytearray8cCsL|jdkrtdzt|j}Wntk
r<tdYnX||dS)NzLpickle stream refers to out-of-band data but no *buffers* argument was givenznot enough out-of-band buffers)rrnext
StopIterationr)r#rrrrload_next_bufferss
z_Unpickler.load_next_bufferc	Cs6|jd}t|}|js(||jd<W5QRXdSr)r
memoryviewrG
toreadonly)r#rrKrrrload_readonly_buffer~s

z_Unpickler.load_readonly_buffercCs,|dd}||}|||dSrf)rrrrrrrload_short_binstrings
z_Unpickler.load_short_binstringcCs"|dd}|||dSrf)rrrrrrload_short_binbytessz_Unpickler.load_short_binbytescCs*|dd}|t||dddS)NrrrNrO)rrrrrrrload_short_binunicodesz _Unpickler.load_short_binunicodecCs|}|t|dSr )rrrrrrr
load_tuplesz_Unpickler.load_tuplecCs|ddS)Nrrrtrrrload_empty_tuplesz_Unpickler.load_empty_tuplecCs|jdf|jd<dSrrrtrrrload_tuple1sz_Unpickler.load_tuple1cCs$|jd|jdfg|jdd<dS)Nrrrrtrrrload_tuple2sz_Unpickler.load_tuple2cCs,|jd|jd|jdfg|jdd<dS)Nrrrrtrrrload_tuple3sz_Unpickler.load_tuple3cCs|gdSr rrtrrrload_empty_listsz_Unpickler.load_empty_listcCs|idSr rrtrrrload_empty_dictionarysz _Unpickler.load_empty_dictionarycCs|tdSr )rrvrtrrrload_empty_setsz_Unpickler.load_empty_setcCs|}|t|dSr )rrr|rrrrload_frozensetsz_Unpickler.load_frozensetcCs|}||dSr )rrrrrr	load_listsz_Unpickler.load_listcs4|fddtdtdD}||dS)Ncsi|]}||dqS)rr)rlrrrr
<dictcomp>sz(_Unpickler.load_dict.<locals>.<dictcomp>rr)rranger~r)r#drrr	load_dicts

z_Unpickler.load_dictc
Cs|st|trt|drjz||}Wqttk
rf}z$td|jt|ftdW5d}~XYqtXn
||}|	|dS)N__getinitargs__zin constructor for %s: %sr)
rrrrrrrexc_inforr)r#klassrr!errrrr_instantiates

z_Unpickler._instantiatecCsL|ddd}|ddd}|||}|||dS)Nrr)rr
find_classrrr#rrrrrr	load_instsz_Unpickler.load_instcCs"|}|d}|||dSNr)rrr)r#rrrrrload_objs
z_Unpickler.load_objcCs2|j}|j}|j|f|}||dSr rrrr)r#rrrrrrload_newobjs

z_Unpickler.load_newobjcCs>|j}|j}|j}|j|f||}||dSr r)r#rrrrrrrload_newobj_exs



z_Unpickler.load_newobj_excCsF|ddd}|ddd}|||}||dS)NrrN)rrrrrrrrload_globalsz_Unpickler.load_globalcCsJ|j}|j}t|tk	s,t|tk	r4td||||dS)NzSTACK_GLOBAL requires str)rrrrrrr)r#rrrrrload_stack_globals


z_Unpickler.load_stack_globalcCs|dd}||dSrf)r
get_extensionr#rrrr	load_ext1sz_Unpickler.load_ext1cCs td|d\}||dS)Nr'rrrrrrrr	load_ext2	sz_Unpickler.load_ext2cCs td|d\}||dS)Nr(rrrrrr	load_ext4sz_Unpickler.load_ext4cCspg}t||}||k	r&||dSt|}|sP|dkrDtdtd||j|}|t|<||dS)NrzEXT specifies code <= 0zunregistered extension code %d)rrrrrrr)r#rnilrrrrrrs


z_Unpickler.get_extensioncCstd|||jdkrT|jrT||ftjkr@tj||f\}}n|tjkrTtj|}t|dd|jdkr~ttj	||dSt
tj	||SdS)Nzpickle.find_classrrrr)rauditrrrNAME_MAPPINGIMPORT_MAPPINGrrrr)r#rrrrrr#s


z_Unpickler.find_classcCs&|j}|}|d}|||d<dSrrr)r#rrrrrrload_reduce1sz_Unpickler.load_reducecCs|jr|jd=n|dSr)rrrtrrrload_pop8s
z_Unpickler.load_popcCs|dSr )rrtrrr
load_pop_mark?sz_Unpickler.load_pop_markcCs||jddSr)rrrtrrrload_dupCsz_Unpickler.load_dupcCs(t|dd}||j|dSr)rrrrrrrrload_getGsz_Unpickler.load_getcCs"|dd}||j|dSrf)rrrrrrrload_bingetLsz_Unpickler.load_bingetcCs&td|d\}||j|dS)Nrr)rrrrrrrrload_long_bingetQsz_Unpickler.load_long_bingetcCs8t|dd}|dkr$td|jd|j|<dS)Nrrznegative PUT argument)rrrrrrrrrload_putVsz_Unpickler.load_putcCs2|dd}|dkrtd|jd|j|<dS)Nrrznegative BINPUT argumentr)rrrrrrrrload_binput]sz_Unpickler.load_binputcCs6td|d\}|tkr"td|jd|j|<dS)Nrrznegative LONG_BINPUT argumentr)rrr	rrrrrrrload_long_binputdsz_Unpickler.load_long_binputcCs|j}|jd|t|<dSr)rrr~)r#rrrrload_memoizeksz_Unpickler.load_memoizecCs$|j}|}|d}||dSr)rrr)r#rr!rirrrload_appendpsz_Unpickler.load_appendcCsZ|}|jd}z
|j}Wntk
r0YnX||dS|j}|D]}||qHdSr)rrextendrr)r#rlist_objrrrzrrrload_appendsws

z_Unpickler.load_appendscCs*|j}|}|}|d}|||<dSrr)r#rr!rrrrrload_setitems
z_Unpickler.load_setitemcCs@|}|jd}tdt|dD]}||d|||<q"dS)Nrrrr)rrrr~)r#rrrrrr
load_setitemss
z_Unpickler.load_setitemscCsD|}|jd}t|tr(||n|j}|D]}||q2dSr)rrrrvupdateadd)r#rset_objrrzrrr
load_additemss

z_Unpickler.load_additemsc
Cs|j}|}|d}t|dd}|dk	r6||dSd}t|trXt|dkrX|\}}|r|j}tj}|	D]*\}}	t
|tkr|	|||<qp|	||<qp|r|	D]\}}	t|||	qdS)Nr__setstate__r)
rrrrrr~__dict__rinternrrrsetattr)
r#rrinstsetstate	slotstate	inst_dictrrsrtrrr
load_builds(
z_Unpickler.load_buildcCs"|j|jg|_|jj|_dSr )rrrrtrrr	load_marksz_Unpickler.load_markcCs|j}t|dSr )rrrr"rrr	load_stops
z_Unpickler.load_stop)rrrr$rrrrrrrrrrrrrrrr"rr!rr.rr+rr)rr*rr/rr,rr-rr5rr4rrSTRINGr	BINSTRINGrr>rrZrrXrrWrr=rrBrrIrrJrSHORT_BINSTRINGrr<rrVrr^rr\rTUPLE1rrrTUPLE3rrcrrnrrwrr}rrdrrorrINSTrOBJrrrrrrrrrrrrrrrrrrrrrr`r	DUPr
rrrrrr
rrrrrrrrrgrrkrrqrrrrrxr#rr$r]r%rrrrrrps*0				rrcCst||||d|dSNr)rr)rrrrrrrr_dumps
r/cCs8t}t||||d||}t|ts4t|Sr.)rrrsrrgetvaluerrr)rrrrrresrrr_dumpssr2rrrcCst|||||dS)Nrrrr)rr)rrrrrrrr_loadsr4cCs2t|trtdt|}t|||||dS)Nz%Can't load pickle from unicode stringr3)rrrrrrsrr)srrrrrrrr_loadss

r6)	rr
rrrrrrrcCsddl}|Sr)doctesttestmod)r7rrr_testsr9rz$display contents of the pickle files)descriptionpickle_filebr*zthe pickle file)rnargshelpz-tz--test
store_truezrun self-test suite)actionr?z-vz)run verbosely; only affects self-test run)N)N)rtypesrcopyregrrrr	itertoolsr	functoolsrrr	structr
rrjrrr;r__all___picklerrrrr:rArformat_versioncompatible_formatsrr	Exceptionrr
rrZorg.python.corer%r]rrr`r-r5r.r+r)r/r*rrrrr&r'r(rZrXrgrrrornrkrrr+rrdrcr,rrrrqr^r\rrr4r#r$rrrrrr)rr*r!r"r,r-r_r>r<rVrWr=rwrxr}rrrrrBrIrJrdirrorrrrrrrr/r2r4r6rrrrrrr9rargparseArgumentParserparseradd_argumentFileType
parse_argsrtestr;
print_helpZpprintrrrrrr<module>sh



?;
^]	0





Zerion Mini Shell 1.0