ok

Mini Shell

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

�

�܋f���dZddlZddlZddlZddlZddlZddlZddlmZm	Z	dZ
ejjZ
e
jZGd�de
��ZGd�d��Zd	ed
dfd�ZdS)z>Monkey-patching to add multiprocessing support for coverage.py�N)�Any�Dictz_coverage$patchedc��eZdZdZd�ZdS)�ProcessWithCoveragez<A replacement for multiprocess.Process that starts coverage.c��	ddlm}|dd���}d|_|���|j}|�J�|�d��r|�d��n[#t$rNtd	��tj
tj�
��tj�
���wxYw	t|g|�Ri|��|�d��r|�d��|���|���|�d��r|�d��SS#|�d��r|�d��|���|���|�d��r|�d��wwxYw)
z,Wrapper around _bootstrap to start coverage.r)�CoverageT)�data_suffix�	auto_dataFN�	multiprocz!Calling multiprocessing bootstrapz0Exception during multiprocessing bootstrap init:)�filez"Finished multiprocessing bootstrapzSaved multiprocessing data)�coverager�_warn_preimported_source�start�_debug�should�write�	Exception�print�	traceback�	print_exc�sys�stdout�flush�original_bootstrap�stop�save)�self�args�kwargsr�cov�debugs      �e/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/coverage/multiproc.py�
_bootstrapzProcessWithCoverage._bootstraps���
	�)�)�)�)�)�)��(�t�t�<�<�<�C�+0�C�(��I�I�K�K�K��J�E��$�$�$��|�|�K�(�(�
A����?�@�@�@����	�	�	��D�E�E�E���S�Z�0�0�0�0��J�������		����
	:�%�d�<�T�<�<�<�V�<�<��|�|�K�(�(�
B����@�A�A�A��H�H�J�J�J��H�H�J�J�J��|�|�K�(�(�
:����8�9�9�9�9�
:��	�|�|�K�(�(�
B����@�A�A�A��H�H�J�J�J��H�H�J�J�J��|�|�K�(�(�
:����8�9�9�9�9�
:���s�A#A&�&AB>�E�A?GN)�__name__�
__module__�__qualname__�__doc__r#��r"rrs)������F�F�:�:�:�:�:r)rc�^�eZdZdZdeddfd�Zdeeeffd�Zdeeefddfd�ZdS)	�StowawayzLAn object to pickle, so when it is unpickled, it can apply the monkey-patch.�rcfile�returnNc��||_dS)N�r,)rr,s  r"�__init__zStowaway.__init__7s
������r)c��d|jiS�Nr,r/)rs r"�__getstate__zStowaway.__getstate__:s���$�+�&�&r)�statec�0�t|d��dSr2)�patch_multiprocessing)rr4s  r"�__setstate__zStowaway.__setstate__=s���e�H�o�.�.�.�.�.r))	r$r%r&r'�strr0rr3r7r(r)r"r+r+5s�������V�V��s��t�����'�d�3��8�n�'�'�'�'�/�$�s�C�x�.�/�T�/�/�/�/�/�/r)r+r,r-c����ttt��rdStjt
_tj����tj	d<	ddlm
}|j�dtdtttff��fd�}||_n#tt f$rYnwxYwt#ttd��dS)	z�Monkey-patch the multiprocessing module.

    This enables coverage measurement of processes started by multiprocessing.
    This involves aggressive monkey-patching.

    `rcfile` is the path to the rcfile being used.

    N�COVERAGE_RCFILEr)�spawn�namer-c�B���|��}t���|d<|S)z@Get the original preparation data, and also insert our stowaway.�stowaway)r+)r<�d�original_get_preparation_datar,s  ��r"�"get_preparation_data_with_stowawayzApatch_multiprocessing.<locals>.get_preparation_data_with_stowaway`s)���-�-�d�3�3�A�$�V�,�,�A�j�M��Hr)T)�hasattr�multiprocessing�PATCHED_MARKERrr#�OriginalProcess�os�path�abspath�environr;�get_preparation_datar8rr�ImportError�AttributeError�setattr)r,r;rAr@s`  @r"r6r6As��������/�/����!4�!?�O��%'�G�O�O�F�$;�$;�B�J� �!�H�)�)�)�)�)�)�(-�(B�%�	�S�	�T�#�s�(�^�	�	�	�	�	�	�	�&H��"�"��
��(�
�
�
���
�����O�^�T�2�2�2�2�2s�"
B�B2�1B2)r'rC�multiprocessing.processrF�os.pathrr�typingrrrD�process�BaseProcessrEr#rrr+r8r6r(r)r"�<module>rSs��E�D���������	�	�	�	�����
�
�
�
�������������
%��"�)�5��$�/��:�:�:�:�:�/�:�:�:�:	/�	/�	/�	/�	/�	/�	/�	/�'3�#�'3�$�'3�'3�'3�'3�'3�'3r)

Zerion Mini Shell 1.0