§
    |Øj°  ã                  ó„  — U d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl	m
Z
mZ e
efZded<   d	Z ee¦  «        Zi Zd
ed<   eD ]PZ ee¦  «        D ]BZe                     d¦  «        re                     d¦  «        se                     ee¦  «         ŒCŒQ[[dd„Zdd„Z G d„ de¦  «        Zeej        e         _        dS )a  Backward-compatibility shim for ``chardet.equivalences``.

This module's contents were split in chardet 7.5: accuracy-evaluation tables
and predicates moved to :mod:`chardet.evaluation`, and public-API encoding-name
remapping moved to :mod:`chardet.output_names`.  This module proxies every
attribute to whichever of those two now owns it, so existing callers keep
working.

.. deprecated:: 7.5
    Import from :mod:`chardet.evaluation` (``is_correct``,
    ``is_equivalent_detection``, ``is_language_equivalent``, ``SUPERSETS``,
    ``BIDIRECTIONAL_GROUPS``, ``LANGUAGE_EQUIVALENCES``) or
    :mod:`chardet.output_names` (``apply_compat_names``,
    ``apply_preferred_superset``, ``apply_legacy_rename``,
    ``PREFERRED_SUPERSET``) instead.
    Will be removed in chardet 8.0.
é    )ÚannotationsN)Ú
ModuleType)ÚAny)Ú
evaluationÚoutput_namesztuple[ModuleType, ...]Ú_SOURCES)
ÚBIDIRECTIONAL_GROUPSÚLANGUAGE_EQUIVALENCESÚPREFERRED_SUPERSETÚ	SUPERSETSÚapply_compat_namesÚapply_legacy_renameÚapply_preferred_supersetÚ
is_correctÚis_equivalent_detectionÚis_language_equivalentzdict[str, ModuleType]Ú_OWNERSÚ__ÚnameÚstrÚreturnúModuleType | Nonec                ó6   — t                                | ¦  «        S )aY  Return the module that now owns *name*, or ``None`` if neither does.

    Dunders are never proxied: every module carries ``__spec__``,
    ``__name__`` and friends, and the import system assigns them on this
    module directly (``importlib.reload`` does exactly that), which without
    this guard would overwrite the owning module's own.
    )r   Úget)r   s    ú‰/Users/tedpeters/Documents/Projects/Claude Projects/Misc Tools/notename-sheets/.venv/lib/python3.11/site-packages/chardet/equivalences.pyÚ_ownerr   F   s   € õ �;Š;�tÑÔÐó    Úownerr   ÚNonec                óV   — t          j        d| › d|j        › d�t          d¬¦  «         dS )z3Emit the deprecation warning for one accessed name.z+chardet.equivalences is deprecated; import z from z) instead. Will be removed in chardet 8.0.é   )Ú
