Ë
    ì—0j¾  ã                   óÊ   — d Z g d¢Zi Zdd„Zd„ Zd„ Z eeee«       d„ Z e ee	e
z  «      e«       d„ ZdZ ee	j                  «      Zd	„ Zd
„ Zd„ Zd„ Zi Zi Zi Zd„ Zd„ Zd„ Zy)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_cacheNc                 ó^   — t        |«      st        d«      ‚|t        | <   |�t        |«       y y )Nz$reduction functions must be callable)ÚcallableÚ	TypeErrorÚdispatch_tabler   )Úob_typeÚpickle_functionÚconstructor_obs      ú$/usr/local/lib/python3.12/copyreg.pyr   r      s5   € Ü�OÔ$ÜÐ>Ó?Ð?Ø-„N�7Ñð Ð!Ü�NÕ#ð "ó    c                 ó0   — t        | «      st        d«      ‚y )Nzconstructors must be callable)r   r	   )Úobjects    r   r   r      s   € Ü�FÔÜÐ7Ó8Ð8ð r   c                 ó>   — t         | j                  | j                  ffS ©N)ÚcomplexÚrealÚimag)Úcs    r   Úpickle_complexr      s   € Ü�Q—V‘V˜QŸV™VÐ$Ð$Ð$r   c                 óZ   — dd l }dd l}|j                  |j                  | j                  ffS )Né    )Ú	functoolsÚoperatorÚreduceÚor_Ú__args__)Úobjr   r   s      r   Úpickle_unionr!   !   s#   € ßØ×Ñ˜hŸl™l¨C¯L©LÐ9Ð9Ð9r   c                 óÆ   — |t         u rt         j                  | «      }|S |j                  | |«      }|j                  t         j                  k7  r|j                  ||«       |S r   )r   Ú__new__Ú__init__)ÚclsÚbaseÚstater    s       r   Ú_reconstructorr(   )   sS   € ØŒv�~Ü�n‰n˜SÓ!ˆð
 €Jð �l‰l˜3 Ó&ˆØ�=‰=œFŸO™OÒ+Ø�M‰M˜#˜uÔ%Ø€Jr   i   c                 óÒ  — |dk  sJ ‚| j                   }|j                  D ]P  }t        |d«      r|j                  t        z  s n5|j
                  }t        |t        «      sŒA|j                  |u sŒP n t        }|t        u rd }n%||u rt        d|j                  ›d�«      ‚ || «      }|||f}	 | j                  }t        | «      j                  t        j                  u rt        | dd «      rt        d«      ‚ |«       }|r	t"        ||fS t"        |fS # t        $ rK t        | dd «      rt        d|j                  ›d|› �«      d ‚	 | j                   }n# t        $ r d }Y nw xY wY Œfw xY w)Né   Ú	__flags__zcannot pickle z objectÚ	__slots__zNa class that defines __slots__ without defining __getstate__ cannot be pickledzf object: a class that defines __slots__ without defining __getstate__ cannot be pickled with protocol )Ú	__class__Ú__mro__Úhasattrr+   Ú	_HEAPTYPEr#   Ú
isinstanceÚ	_new_typeÚ__self__r   r	   Ú__name__Ú__getstate__ÚtypeÚgetattrÚAttributeErrorÚ__dict__r(   )	ÚselfÚprotor%   r&   Únewr'   ÚargsÚgetstateÚdicts	            r   Ú
_reduce_exr@   7   s‚  € Ø�1Š9Ðˆ9Ø
�.‰.€CØ—”ˆÜ�4˜Ô%¨d¯n©n¼yÒ.HÙØ�l‰lˆÜ�cœ9Õ%¨#¯,©,¸$Ò*>Ùð ô ˆØŒv�~Ø‰à�3‰;Ü˜n¨S¯\©\Ð,<¸GÐDÓEÐEÙ�T“
ˆØ��uÐ€DðØ×$Ñ$ˆô �‹J×#Ñ#¤v×':Ñ':Ñ:Ü�D˜+ tÔ,Üð Fó Gð Gá‹zˆÙÜ˜t TÐ)Ð)ä˜tÐ#Ð#øô' ò 	Ü�4˜ dÔ+Ü˜n¨S¯\©\Ð,<ð =-ð .3¨Gð5ó 6ð <@ð@ð	Ø—=‘=‰DøÜò 	ØŠDð	üð	ús6   Â/D Ä2E&ÅEÅE&ÅE ÅE&ÅE Å E&Å%E&c                 ó(   —  | j                   | g|¢­Ž S r   ©r#   )r%   r=   s     r   Ú
__newobj__rC   b   s   € Øˆ3�;‰;�sÐ"˜TÒ"Ð"r   c                 ó.   —  | j                   | g|¢­i |¤ŽS )zUsed by pickle protocol 4, instead of __newobj__ to allow classes with
    keyword-only arguments to be pickled correctly.
    rB   )r%   r=   Úkwargss      r   Ú__newobj_ex__rF   e   s   € ð ˆ3�;‰;�sÐ,˜TÒ, VÑ,Ð,r   c                 ó  — | j                   j                  d«      }|�|S g }t        | d«      snÇ| j                  D ]¸  }d|j                   v sŒ|j                   d   }t	        |t
        «      r|f}|D ]€  }|dv rŒ|j                  d«      rW|j                  d«      sF|j                  j                  d«      }|r|j                  d|›|›�«       Œ^|j                  |«       Œp|j                  |«       Œ‚ Œº 	 || _        |S #  Y |S xY w)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__r,   )r9   Ú__weakref__Ú__Ú_)r9   Úgetr/   r.   r1   ÚstrÚ
