Current File : //proc/self/root/usr/lib/python3.12/importlib/__pycache__/_bootstrap_external.cpython-312.pyc
�

�(�g7���dZdaddlZddlZddlZddlZddlZejdk(Zer	ddl	Z
ddlZnddlZ
erddgZ
ndgZ
ed�e
D��sJ�e
dZee
�Zdj%e
�Z
e
D�chc]}d|����	c}Zd	Zd
ZeezZd�Ze�Zd�Zd
�Zd�Zerd�Znd�Zd�Zd�Zd�Zd�Z d�Z!erd�Z"nd�Z"d�Z#dNd�Z$e%e$jL�Z'djQdd�dzZ)e*jWe)d�Z,dZ-dZ.d gZ/ere/jad!�ejb�Z2d"gZ3e3xZ4Z5dOdd#�d$�Z6d%�Z7d&�Z8d'�Z9d(�Z:d)�Z;d*�Z<d+�Z=d,�Z>dPd-�Z?dQd.�Z@dRd/�ZAd0�ZBeC�ZDdOdeDd1�d2�ZEd3�ZFGd4�d5�ZGGd6�d7�ZHGd8�d9eH�ZIGd:�d;�ZJGd<�d=eJeI�ZKGd>�d?eJeH�ZLGd@�dAeJeH�ZMGdB�dC�ZNGdD�dE�ZOeOZPGdF�dG�ZQGdH�dI�ZRdOdJ�ZSdK�ZTdL�ZUdM�ZVycc}w)Sa^Core implementation of path-based import.

This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing version of this module.

N��win32�\�/c#�8K�|]}t|�dk(���y�w)�N)�len)�.0�seps  �4/usr/lib/python3.12/importlib/_bootstrap_external.py�	<genexpr>r.s����
4�S�3�s�8�q�=�
4�s���:)�win)�cygwin�darwinc���tjjt�r/tjjt�rd�nd��fd�}|Sd�}|S)N�PYTHONCASEOKsPYTHONCASEOKc�b��tjjxr�tjvS)z^True if filenames must be checked case-insensitively and ignore environment flags are not set.)�sys�flags�ignore_environment�_os�environ��keys�r�_relax_casez%_make_relax_case.<locals>._relax_caseCs$����y�y�3�3�3�J��s�{�{�8J�J�c��y)z5True if filenames must be checked case-insensitively.F�rrrrz%_make_relax_case.<locals>._relax_caseGs��r)r�platform�
startswith�_CASE_INSENSITIVE_PLATFORMS�#_CASE_INSENSITIVE_PLATFORMS_STR_KEY)rrs @r�_make_relax_caser$<sN���
�|�|���:�;��<�<�"�"�#F�G� �C�!�C�	K���	��rc�>�t|�dzjdd�S)z*Convert a 32-bit integer to little-endian.�����little)�int�to_bytes)�xs r�_pack_uint32r,Os����F�Z��)�)�!�X�6�6rc�N�t|�dk(sJ�tj|d�S)z/Convert 4 bytes in little-endian to an integer.r'r(�rr)�
from_bytes��datas r�_unpack_uint32r2T�#���t�9��>��>��>�>�$��)�)rc�N�t|�dk(sJ�tj|d�S)z/Convert 2 bytes in little-endian to an integer.�r(r.r0s r�_unpack_uint16r6Yr3rc��|syt|�dk(r|dSd}g}ttj|�D]�\}}|j	t
�s|j
t
�r$|jt�xs|}t|zg}�T|j
d�r9|j�|j�k7r|}|g}��|j|���|xs|}|j|���|D�cgc]}|s�|jt���}}t|�dk(r|ds	|tzS|tj|�zScc}w)�Replacement for os.path.join().r
rrr)
r�mapr�_path_splitrootr!�path_sep_tuple�endswith�rstrip�path_separators�path_sep�casefold�append�join)�
path_parts�root�path�new_root�tail�ps      r�
_path_joinrI`s+�����z�?�a���a�=� �����!�#�"5�"5�z�B�	"�N�H�d��"�"�>�2�h�6G�6G��6W�����7�?�4�� �4��(���"�"�3�'��=�=�?�h�&7�&7�&9�9�$�D� �6�D��K�K��%��'�4�����D�!�	"�48�=�a�1�����)�=��=��t�9��>�$�q�'��(�?�"��h�m�m�D�)�)�)��	>s�0E�8Ec�|�tj|D�cgc]}|r|jt���c}�Scc}w)r8)r?rBr=r>)rC�parts  rrIrI~s9���}�}�*4�>�"&��#�k�k�/�:�>�?�	?��>s�9c�`��t�fd�tD��}|dkrd�fS�d|�|dzdfS)z Replacement for os.path.split().c3�@�K�|]}�j|����y�w�N)�rfind)r	rHrEs  �rrz_path_split.<locals>.<genexpr>�s�����3�a�D�J�J�q�M�3�s�rr
Nr)�maxr>)rE�is` r�_path_splitrR�s>����3�?�3�3�A��1�u��4�x�����8�T�!�a�%�&�\�!�!rc�,�tj|�S)z~Stat the path.

    Made a separate function to make it easier to override in experiments
    (e.g. cache stat results).

    )r�stat�rEs r�
_path_statrV�s���8�8�D�>�rc�\�	t|�}|jdz|k(S#t$rYywxYw)z1Test whether the path is the specified mode type.Fi�)rV�OSError�st_mode)rE�mode�	stat_infos   r�_path_is_mode_typer\�s=����t�$�	�
����(�T�1�1������s��	+�+c��t|d�S)zReplacement for os.path.isfile.i�)r\rUs r�_path_isfiler^�s���d�H�-�-rc�F�|stj�}t|d�S)zReplacement for os.path.isdir.i@)r�getcwdr\rUs r�_path_isdirra�s����z�z�|���d�H�-�-rc��|sytj|�djdd�}t|�dkDxr$|j	d�xs|jd�S)�Replacement for os.path.isabs.Frrrrz\\)rr:�replacerr!r<)rErDs  r�_path_isabsre�sT�����"�"�4�(��+�3�3�C��>���4�y�1�}�Q�$�/�/�&�"9�"P�T�]�]�4�=P�Qrc�,�|jt�S)rc)r!r>rUs rrere�s������/�/rc��t|�s=tD]}|jd|���}�tt	j
�|�S|S)z Replacement for os.path.abspath.�.)rer>�removeprefixrIrr`)rEr
s  r�
_path_abspathrj�sG���t��"�	0�C��$�$�q���Y�/�D�	0��#�*�*�,��-�-��rc���|�dt|���}tj|tjtjztj
z|dz�}	t
j|d�5}|j|�ddd�tj||�y#1swY� xYw#t$r'	tj|��#t$rY�wxYwwxYw)z�Best-effort function to write data to a path atomically.
    Be prepared to handle a FileExistsError if concurrent writing of the
    temporary file is attempted.rh��wbN)�idr�open�O_EXCL�O_CREAT�O_WRONLY�_io�FileIO�writerdrX�unlink)rEr1rZ�path_tmp�fd�files      r�
_write_atomicrz�s���
��q��D��
�#�H�	���(��*�*�s�{�{�*�S�\�\�9�4�%�<�
I�B���Z�Z��D�
!�	�T��J�J�t��	����H�d�#�	�	����	��J�J�x� �	���	��
�	���sH�B/�2B#�B/�#B,�(B/�/	C�9C�C�	C�C�C�Ci�
r5r(s
�__pycache__zopt-z.pyz.pywz.pyc)�optimizationc�<�|�/tjdt�|�
d}t|��|rdnd}t	j
|�}t
|�\}}|jd�\}}}tjj}	|	�td��dj|r|n|||	g�}
|�:tjjdk(rd}ntjj}t|�}|dk7r+|j!�st#|�d	���|
�dt$�|��}
|
t&dz}tj(�Qt+|�}|dd
k(r|dt,vr|dd}t/tj(|j1t,�|�St/|t2|�S)a�Given the path to a .py file, return the path to its .pyc file.

    The .py file does not need to exist; this simply returns the path to the
    .pyc file calculated as if the .py file were imported.

    The 'optimization' parameter controls the presumed optimization level of
    the bytecode file. If 'optimization' is not None, the string representation
    of the argument is taken and verified to be alphanumeric (else ValueError
    is raised).

    The debug_override parameter is deprecated. If debug_override is not None,
    a True value is the same as setting 'optimization' to the empty string
    while a False value is equivalent to setting 'optimization' to '1'.

    If sys.implementation.cache_tag is None then NotImplementedError is raised.

    NzFthe debug_override parameter is deprecated; use 'optimization' insteadz2debug_override or optimization must be set to Noner
rrh�$sys.implementation.cache_tag is Nonerz is not alphanumericrr5)�	_warnings�warn�DeprecationWarning�	TypeErrorr�fspathrR�
rpartitionr�implementation�	cache_tag�NotImplementedErrorrBr�optimize�str�isalnum�
ValueError�_OPT�BYTECODE_SUFFIXES�pycache_prefixrjr>rI�lstrip�_PYCACHE)rE�debug_overrider|�message�headrG�baser
�rest�tag�almost_filename�filenames            r�cache_from_sourcer��s���$�!����0�1C�	E��#�J�G��G�$�$�+�r����:�:�d��D��T�"�J�D�$��o�o�c�*�O�D�#�t�

�
�
�
&�
&�C�
�{�!�"H�I�I��g�g���$��c�B�C�O����9�9����"��L��9�9�-�-�L��|�$�L��r���#�#�%���/�/C�D�E�E�,�-�Q�t�f�\�N�C���!2�1�!5�5�H�
���%��T�"��
��7�c�>�d�1�g�_�<����8�D������K�K��(��
�	
�
�d�H�h�/�/rc�$�tjj�td��t	j
|�}t
|�\}}d}tj�Ktjjt�}|j|tz�r|t|�d}d}|s+t
|�\}}|tk7rtt�d|����|jd�}|dvrtd|����|d	k(rm|j!dd
�d}|jt"�stdt"����|tt"�d}|j%�std
|�d���|j'd�d}	t)||	t*dz�S)anGiven the path to a .pyc. file, return the path to its .py file.

    The .pyc file does not need to exist; this simply returns the path to
    the .py file calculated to correspond to the .pyc file.  If path does
    not conform to PEP 3147/488 format, ValueError will be raised. If
    sys.implementation.cache_tag is None then NotImplementedError is raised.

    Nr~FTz not bottom-level directory in rh>r5�zexpected only 2 or 3 dots in r�r5���z5optimization portion of filename does not start with zoptimization level z is not an alphanumeric valuer)rr�r�r�rr�rRr�r=r>r!r?rr�r��count�rsplitr�r��	partitionrI�SOURCE_SUFFIXES)
rEr��pycache_filename�found_in_pycache_prefix�
stripped_path�pycache�	dot_countr|�	opt_level�
base_filenames
          r�source_from_cacher�(s������#�#�+�!�"H�I�I��:�:�d��D�(��.��D�
�#��
���%��*�*�1�1�/�B�
��?�?�=�8�3�4���M�*�+�,�D�&*�#�"�#�D�)�
��g��h����z�)H� $�x�)�*�
*� �&�&�s�+�I�����8�9I�8L�M�N�N�	�a��'�.�.�s�A�6�r�:���&�&�t�,��%�%)�H�.�/�
/� ��T���,�	�� � �"��2�<�2B�C2�2�3�
3�$�.�.�s�3�A�6�M��d�M�O�A�,>�>�?�?rc���t|�dk(ry|jd�\}}}|r|j�dddk7r|S	t|�}t
|�r|S|S#tt
f$r|dd}Y�%wxYw)z�Convert a bytecode file path to a source path (if possible).

    This function exists purely for backwards-compatibility for
    PyImport_ExecCodeModuleWithFilenames() in the C API.

    rNrh�������py)rr��lowerr�r�r�r^)�
bytecode_pathr��_�	extension�source_paths     r�_get_sourcefiler�Ps����=��Q���&�1�1�#�6��D�!�Y��9�?�?�$�R��+�t�3���)�'�
�6��'�{�3�;�F��F��
 ��,�)�#�C�R�(��)�s�A�A1�0A1c��|jtt��r	t|�S|jtt
��r|Sy#t$rYywxYwrN)r<�tupler�r�r�r�)r�s r�_get_cachedr�csW�������/�0�	�$�X�.�.�
�	�	�5�!2�3�	4�����#�	��	�s�
A�	A�Ac�^�	t|�j}|dz}|S#t$rd}Y�wxYw)z3Calculate the mode permissions for a bytecode file.rl�)rVrYrX)rErZs  r�
_calc_moder�os=����$��'�'��
	�E�M�D��K�������s��,�,c�Z��d�fd�	}t�tj}nd�}||��|S)z�Decorator to verify that the module being requested matches the one the
    loader can handle.

    The first argument (self) must define _name which the second argument is
    compared against. If the comparison fails then ImportError is raised.

    c���|�
|j}n,|j|k7rtd|j�d|��|����||g|��i|��S)Nzloader for z cannot handle ��name)r��ImportError)�selfr��args�kwargs�methods    �r�_check_name_wrapperz(_check_name.<locals>._check_name_wrapper�sR����<��9�9�D�
�Y�Y�$�
��!%���D�2�8<�>�
>��d�D�2�4�2�6�2�2rc	��dD]&}t||�s�t||t||���(|jj	|j�y)N)�
__module__�__name__�__qualname__�__doc__)�hasattr�setattr�getattr�__dict__�update)�new�oldrds   r�_wrapz_check_name.<locals>._wrap�sH��P�
A���3��(��C��'�#�w�*?�@�
A�
�L�L������-rrN)�
_bootstrapr�)r�r�r�s`  r�_check_namer�{s3���3���� � ��	.�
�
�v�&��rc�,�|dd}|tk7r*d|�d|��}tjd|�t|fi|���t	|�dkr&d|��}tjd|�t|��t
|dd�}|d	zrd
|�d|��}t|fi|���|S)aTPerform basic validity checking of a pyc header and return the flags field,
    which determines how the pyc should be further validated against the source.

    *data* is the contents of the pyc file. (Only the first 16 bytes are
    required, though.)

    *name* is the name of the module being imported. It is used for logging.

    *exc_details* is a dictionary passed to ImportError if it raised for
    improved debugging.

    ImportError is raised when the magic number is incorrect or when the flags
    field is invalid. EOFError is raised when the data is found to be truncated.

    Nr'zbad magic number in z: �{}�z(reached EOF while reading pyc header of ����zinvalid flags z in )�MAGIC_NUMBERr��_verbose_messager�r�EOFErrorr2)r1r��exc_details�magicr�rs      r�
_classify_pycr��s��� 
��!�H�E����(����5�)�<���#�#�D�'�2��'�1�[�1�1�
�4�y�2�~�<�T�H�E���#�#�D�'�2��w����4��!�9�%�E��u�}�"�5�)�4��x�8���'�1�[�1�1��Lrc���t|dd�|dzk7r'd|��}tjd|�t|fi|���|�$t|dd�|dzk7rtd|��fi|���yy)aValidate a pyc against the source last-modified time.

    *data* is the contents of the pyc file. (Only the first 16 bytes are
    required.)

    *source_mtime* is the last modified timestamp of the source file.

    *source_size* is None or the size of the source file in bytes.

    *name* is the name of the module being imported. It is used for logging.

    *exc_details* is a dictionary passed to ImportError if it raised for
    improved debugging.

    An ImportError is raised if the bytecode is stale.

    r��r&zbytecode is stale for r�Nr�)r2r�r�r�)r1�source_mtime�source_sizer�r�r�s      r�_validate_timestamp_pycr��s���&�d�1�R�j�!�l�Z�&?�@�*�4�(�3���#�#�D�'�2��'�1�[�1�1����t�B�r�{�#��j�(@�A��2�4�(�;�K�{�K�K�	B�	 rc�2�|dd|k7rtd|��fi|���y)a�Validate a hash-based pyc by checking the real source hash against the one in
    the pyc header.

    *data* is the contents of the pyc file. (Only the first 16 bytes are
    required.)

    *source_hash* is the importlib.util.source_hash() of the source file.

    *name* is the name of the module being imported. It is used for logging.

    *exc_details* is a dictionary passed to ImportError if it raised for
    improved debugging.

    An ImportError is raised if the bytecode is stale.

    r�r�z.hash in bytecode doesn't match hash of source N)r�)r1�source_hashr�r�s    r�_validate_hash_pycr��s6��"�A�b�z�[� ��=�d�X�F�
��
�	
�!rc���tj|�}t|t�r0tjd|�|�t
j||�|Std|��||���)z#Compile bytecode as found in a pyc.zcode object from {!r}zNon-code object in �r�rE)	�marshal�loads�
isinstance�
_code_typer�r��_imp�_fix_co_filenamer�)r1r�r�r��codes     r�_compile_bytecoder��sc���=�=���D��$�
�#��#�#�$;�]�K��"��!�!�$��4����/�
�/@�A�#�-�9�	9rc��tt�}|jtd��|jt|��|jt|��|jt	j
|��|S)z+Produce the data for a timestamp-based pyc.r)�	bytearrayr��extendr,r��dumps)r��mtimer�r1s    r�_code_to_timestamp_pycr��sX���\�"�D��K�K��Q�� ��K�K��U�#�$��K�K��[�)�*��K�K��
�
�d�#�$��Krc���tt�}d|dzz}|jt|��t	|�dk(sJ�|j|�|jtj|��|S)z&Produce the data for a hash-based pyc.rr�)r�r�r�r,rr�r�)r�r��checkedr1rs     r�_code_to_hash_pycr�sd���\�"�D��'�Q�,��E��K�K��U�#�$��{��q� � � ��K�K����K�K��
�
�d�#�$��Krc���ddl}tj|�j}|j	|�}tj
dd�}|j
|j
|d��S)zyDecode bytes representing source code and return the string.

    Universal newline support is used in the decoding.
    rNT)�tokenizers�BytesIO�readline�detect_encoding�IncrementalNewlineDecoder�decode)�source_bytesr��source_bytes_readline�encoding�newline_decoders     r�
decode_sourcers_��
��K�K��5�>�>���'�'�(=�>�H��3�3�D�$�?�O��!�!�,�"5�"5�h�q�k�"B�C�Cr��loader�submodule_search_locationsc��|�!d}t|d�r4	|j|�}n!tj|�}	t|�}tj|||��}d|_	|�?t�D]1\}}|jt|��s�!|||�}||_
ny|tur(t|d�r#	|j|�}|rg|_n||_|j gk(r+|r)t#|�d}|j j%|�|S#t$rY��wxYw#t$rY��wxYw#t$rY�ewxYw)a=Return a module spec based on a file location.

    To indicate that the module is a package, set
    submodule_search_locations to a list of directory paths.  An
    empty list is sufficient, though its not otherwise useful to the
    import system.

    The loader must take a spec as its only __init__() arg.

    Nz	<unknown>�get_filename��originT�
is_packager)r�rr�rr�rjrXr��
ModuleSpec�
_set_fileattr�_get_supported_file_loadersr<r�r�	_POPULATErrrRrA)	r��locationrr�spec�loader_class�suffixesr�dirnames	         r�spec_from_file_locationr"sm�������6�>�*�
�!�.�.�t�4���:�:�h�'��	�$�X�.�H�� � ��v�h� �?�D��D���~�&A�&C�	�"�L�(�� � ��x��1�%�d�H�5��$����		��"�Y�.��6�<�(�
9�#�.�.�t�4�
��68�D�3�*D��'��&�&�"�,��!�(�+�A�.�G��+�+�2�2�7�;��K��]�
��
���	��	��8�
��
�s4�D�D'�:D6�	D$�#D$�'	D3�2D3�6	E�Ec��t|t�syt�}|jdd�}|jd|�}|�||ury|�t	d��t|d|�}||dfvr6|�||urtnt}|d��tjdt�|}|�J�|�!||k7rtjdt�|S|S)zCHelper function for _warnings.c

    See GH#97850 for details.
    N�
__loader__�__spec__z+Module globals is missing a __spec__.loaderrz-Module globals; __loader__ != __spec__.loader)
r��dict�object�getr�r��AttributeErrorrr�r�)�module_globals�missingrr�spec_loader�excs      r�_bless_my_loaderr!hs����n�d�+���h�G�
�
�
��d�
3�F����j�'�2�D�
�~��7�?��
�\��J�K�K��$��'�2�K��w��o�%��>�$/�7�$:�.�
�C��C�D�D����9��	 ����"�"�"�
��f��3����;��	 ��
��rc�Z�eZdZdZdZdZexrdevZe	d��Z
ed��Zed	d��Z
y)
�WindowsRegistryFinderz>Meta path finder for modules declared in the Windows registry.z;Software\Python\PythonCore\{sys_version}\Modules\{fullname}zASoftware\Python\PythonCore\{sys_version}\Modules\{fullname}\Debugz_d.pydc��	tjtj|�S#t$r'tjtj|�cYSwxYwrN)�winreg�OpenKey�HKEY_CURRENT_USERrX�HKEY_LOCAL_MACHINErs r�_open_registryz$WindowsRegistryFinder._open_registry�sG��	B��>�>�&�":�":�C�@�@���	B��>�>�&�";�";�S�A�A�	B�s�#&�-A�Ac�8�|jr
|j}n|j}|j|dtj
ddz��}	|j
|�5}tj|d�}ddd�|S#1swYSxYw#t$rYywxYw)Nz%d.%dr5)�fullname�sys_versionr
)
�DEBUG_BUILD�REGISTRY_KEY_DEBUG�REGISTRY_KEY�formatr�version_infor)r%�
QueryValuerX)�clsr+�registry_keyr�hkey�filepaths      r�_search_registryz&WindowsRegistryFinder._search_registry�s����?�?��1�1�L��+�+�L��!�!�8�.5��8H�8H��!�8L�.L�"�N��	��#�#�C�(�
7�D�!�,�,�T�2�6��
7���	
7�����	��	�s0�B
�B�6B
�B
�B
�
B
�
	B�BNc��|j|�}|�y	t|�t�D]B\}}|j	t|��s�!tj||||�|��}|cSy#t$rYywxYw)Nr	)r7rVrXrr<r�r��spec_from_loader)r3r+rE�targetr6rrrs        r�	find_speczWindowsRegistryFinder.find_spec�s����'�'��1�����	��x� �!<� =�	��F�H�� � ��x��1�!�2�2�8�39�(�H�3M�:B�3�D����	���	��	�s�A1�1	A=�<A=�NN)r�r�r�r�r/r.�_MS_WINDOWS�EXTENSION_SUFFIXESr-�staticmethodr)�classmethodr7r;rrrr#r#�sg��H�	 ��	'���A�8�/A�#A�K��B��B������
��
rr#c�(�eZdZdZd�Zd�Zd�Zd�Zy)�
_LoaderBasicszSBase class of common code needed by both SourceLoader and
    SourcelessFileLoader.c��t|j|��d}|jdd�d}|jd�d}|dk(xr|dk7S)z�Concrete implementation of InspectLoader.is_package by checking if
        the path returned by get_filename has a filename of '__init__.py'.rrhrr5�__init__)rRrr�r�)r�r+r��
filename_base�	tail_names     rrz_LoaderBasics.is_package�s]���t�0�0��:�;�A�>�� ����Q�/��2�
��'�'��,�Q�/�	��
�*�F�y�J�/F�Frc��y�z*Use default semantics for module creation.Nr�r�rs  r�
create_modulez_LoaderBasics.create_module���rc��|j|j�}|�td|j�d���tj	t
||j�y)zExecute the module.Nzcannot load module z when get_code() returns None)�get_coder�r�r��_call_with_frames_removed�execr�)r��moduler�s   r�exec_modulez_LoaderBasics.exec_module�sS���}�}�V�_�_�-���<�� 3�F�O�O�3F�G8�8�9�
9��,�,�T�4����Irc�.�tj||�S)zThis method is deprecated.)r��_load_module_shim�r�r+s  r�load_modulez_LoaderBasics.load_module�s���+�+�D�(�;�;rN)r�r�r�r�rrJrQrUrrrrBrB�s���G�9�J�<rrBc�<�eZdZd�Zd�Zd�Zd�Zd�Zdd�d�Zd	�Z	y
)�SourceLoaderc��t�)z�Optional method that returns the modification time (an int) for the
        specified path (a str).

        Raises OSError when the path cannot be handled.
        )rX�r�rEs  r�
path_mtimezSourceLoader.path_mtime�s	���
rc�(�d|j|�iS)a�Optional method returning a metadata dict for the specified
        path (a str).

        Possible keys:
        - 'mtime' (mandatory) is the numeric timestamp of last source
          code modification;
        - 'size' (optional) is the size in bytes of the source code.

        Implementing this method allows the loader to read bytecode files.
        Raises OSError when the path cannot be handled.
        r�)rZrYs  r�
path_statszSourceLoader.path_stats�s�������.�/�/rc�&�|j||�S)z�Optional method which writes data (bytes) to a file path (a str).

        Implementing this method allows for the writing of bytecode files.

        The source path is needed in order to correctly transfer permissions
        )�set_data)r�r��
cache_pathr1s    r�_cache_bytecodezSourceLoader._cache_bytecodes���}�}�Z��.�.rc��y)z�Optional method which writes data (bytes) to a file path (a str).

        Implementing this method allows for the writing of bytecode files.
        Nr)r�rEr1s   rr^zSourceLoader.set_data
rKrc��|j|�}	|j|�}t	|�S#t$r}td|��|�d}~wwxYw)z4Concrete implementation of InspectLoader.get_source.z'source not available through get_data()r�N)r�get_datarXr�r)r�r+rEr�r s     r�
get_sourcezSourceLoader.get_sourcesZ��� � ��*��	6��=�=��.�L��\�*�*���	6��G�#+�-�25�
6��	6�s�/�	A�A�Ar�)�	_optimizec�@�tjt||dd|��S)z�Return the code object compiled from source.

        The 'data' argument can be any object type that compile() supports.
        rOT)�dont_inheritr�)r�rN�compile)r�r1rEres    r�source_to_codezSourceLoader.source_to_codes+��
�3�3�G�T�4��59�I�4�O�	Orc�H�|j|�}d}d}d}d}d}	t|�}	|j|�}	t|	d�}	|j	|�}
||d�}	t|
||�}t
|
�dd}
|dzdk7}|rj|d	zdk7}tjd
k7ra|stjdk(rL|j	|�}tjt|�}t|
|||�nt|
||	d||�tjd
||�t|
|||��S#t t"f$rYn3wxYw#t$$rYn$wxYw#t$$rYnwxYw#t&$rd}YnwxYw|�|j	|�}|j)||�}tjd|�t*j,sl|�j|�h|r*|�tjt|�}t/|||�}
nt1||t3|��}
	|j5|||
�|S#t&$rY|SwxYw|S)z�Concrete implementation of InspectLoader.get_code.

        Reading of bytecode requires path_stats to be implemented. To write
        bytecode, set_data must also be implemented.

        NFTr�r�r�rrr5�never�always�sizez
{} matches {})r�r�r�zcode object from {})rr�r\r)rcr��
memoryviewr��check_hash_based_pycsr��_RAW_MAGIC_NUMBERr�r�r�r�r�r�r�rXr�rir�dont_write_bytecoder�r�rr`)r�r+r�r�r�r��
hash_based�check_sourcer��str1r�r�
bytes_data�code_objects               rrMzSourceLoader.get_code&s����'�'��1���������
���3	J�-�k�:�M�.
J��_�_�[�1�� #�2�g�;�/��(J��=�=��7�D�
!)� -�#�K�J� -�d�H�k� J��%/��%5�b�c�%:�
�%*�S�[�A�%5�
�%�+0�4�<�1�+<�L� $� :� :�g� E�!-�!%�!;�!;�x�!G�/3�}�}�[�/I��.2�.>�.>�$5�$0�/"��!3�4��h�3>�!@�4� $� ,� "�6�
� (� +��#�3�3�O�]�4?�A�0��(�?L�=H� J�J��(��2�����?�����
�
��
��#�	!� �M�	!��d���=�=��5�L��)�)�,��D���#�#�$9�;�G��'�'�M�,E��(���&�"&�"2�"2�3D�3?�#A�K�(��k�<�P��-�k�<�.1�,�.?�A��
��$�$�[�-��F����'�
����
���sY�E�E�	D<� B!D'�'D9�8D9�<	E�E�	E�E�E(�'E(�=H�	H�HN)
r�r�r�rZr\r`r^rdrirMrrrrWrW�s,���0�/��+�79�O�SrrWc�d��eZdZdZd�Zd�Zd�Ze�fd��Zed��Z	d�Z
ed��Z�xZS)	�
FileLoaderzgBase file loader class which implements the loader protocol methods that
    require file system usage.c� �||_||_y)zKCache the module name and the path to the file found by the
        finder.Nr�)r�r+rEs   rrDzFileLoader.__init__�s����	���	rc�j�|j|jk(xr|j|jk(SrN��	__class__r��r��others  r�__eq__zFileLoader.__eq__��,�����%�/�/�1�0��
�
����/�	1rc�X�t|j�t|j�zSrN��hashr�rE�r�s r�__hash__zFileLoader.__hash__�����D�I�I���d�i�i��0�0rc�*��tt|�|�S)zdLoad a module from a file.

        This method is deprecated.  Use exec_module() instead.

        )�superrxrU)r�r+r|s  �rrUzFileLoader.load_module�s����Z��2�8�<�<rc��|jS�z:Return the path to the source file as found by the finder.rUrTs  rrzFileLoader.get_filename�����y�y�rc�.�t|ttf�r8tjt|��5}|j
�cddd�Stj|d�5}|j
�cddd�S#1swYyxYw#1swYyxYw)z'Return the data from path as raw bytes.N�r)r�rW�ExtensionFileLoaderrs�	open_coder��readrt)r�rErys   rrczFileLoader.get_data�s|���d�\�+>�?�@����s�4�y�)�
#�T��y�y�{�
#�
#����D�#�&�
#�$��y�y�{�
#�
#�
#�
#��
#�
#�s�A?�%B�?B�Bc��ddlm}||�S)Nr)�
FileReader)�importlib.readersr�)r�rPr�s   r�get_resource_readerzFileLoader.get_resource_reader�s��0��$��r)
r�r�r�r�rDrr�r�rUrrcr��
__classcell__)r|s@rrxrx|sX���"��1�1��	=��	=�����#�� �� rrxc�(�eZdZdZd�Zd�Zdd�d�Zy)�SourceFileLoaderz>Concrete implementation of SourceLoader using the file system.c�J�t|�}|j|jd�S)z!Return the metadata for the path.)r�rm)rV�st_mtime�st_size)r�rErts   rr\zSourceFileLoader.path_stats�s��
��
�����b�j�j�9�9rc�@�t|�}|j|||��S)N��_mode)r�r^)r�r�r�r1rZs     rr`z SourceFileLoader._cache_bytecode�s!���+�&���}�}�]�D��}�=�=rrlr�c��t|�\}}g}|r8t|�s-t|�\}}|j|�|rt|�s�-t|�D]$}t	||�}	tj|��&	t|||�tjd|�y#t$rY�Wt$r"}tjd||�Yd}~yd}~wwxYw#t$r!}tjd||�Yd}~yd}~wwxYw)zWrite bytes data to a file.zcould not create {!r}: {!r}Nzcreated {!r})rRrarA�reversedrIr�mkdir�FileExistsErrorrXr�r�rz)	r�rEr1r��parentr�rCrKr s	         rr^zSourceFileLoader.set_data�s��&�t�,�����
��[��0�&�v�.�L�F�D����d�#��[��0��Z�(�	�D����-�F�

��	�	�&�!�	�	-��$��e�,��'�'���=��#�
���
��+�+�,I�,2�C�9���
���	-��'�'�(E�t�(+�
-�
-��	-�s6�&B"�>#C�"	C�-C�5C�C�	D�#C?�?DN)r�r�r�r�r\r`r^rrrr�r��s��H�:�
>�
-2�-rr�c��eZdZdZd�Zd�Zy)�SourcelessFileLoaderz-Loader which handles sourceless file imports.c��|j|�}|j|�}||d�}t|||�tt	|�dd||��S)Nr�r�)r�r�)rrcr�r�rn)r�r+rEr1r�s     rrMzSourcelessFileLoader.get_code�s_��� � ��*���}�}�T�"����
��	�d�H�k�2� ��t��R�S�!���
�	
rc��y)z'Return None as there is no source code.NrrTs  rrdzSourcelessFileLoader.get_source����rN)r�r�r�r�rMrdrrrr�r��s��7�
� rr�c�P�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zed
��Z
y)r�z]Loader for extension modules.

    The constructor is designed to work with FileFinder.

    c� �||_||_yrNr�)r�r�rEs   rrDzExtensionFileLoader.__init__�s����	���	rc�j�|j|jk(xr|j|jk(SrNr{r}s  rrzExtensionFileLoader.__eq__r�rc�X�t|j�t|j�zSrNr�r�s rr�zExtensionFileLoader.__hash__r�rc��tjtj|�}tj	d|j
|j�|S)z(Create an uninitialized extension modulez&extension module {!r} loaded from {!r})r�rNr��create_dynamicr�r�rE)r�rrPs   rrJz!ExtensionFileLoader.create_modules@���5�5�����'���#�#�$L����D�I�I�	/��
rc��tjtj|�tj	d|j
|j�y)zInitialize an extension modulez(extension module {!r} executed from {!r}N)r�rNr��exec_dynamicr�r�rE�r�rPs  rrQzExtensionFileLoader.exec_modules6���,�,�T�->�->��G��#�#�$N����D�I�I�	/rc�d��t|j�d�t�fd�tD��S)z1Return True if the extension module is a package.rc3�.�K�|]}�d|zk(���y�w)rDNr)r	�suffix�	file_names  �rrz1ExtensionFileLoader.is_package.<locals>.<genexpr>s#�����5���
�V� 3�3�5�s�)rRrE�anyr>)r�r+r�s  @rrzExtensionFileLoader.is_packages0�����	�	�*�1�-�	��5�!3�5�5�	5rc��y)z?Return None as an extension module cannot create a code object.NrrTs  rrMzExtensionFileLoader.get_coder�rc��y)z5Return None as extension modules have no source code.NrrTs  rrdzExtensionFileLoader.get_sourcer�rc��|jSr�rUrTs  rrz ExtensionFileLoader.get_filename#r�rN)r�r�r�r�rDrr�rJrQrrMrdr�rrrrr�r��sC����1�1��/�5������rr�c�V�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zy)�_NamespacePatha&Represents a namespace package's path.  It uses the module name
    to find its parent module, and from there it looks up the parent's
    __path__.  When this changes, the module's own path is recomputed,
    using path_finder.  For top-level modules, the parent module's path
    is sys.path.rc��||_||_t|j��|_|j