stacklevelN)ÚwarningsÚwarnÚ__name__ÚDeprecationWarning)r   r   s     r   Ú_warnr'   Q   sV   € å„Mð	E°dð 	Eð 	EØŒ>ð	Eð 	Eð 	Eåàðñ ô ð ð ð r   c                  óD   ‡ — e Zd ZdZdd„Zdˆ fd	„Zdˆ fd
„Zdˆ fd„Zˆ xZS )Ú_EquivalencesShimay  Module type that proxies attributes to the module that now owns them.

    Proxying rather than re-exporting by value preserves two properties the
    pre-split module had.  Reads, writes, and deletes stay indirected:
    rebinding ``chardet.equivalences.PREFERRED_SUPERSET`` rebinds the table
    :func:`~chardet.output_names.apply_preferred_superset` actually reads, so
    a monkeypatching caller is not silently ignored, and a
    ``unittest.mock.patch.object`` on this module patches the owner and
    restores it on exit.  And the deprecation
    fires per accessed name, naming both the name and its new home, instead
    of once per process at import time --- which attributed the warning to
    whoever imported first, said nothing about which symbol was deprecated,
    and turned ``import chardet.equivalences`` into a hard error under
    ``-W error::DeprecationWarning``.
    r   r   r   r   c                óœ   — t          |¦  «        }|€dt          ›d|›�}t          |¦  «        ‚t          ||¦  «         t	          ||¦  «        S )Nzmodule z has no attribute )r   r%   ÚAttributeErrorr'   Úgetattr)Úselfr   r   Úmsgs       r   Ú__getattr__z_EquivalencesShim.__getattr__m   sU   € Ý�t‘”ˆØˆ=ØB�HÐBÐB¸$ÐBÐBˆCÝ  Ñ%Ô%Ð%Ýˆd�EÑÔÐÝ�u˜dÑ#Ô#Ð#r   Úvaluer   c                ó´   •— t          |¦  «        }|€$t          ¦   «                              ||¦  «         d S t          ||¦  «         t	          |||¦  «         d S ©N)r   ÚsuperÚ__setattr__r'   Úsetattr)r-   r   r0   r   Ú	__class__s       €r   r4   z_EquivalencesShim.__setattr__u   sZ   ø€ Ý�t‘”ˆØˆ=Ý‰GŒG×Ò  eÑ,Ô,Ð,ØˆFÝˆd�EÑÔÐÝ��t˜UÑ#Ô#Ð#Ð#Ð#r   c                ó°   •— t          |¦  «        }|€#t          ¦   «                              |¦  «         d S t          ||¦  «         t	          ||¦  «         d S r2   )r   r3   Ú__delattr__r'   Údelattr)r-   r   r   r6   s      €r   r8   z_EquivalencesShim.__delattr__}   sV   ø€ Ý�t‘”ˆØˆ=Ý‰GŒG×Ò Ñ%Ô%Ð%ØˆFÝˆd�EÑÔÐÝ��tÑÔÐÐÐr   ú	list[str]c                óÔ   •— t          t          ¦   «                              ¦   «         ¦  «        }t          D ]$}|                     t          |¦  «        ¦  «         Œ%t          |¦  «        S r2   )Úsetr3   Ú__dir__r   ÚupdateÚvarsÚsorted)r-   ÚnamesÚsourcer6   s      €r   r=   z_EquivalencesShim.__dir__…   sT   ø€ Ý•E‘G”G—O’OÑ%Ô%Ñ&Ô&ˆÝð 	'ð 	'ˆFØ�LŠL�˜f™œÑ&Ô&Ð&Ð&Ý�e‰}Œ}Ðr   )r   r   r   r   )r   r   r0   r   r   r   )r   r   r   r   )r   r:   )	r%   Ú
__module__Ú__qualname__Ú__doc__r/   r4   r8   r=   Ú__classcell__)r6   s   @r   r)   r)   \   s—   ø€ € € € € ðð ð $ð $ð $ð $ð$ð $ð $ð $ð $ð $ðð ð ð ð ð ðð ð ð ð ð ð ð ð ð r   r)   )r   r   r   r   )r   r   r   r   r   r   )rE   Ú
__future__r   Úsysr#   Útypesr   Útypingr   Úchardetr   r   r   Ú__annotations__Ú_PUBLIC_NAMESÚlistÚ__all__r   Ú_sourcer?   Ú_nameÚ
startswithÚendswithÚ
setdefaultr   r'   r)   Úmodulesr%   r6   © r   r   ú<module>rW      s•  ððð ð ð$ #Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,ð %/°Ð#=€Ð =Ð =Ð =Ñ =ð€ð ˆ$ˆ}Ñ
Ô
€ð "$€Ð #Ð #Ð #Ñ #Øð /ð /€GØ��g‘”ð /ð /ˆØ× Ò  Ñ&Ô&ð 	/¨5¯>ª>¸$Ñ+?Ô+?ð 	/Ø×Ò˜u gÑ.Ô.Ð.øð/ð ˆUðð ð ð ðð ð ð ð-ð -ð -ð -ð -˜
ñ -ô -ð -ðd #4€„ˆHÔ Ô Ð Ð r   