startswithÚendswithr4   ÚlstripÚappendrH   )r%   Únamesr   ÚslotsÚnameÚstrippeds         r   Ú
_slotnamesrV   k   s  € ð �L‰L×Ñ˜_Ó-€EØÐØˆð €EÜ�3˜Ô$àð —”ˆAØ˜aŸj™jÒ(ØŸ
™
 ;Ñ/�ä˜e¤SÔ)Ø"˜H�EÛ!�DàÐ:Ñ:Ø àŸ™¨Ô.°t·}±}ÀTÔ7JØ#$§:¡:×#4Ñ#4°SÓ#9˜Ù#Ø!ŸLšL±H¹dÐ)CÕDà!ŸL™L¨Õ.àŸ™ TÕ*ñ "ð ð*Ø!ˆÔð €LøðØà€Lús   Ã7D  Ä Dc                 ól  — t        |«      }d|cxk  rdk  st        d«      ‚ t        d«      ‚| |f}t        j                  |«      |k(  rt        j                  |«      |k(  ry|t        v rt        d|›dt        |   ›�«      ‚|t        v rt        d|›dt        |   ›�«      ‚|t        |<   |t        |<   y)	zRegister an extension code.é   iÿÿÿzcode out of rangeNúkey z! is already registered with code zcode z is already in use for key )ÚintÚ
ValueErrorÚ_extension_registryrL   Ú_inverted_registry©ÚmodulerT   ÚcodeÚkeys       r   r   r   ­   sÉ   € äˆt‹9€DØ�Ô"˜
Ò"ÜÐ,Ó-Ð-ð #ÜÐ,Ó-Ð-Ø�4ˆ.€CÜ×Ñ Ó$¨Ò,Ü×Ñ˜tÓ$¨Ò+ØØ
Ô!Ñ!ÝÚÔ2°3Ò7ð9ó :ð 	:àÔ!Ñ!ÝÚÔ 2°4Ò 8ð:ó ;ð 	;à#Ô˜ÑØ"Ô�tÒr   c                 óÊ   — | |f}t         j                  |«      |k7  st        j                  |«      |k7  rt        d|›d|›�«      ‚t         |= t        |= |t        v rt        |= yy)z0Unregister an extension code.  For testing only.rY   z is not registered with code N)r\   rL   r]   r[   Ú_extension_cacher^   s       r   r   r   ¿   sn   € à�4ˆ.€CÜ×Ñ Ó$¨Ò,Ü×Ñ˜tÓ$¨Ò+ÝÚ™tð%ó &ð 	&ä˜CÐ Ü˜4Ð ØÔÑÜ˜TÑ"ð  r   c                  ó,   — t         j                  «        y r   )rc   Úclear© r   r   r   r   Ë   s   € Ü×ÑÕr   r   )Ú__doc__Ú__all__r
   r   r   r   r   r!   r6   rZ   rM   r(   r0   r#   r2   r@   rC   rF   rV   r\   r]   rc   r   r   r   rf   r   r   Ú<module>ri      s¢   ðñòI€ð €ó$ò9ò%ñ €w� Ô (ò:ñ �tˆC�#‰Iƒ˜Ô %òð €	Ù�—‘Ó€	ò'$òV#ò-ò1ðx Ð ØÐ ØÐ ò#ò$
#ór   