|_||_yrN)�_name�_pathr��_get_parent_path�_last_parent_path�_epoch�_last_epoch�_path_finder�r�r�rE�path_finders    rrDz_NamespacePath.__init__4s:����
���
�!&�t�'<�'<�'>�!?����;�;���'��rc�T�|jjd�\}}}|dk(ry|dfS)z>Returns a tuple of (parent-module-name, parent-path-attr-name)rhr
)rrE�__path__)r�r�)r�r��dot�mes    r�_find_parent_path_namesz&_NamespacePath._find_parent_path_names;s3���*�*�/�/��4����R��"�9� ��z�!�!rc�b�|j�\}}ttj||�SrN)r�r�r�modules)r��parent_module_name�path_attr_names   rr�z_NamespacePath._get_parent_pathEs-��-1�-I�-I�-K�*��N��s�{�{�#5�6��G�Grc�Z�t|j��}||jk7s|j|jk7r_|j|j|�}|�)|j�|jr|j|_	||_|j|_|jSrN)
r�r�r�r�r�r�r�rrr�)r��parent_pathrs   r�_recalculatez_NamespacePath._recalculateIs����D�1�1�3�4���$�0�0�0�D�K�K�4�CS�CS�4S��$�$�T�Z�Z��=�D���D�K�K�$7��2�2�!%�!@�!@�D�J�%0�D�"�#�{�{�D���z�z�rc�4�t|j��SrN)�iterr�r�s r�__iter__z_NamespacePath.__iter__Ws���D�%�%�'�(�(rc�(�|j�|SrN�r�)r��indexs  r�__getitem__z_NamespacePath.__getitem__Zs��� � �"�5�)�)rc�"�||j|<yrN�r�)r�r�rEs   r�__setitem__z_NamespacePath.__setitem__]s�� ��
�
�5�rc�4�t|j��SrN)rr�r�s r�__len__z_NamespacePath.__len__`s���4�$�$�&�'�'rc�"�d|j�d�S)Nz_NamespacePath(�)r�r�s r�__repr__z_NamespacePath.__repr__cs�� �����a�0�0rc�&�||j�vSrNr��r��items  r�__contains__z_NamespacePath.__contains__fs���t�(�(�*�*�*rc�:�|jj|�yrN)r�rAr�s  rrAz_NamespacePath.appendis���
�
���$�rN)r�r�r�r�r�rDr�r�r�r�r�r�r�r�r�rArrrr�r�)sF����F�(�"�H��)�*�!�(�1�+� rr�c�<�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
y	)
�NamespaceLoaderc�(�t|||�|_yrN)r�r�r�s    rrDzNamespaceLoader.__init__qs��#�D�$��<��
rc��y)NTrrTs  rrzNamespaceLoader.is_packagets��rc��y)Nr
rrTs  rrdzNamespaceLoader.get_sourcews��rc� �tdddd��S)Nr
z<string>rOT)rg)rhrTs  rrMzNamespaceLoader.get_codezs���r�:�v�D�A�Arc��yrHrrIs  rrJzNamespaceLoader.create_module}rKrc��yrNrr�s  rrQzNamespaceLoader.exec_module�s��rc�n�tjd|j�tj||�S)zbLoad a namespace module.

        This method is deprecated.  Use exec_module() instead.

        z&namespace module loaded with path {!r})r�r�r�rSrTs  rrUzNamespaceLoader.load_module�s1��	�#�#�$L�$(�J�J�	0��+�+�D�(�;�;rc�2�ddlm}||j�S)Nr)�NamespaceReader)r�r�r�)r�rPr�s   rr�z#NamespaceLoader.get_resource_reader�s��5��t�z�z�*�*rN)r�r�r�rDrrdrMrJrQrUr�rrrr�r�ps+��=���B�9�
�
<�+rr�c�t�eZdZdZed��Zed��Zed��Zed	d��Z	ed
d��Z
ed��Zy)�
PathFinderz>Meta path finder for sys.path and package __path__ attributes.c�8�ttjj��D]A\}}|�t	|�stj|=�%t|d�s�2|j
��Ctxjdz
c_ddl	m
}|j
�y)z}Call the invalidate_caches() method on all path entry finders
        stored in sys.path_importer_caches (where implemented).N�invalidate_cachesrr��MetadataPathFinder)�listr�path_importer_cache�itemsrer�r�r�r��importlib.metadatar�)r��finderr�s   rr�zPathFinder.invalidate_caches�s���!��!8�!8�!>�!>�!@�A�	+�L�D�&��~�[��%6��+�+�D�1���!4�5��(�(�*�
	+�	����"��9��,�,�.rc���tj�*tjstjdt�tjD]}	||�cSy#t
$rY�wxYw)z.Search sys.path_hooks for a finder for 'path'.Nzsys.path_hooks is empty)r�
path_hooksrr��
ImportWarningr�)rE�hooks  r�_path_hookszPathFinder._path_hooks�s^���>�>�%�c�n�n��N�N�4�m�D��N�N�	�D�
��D�z�!�	����
��
�s�A�	A'�&A'c���|dk(r	tj�}	tj|}|S#t$rYywxYw#t
$r(|j
|�}|tj|<Y|SwxYw)z�Get the finder for the path entry from sys.path_importer_cache.

        If the path entry is not in the cache, find the appropriate finder
        and cache it. If no finder is available, store None.

        r
N)rr`�FileNotFoundErrorrr��KeyErrorr�)r3rEr�s   r�_path_importer_cachezPathFinder._path_importer_cache�s����2�:�
��z�z�|��
	3��,�,�T�2�F��
��%�
��
���	3��_�_�T�*�F�,2�C�#�#�D�)��
�	3�s�1�A�	=�=�-A1�0A1Nc�:�g}|D]v}t|t�s�|j|�}|��(|j||�}|��=|j�|cS|j
}|�t
d��|j|��xtj|d�}||_|S)z?Find the loader or namespace_path for this module/package name.Nzspec missing loader)
r�r�rr;rrr�r�r�r)	r3r+rEr:�namespace_path�entryr�r�portionss	         r�	_get_speczPathFinder._get_spec�s���
���	�E��e�S�)���-�-�e�4�F��!��'�'��&�9���<���;�;�*��K��:�:���#�%�&;�<�<�
�%�%�h�/�#	�&�(�(��4�8�D�.<�D�+��Krc���|�tj}|j|||�}|�y|j�4|j}|r%d|_t
|||j�|_|Sy|S)z�Try to find a spec for 'fullname' on sys.path or 'path'.

        The search is based on sys.path_hooks and sys.path_importer_cache.
        N)rrErrrr
r�)r3r+rEr:rrs      rr;zPathFinder.find_spec�sr���<��8�8�D��}�}�X�t�V�4���<��
�[�[�
 �!�<�<�N��#���2@��>�[^�[h�[h�2i��/�����Krc�2�ddlm}|j|i|��S)a 
        Find distributions.

        Return an iterable of all Distribution instances capable of
        loading the metadata for packages matching ``context.name``
        (or all names if ``None`` indicated) along the paths in the list
        of directories ``context.path``.
        rr�)r�r��find_distributions)r�r�r�s   rrzPathFinder.find_distributionss ��	:�4�!�4�4�d�E�f�E�ErrNr<)r�r�r�r�r?r�r�r@rrr;rrrrr�r��s}��H��/��/�"�
��
�����*����8����.�
F��
Frr�c�F�eZdZdZd�Zd�Zd�Zd
d�Zd�Ze	d��Z
d	�Zy)�
FileFinderz�File-based finder.

    Interactions with the file system are cached for performance, being
    refreshed when the directory the finder is handling has been modified.

    c���g}|D]\�}|j�fd�|D���!||_|r|dk(rtj�|_nt|�|_d|_t�|_t�|_	y)z�Initialize with the path to search on and a variable number of
        2-tuples containing the loader and the file suffixes the loader
        recognizes.c3�&�K�|]}|�f���
y�wrNr)r	r�rs  �rrz&FileFinder.__init__.<locals>.<genexpr>%s�����C��F�F�+�C�s�rhr�N)
r��_loadersrr`rErj�_path_mtime�set�_path_cache�_relaxed_path_cache)r�rE�loader_details�loadersrrs     @rrDzFileFinder.__init__sw����� .�	D��F�H��N�N�C�(�C�C�	D���
��t�s�{��
�
��D�I�%�d�+�D�I�����5���#&�5�� rc��d|_y)zInvalidate the directory mtime.r�N)rr�s rr�zFileFinder.invalidate_caches0s
����rc�2�|||�}t||||��S)Nr)r)r�rr+rE�smslr:rs       rrzFileFinder._get_spec4s&���h��-��&�x��f�BF�H�	HrNc��d}|jd�d}	t|jxstj��j
}||jk7r|j�||_t�r|j}|j�}n|j}|}||vrit|j|�}|jD]9\}	}
d|	z}t||�}t|�s�#|j!|
|||g|�cSt#|�}|jD]a\}	}
	t|j||	z�}t&j)d|d��||	z|vs�@t|�s�L|j!|
||d|�cS|r6t&j)d	�t&j+|d�}
|g|
_|
Sy#t$rd}Y��wxYw#t$$rYywxYw)
zoTry to find a spec for the specified module.

        Returns the matching spec, or None if not found.
        Frhr5r�rDNz	trying {})�	verbosityzpossible namespace for {})r�rVrErr`r�rXr�_fill_cacherrr�rrIrr^rrar�r�r�rr)r�r+r:�is_namespace�tail_moduler��cache�cache_module�	base_pathr�r�
init_filename�	full_pathrs              rr;zFileFinder.find_spec9s���
���)�)�#�.�q�1��	��t�y�y�8�C�J�J�L�9�B�B�E��D�$�$�$�����$�D���=��,�,�E�&�,�,�.�L��$�$�E�&�L��5� �"�4�9�9�k�:�I�(,�
�
�
6�$��� *�V� 3�
�&�y�-�@�	��	�*��>�>�,��)�i�[�Z`�a�a�	
6� +�9�5��$(�M�M�		8� �F�L�
�&�t�y�y�+��2F�G�	�
�'�'��Y�!�'�L��f�$��-��	�*��>�>�,��)�*.��8�8�		8���'�'�(C�Y�O��(�(��4�8�D�/8�k�D�+��K���Q�	��E�	��8�
��
�s#�5F>�(G�>G
�G
�	G�Gc�T�|j}	tj|xstj��}tjjd�st|�|_nXt�}|D]B}|jd�\}}}|r|�d|j���}n|}|j|��D||_tjjt�r$|D�	chc]}	|	j���c}	|_yy#tt
tf$rg}Y��wxYwcc}	w)zDFill the cache of potential modules and packages for this directory.rrhN)rEr�listdirr`r�PermissionError�NotADirectoryErrorrr r!rrr�r��addr"r)
r�rE�contents�lower_suffix_contentsr�r�r�r��new_name�fns
          rrzFileFinder._fill_cachels���y�y��	��{�{�4�#7�3�:�:�<�8�H��|�|�&�&�u�-�"�8�}�D��%(�E�!� �
4��$(�N�N�3�$7�!��c�6��"&��q�����(8�9�H�#�H�%�)�)�(�3�

4� 5�D���<�<�"�"�#>�?�=E�'F�r����
�'F�D�$�@��/"�?�4F�G�	��H�	��0(Gs�+D	�(D%�	D"�!D"c������fd�}|S)aA class method which returns a closure to use on sys.path_hook
        which will return an instance using the specified loaders and the path
        called on the closure.

        If the path called on the closure is not a directory, ImportError is
        raised.

        c�F��t|�s
td|����|g����S)z-Path hook for importlib.machinery.FileFinder.zonly directories are supportedrU)rar�)rEr3rs ��r�path_hook_for_FileFinderz6FileFinder.path_hook.<locals>.path_hook_for_FileFinder�s)����t�$�!�"B��N�N��t�-�n�-�-rr)r3rr/s`` r�	path_hookzFileFinder.path_hook�s���	.�(�'rc�"�d|j�d�S)NzFileFinder(r�rUr�s rr�zFileFinder.__repr__�s���T�Y�Y�M��+�+rrN)r�r�r�r�rDr�rr;rr@r0r�rrrr
r
s<���)�"�H�
1�fG�>�(��(�",rr
c�2�|jd�}|jd�}|s-|r
|j}n||k(r
t||�}nt||�}|s t	|||��}|rt|�|_	||d<||d<||d<||d<y#t$rYywxYw)Nrr)r�__file__�
__cached__)rrr�r�rrj�cached�	Exception)�nsr��pathname�	cpathnamerrs      r�_fix_up_moduler:�s���
�V�V�L�
!�F�
�6�6�*��D����[�[�F�
��
"�)�$��9�F�%�d�H�5�F��&�t�X�f�E���'�	�2�D�K�
���:��!��<��!��:��$��<����
��
�s�5B
�
	B�Bc�p�ttj�f}ttf}t
