HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/copyreg.cpython-37.pyc
B

� fi�@s�dZdddddgZiZddd�Zdd�ZyeWnek
rDYnXd	d
�Zeeee�dd�Zd
Z	dd�Z
dd�Zdd�Zdd�Z
iZiZiZdd�Zdd�Zdd�ZdS)z�Helper to provide extensibility for pickle.

This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.
�pickle�constructor�
add_extension�remove_extension�clear_extension_cacheNcCs,t|�std��|t|<|dk	r(t|�dS)Nz$reduction functions must be callable)�callable�	TypeError�dispatch_tabler)Zob_typeZpickle_functionZconstructor_ob�r	�,/opt/alt/python37/lib64/python3.7/copyreg.pyrs
cCst|�std��dS)Nzconstructors must be callable)rr)�objectr	r	r
rscCst|j|jffS)N)�complex�real�imag)�cr	r	r
�pickle_complex"srcCs<|tkrt�|�}n$|�||�}|jtjkr8|�||�|S)N)r�__new__�__init__)�cls�base�state�objr	r	r
�_reconstructor)sricCs�|dkst�x*|jjD]}t|d�r|jt@sPqWt}|tkrFd}n ||jkr^td|j��||�}|j||f}y
|j	}WnNt
k
r�t|dd�r�td�d�y
|j}Wnt
k
r�d}YnXYnX|�}|r�t
||fSt
|fSdS)N��	__flags__zcan't pickle %s objects�	__slots__zNa class that defines __slots__ without defining __getstate__ cannot be pickled)�AssertionError�	__class__�__mro__�hasattrr�	_HEAPTYPErr�__name__�__getstate__�AttributeError�getattr�__dict__r)�self�protorr�args�getstate�dictr	r	r
�
_reduce_ex6s2



r*cGs|j|f|��S)N)r)rr'r	r	r
�
__newobj__Wsr+cCs|j|f|�|�S)zUsed by pickle protocol 4, instead of __newobj__ to allow classes with
    keyword-only arguments to be pickled correctly.
    )r)rr'�kwargsr	r	r
�
__newobj_ex__Zsr-cCs�|j�d�}|dk	r|Sg}t|d�s(n�x�|jD]�}d|jkr0|jd}t|t�rX|f}xf|D]^}|dkrnq^q^|�d�r�|�d�s�|j�	d�}|r�|�
d||f�q�|�
|�q^|�
|�q^Wq0Wy
||_WnYnX|S)a�Return a list of slot names for a given class.

    This needs to find slots defined by the class and its bases, so we
    can't simply return the __slots__ attribute.  We must walk down
    the Method Resolution Order and concatenate the __slots__ of each
    class found there.  (This assumes classes don't modify their
    __slots__ attribute to misrepresent their slots after the class is
    defined.)
    �
__slotnames__Nr)r$�__weakref__�__�_z_%s%s)r$�getrr�
isinstance�str�
startswith�endswithr �lstrip�appendr.)r�namesrZslots�nameZstrippedr	r	r
�
_slotnames`s2





r;cCs�t|�}d|krdks&ntd��||f}t�|�|krNt�|�|krNdS|tkrjtd|t|f��|tkr�td|t|f��|t|<|t|<dS)zRegister an extension code.�i���zcode out of rangeNz)key %s is already registered with code %sz$code %s is already in use for key %s)�int�
ValueError�_extension_registryr2�_inverted_registry)�moduler:�code�keyr	r	r
r�scCsR||f}t�|�|ks$t�|�|kr4td||f��t|=t|=|tkrNt|=dS)z0Unregister an extension code.  For testing only.z%key %s is not registered with code %sN)r?r2r@r>�_extension_cache)rAr:rBrCr	r	r
r�scCst��dS)N)rD�clearr	r	r	r
r�s)N)�__doc__�__all__rrrr�	NameErrorrrrr*r+r-r;r?r@rDrrrr	r	r	r
�<module>s.


	!<