Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/coverage/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/coverage/__pycache__/execfile.cpython-311.pyc

�

�܋fe/��X�dZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddlm
Z
mZddlmZmZmZmZddlmZddlmZmZmZmZdd	lmZmZdd
lmZddl m!Z!ee��Zej"j#Z$Gd�d
��Z%dd�Z&Gd�d��Z'dd�Z(dd�Z)d d�Z*d d�Z+dS)!zExecute files of Python code.�)�annotationsN)�
ModuleSpec)�CodeType�
ModuleType)�Any�List�Optional�Tuple)�env)�CoverageException�_ExceptionDuringRun�NoCode�NoSource)�canonical_filename�python_reported_file)�isolate_module)�get_python_sourcec��eZdZdZd
d�Zd	S)�DummyLoaderzzA shim for the pep302 __loader__, emulating pkgutil.ImpLoader.

    Currently only implements the .fullname attribute
    �fullname�str�_argsr�return�Nonec��||_dS)N)r)�selfrrs   �d/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/coverage/execfile.py�__init__zDummyLoader.__init__$s
�� ��
�
�
�N)rrrrrr)�__name__�
__module__�__qualname__�__doc__r�rrrrs2��������!�!�!�!�!�!rr�
modulenamerr�%Tuple[Optional[str], str, ModuleSpec]c���	tj�|��}n/#t$r"}t	t|����|�d}~wwxYw|st	d|�����|j}|j}|jrM|dz}tj�|��}|st	d|�d�|�d�z���|j}|j}|�	d��d}|||fS)z�Find the module named `modulename`.

    Returns the file path of the module, the name of the enclosing
    package, and the spec.
    NzNo module named z	.__main__z; z- is a package and cannot be directly executed�.r)
�	importlib�util�	find_spec�ImportErrorrr�origin�name�submodule_search_locations�
rpartition)r%�spec�err�pathname�packagename�mod_mains      r�find_moduler6(s��*��~�'�'�
�3�3�����*�*�*��s�3�x�x� � �c�)�����*�����:��8�*�8�8�9�9�9��{�H��)�K��&�	 ���+���~�'�'��1�1���	��/�8�/�/�/��N�N�N�O���
��;���i���(�(��-�-�a�0�K��[�$�&�&s�"�
A�A	�	Ac�4�eZdZdZddd	�Zdd
�Zdd�Zdd�Zd
S)�PyRunnerzwMulti-stage execution of Python code.

    This is meant to emulate real Python execution as closely as possible.

    F�args�	List[str]�	as_module�boolrrc��||_||_|d|_d|_d|_d|_d|_d|_dS)Nr)r9r;�arg0�packager%r3�loaderr1)rr9r;s   rrzPyRunner.__init__LsB����	�"�����G��	�&*���)-���'+��
�-1���*.��	�	�	rc���|jrtj��}nmtj�|j��r|j}nAtj�tj�|j����}tj�tjd��r�tj
��ddjj}tj�tjd��}tj�tj�|����}t|��}t|��}||krd}nPtjdtj�tjd��kr
tjd=|�t|��tjd<dSdS)zsSet sys.path properly.

        This needs to happen before any importing, and without importing anything.
        r���N�)r;�os�getcwd�path�isdirr>�abspath�dirname�sys�inspect�stack�f_code�co_filenamerr)r�path0�top_file�sys_path_0_abs�top_file_dir_abss     r�preparezPyRunner.prepareWsZ���>�	@��I�K�K�E�E�
�W�]�]�4�9�
%�
%�	@��I�E�E��G�O�O�B�G�O�O�D�I�$>�$>�?�?�E�
�7�=�=���!��%�%�	 ��}���r�*�1�-�4�@�H��W�_�_�S�X�a�[�9�9�N�!�w���r�w���x�/H�/H�I�I��/��?�?�N�1�2B�C�C���!1�1�1����
�x��{�b�g�o�o�c�h�q�k�:�:�:�:��H�Q�K���.�u�5�5�C�H�Q�K�K�K��rc���|jr�|j|_t|j��\}|_|_|j�|jj|_t|j��|_|�J�tj
�|��|_|jx|j
d<|_�n2tj
�|j��r�dD]�}tj
�|jd|z��}t jdkrtj
�|��}tj
�|��r	||_n��t'd|j�d����t)|��}t*j�dd|���|_d	|j_d
|_td��|_ntd��|_t)|j��|_dS)z�Do more preparation to run Python code.

        Includes finding the module to run and adjusting sys.argv[0].
        This method is allowed to import code.

        Nr)z.py�.pyc�.pyo�__main__)���
z!Can't find '__main__' module in '�')r-T�)r;r>r%r6r?r1r.rr@rDrFrHr3r9rG�joinr�	PYVERSION�existsrrr)�	machineryr�has_location)rr3�ext�try_filenames    r�	_prepare2zPyRunner._prepare2~s����>� 	2�"�i�D�O�0;�D�O�0L�0L�-�H�d�l�D�I��y�$�"&�)�.���%�d�o�6�6�D�K��'�'�'��G�O�O�H�5�5�D�M�'+�}�4�D�I�a�L�4�9�9�
�W�]�]�4�9�
%�
%�	2�/�
Q�
Q��!�w�|�|�D�I�z�C�7G�H�H���=�J�.�.�#%�7�?�?�<�#@�#@�L��7�>�>�,�/�/�� ,�D�I��E���O�4�9�O�O�O�P�P�P�0��=�=�L�!�+�6�6�z�4�P\�6�]�]�D�I�%)�D�I�"��D�L�%�j�1�1�D�K�K�%�j�1�1�D�K�(���3�3��	�	�	rc��|���td��}|j�d��}|j|_|r|jdd�|_|j�|j|_|j|_|j	�|j	|_
tjd|_
|tjd<|jt_	|rt!|j��}nt#|j��}nF#t$$r�t&$r/}d|j�d|jj�d|��}t%|��|�d}~wwxYwt-j��}	t1||j���nj#t4$r�t&$�rRtj��\}}}	|�J�|�J�|	�J�t9|d	d��	|j�J�|jj|_tj|||	j��tj d
��n�#t4$r�t&$r�}tj!�"d��tj��\}
}}|
�J�|�J�|�J�d|_#|j�J�|jj|_tj$|
||j��tj!�"d
��tK|||	j��|�d}~wwxYwYnwxYwt-j&|��dS#t-j&|��wxYw)zRun the Python code!rW)rUrVNrB�builtinszCouldn't run 'z' as Python code: z: �__context__rCzError in sys.excepthook:
Tz
Original exception was:
)'rdrr>�endswith�__file__r?�__package__r@�
__loader__r1�__spec__rJ�modules�__builtins__r9�argv�make_code_from_pyc�make_code_from_pyr�	Exception�	__class__r rDrE�exec�__dict__�
SystemExit�exc_info�getattr�
__traceback__�tb_next�
excepthook�exit�stderr�write�__suppress_context__�__excepthook__r
�chdir)
r�main_mod�from_pyc�code�exc�msg�cwd�typr2�tb�typ2�err2�tb2s
             r�runzPyRunner.run�sK��	
�������j�)�)���9�%�%�&6�7�7�� �I����	7� (� 1�#�2�#� 6�H���<�#�#'�<�H� �"�k����9� � $�	�H�� #��J� 7���"*���J���9���
	2��
4�)�$�)�4�4���(���3�3���� �	�	�	���	2�	2�	2�_�4�9�_�_��
�@V�_�_�Z]�_�_�C�#�C�(�(�c�1�����	2�����i�k�k��/	���x�(�)�)�)�)���	�	�	�
��'	�'	�'	��<�>�>�L�C��b��?�?�?��?�?�?��>�>�>�
�C���-�-�-�
��(�4�4�4�$'�$5�$=��!���s�C���4�4�4�$��������#�
�
�
���

I�

I�

I��
� � �!=�>�>�>�"%�,�.�.���d�C��'�'�'��'�'�'�����,0��)��)�5�5�5�%)�%7�%?��"��"�4��s�{�;�;�;��
� � �!>�?�?�?�)�#�s�B�J�?�?�S�H�����

I������O'	����R
�H�S�M�M�M�M�M��B�H�S�M�M�M�M���sh�
+C6�6D9�
*D4�4D9�E'�%K'�'A	K�15G;�&K�;K�B4K�K�K�K'�
K�K'�'K=N)F)r9r:r;r<rr)rr)r r!r"r#rrSrdr�r$rrr8r8Fs{��������
	/�	/�	/�	/�	/�%6�%6�%6�%6�N)4�)4�)4�)4�VX�X�X�X�X�Xrr8r9r:rc�x�t|d���}|���|���dS)aRun a Python module, as though with ``python -m name args...``.

    `args` is the argument array to present as sys.argv, including the first
    element naming the module being executed.

    This is a helper for tests, to encapsulate how to use PyRunner.

    T�r;N�r8rSr��r9�runners  r�run_python_moduler�s7���d�d�
+�
+�
+�F�
�N�N����
�J�J�L�L�L�L�Lrc�x�t|d���}|���|���dS)aGRun a Python file as if it were the main program on the command line.

    `args` is the argument array to present as sys.argv, including the first
    element naming the file being executed.  `package` is the name of the
    enclosing package, if any.

    This is a helper for tests, to encapsulate how to use PyRunner.

    Fr�Nr�r�s  r�run_python_filer�s7���d�e�
,�
,�
,�F�
�N�N����
�J�J�L�L�L�L�Lr�filenamerc��	t|��}n-#ttf$r}td|�d���|�d}~wwxYwt||dd���S)z8Get source from `filename` and make a code object of it.�No file to run: 'r[NrtT)�dont_inherit)r�OSErrorr�compile)r��sourcer�s   rrqrq!st��A�"�8�,�,�����X��A�A�A��6�8�6�6�6�7�7�S�@�����A�����6�8�V�$�?�?�?�?s��<�7�<c�`�	t|d��}n&#t$r}td|�d���|�d}~wwxYw|5|�d��}|tkrtd|�dt�����tjd|�d����d	}|d
z}|r|�d��n*|�d��|�d��tj|��}t|t��sJ�	ddd��n#1swxYwY|S)z#Get a code object from a .pyc file.�rbr�r[N�zBad magic number in .pyc file: z != z<LrrCrY)�openr�r�read�PYC_MAGIC_NUMBER�struct�unpack�marshal�load�
isinstancer)r��fpycr��magic�flags�
hash_basedr�s       rrprp,s���?��H�d�#�#�����?�?�?��4��4�4�4�5�5�3�>�����?����
�*�*��	�	�!�����$�$�$��\�5�\�\�HX�\�\�]�]�]��
�d�D�I�I�a�L�L�1�1�!�4���T�\�
��	��I�I�a�L�L�L�L�
�I�I�a�L�L�L��I�I�a�L�L�L��|�D�!�!���$��)�)�)�)�)�)�%*�*�*�*�*�*�*�*�*�*�*����*�*�*�*�(�Ks"��
6�1�6�CD#�#D'�*D')r%rrr&)r9r:rr)r�rrr),r#�
__future__r�importlib.machineryr)�importlib.utilrKr�rDr�rJr�typesrr�typingrrr	r
�coverager�coverage.exceptionsrr
rr�coverage.filesrr�
coverage.miscr�coverage.pythonrr*�MAGIC_NUMBERr�rr6r8r�r�rqrpr$rr�<module>r�s��$�#�"�"�"�"�"�"�����������������	�	�	�	�
�
�
�
�
�
�
�
�*�*�*�*�*�*�&�&�&�&�&�&�&�&�-�-�-�-�-�-�-�-�-�-�-�-�������X�X�X�X�X�X�X�X�X�X�X�X�C�C�C�C�C�C�C�C�(�(�(�(�(�(�-�-�-�-�-�-��^�B�����>�.��!�!�!�!�!�!�!�!�'�'�'�'�<{�{�{�{�{�{�{�{�|��������@�@�@�@������r

Hacked By AnonymousFox1.0, Coded By AnonymousFox