tf}|||gS)z_Returns a list of file-based module loaders.

    Each item is a tuple (loader, suffixes).
    )r�r��extension_suffixesr�r�r�r�)�
extensions�source�bytecodes   rrr�s9��
%�d�&=�&=�&?�?�J�
��
.�F�#�%6�6�H����)�)rc��|ayrN)r�)�_bootstrap_modules r�_set_bootstrap_modulerB�s��"�Jrc���t|�t�}tjj	tj|�g�tjjt�y)z)Install the path-based import components.N)
rBrrr�r�r
r0�	meta_pathrAr�)rA�supported_loaderss  r�_installrF�sG���+�,�3�5���N�N���:�/�/�1B�C�D�E��M�M����$r)rlrN)NNN)rr)T)Wr�r�r�rsrrr�r r=�ntrr%�posixr>�allr?r�r;rB�_pathseps_with_colonr#�%_CASE_INSENSITIVE_PLATFORMS_BYTES_KEYr"r$rr,r2r6rIrRrVr\r^rarerjrz�type�__code__r�r*r�r)r/rpr�r�r�rAr<r>r��DEBUG_BYTECODE_SUFFIXES�OPTIMIZED_BYTECODE_SUFFIXESr�r�r�r�r�r�r�r�r�r�r�r�rrrrr!r#rBrWrxr�r�r�r�r��_NamespaceLoaderr�r
r:rrBrF)�ss0r�<module>rRs����,�
��
�
����|�|�w�&��������S�k�O��e�O�
�
4�O�
4�4�4�4��1�����'���'�'�/�*��)8�9�A�!�A�3��9��'-�#�(:�%� E�"E�!F��� � ��7�
*�
*��*�<?�"��2�.�
.��R�0�
��,�-�(�(�
)�
�p���q�(�+�g�5���N�N�<��:����
���'������6�"�,�T�,�,�.���H��8I�I��5�C0��C0�L%@�PG�&	�	��>�BL�8
�0
9���	D�
�H�	�C�4�7@�C�L-�d0�0�f<�<�<N�=�N�b/ �/ �d*-�z�<�*-�Z�:�}��22�*�m�2�jA �A �N!+�!+�J#��
yF�yF�xH,�H,�Z
�2*�#�
%��u4:s�4G7
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!