HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/libregrtest/__pycache__/setup.cpython-310.opt-1.pyc
o

�i��@s�ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
zddlZWney7dZYnwddl
mZmZdZdd�Zdd	�Zd
d�ZdS)�N)�support)�TESTFN_UNDECODABLE�FS_NONASCII)�setup_unraisable_hook�setup_threading_excepthookZPYTHONREGRTEST_UNICODE_GUARDc		Csjztj��}Wn
ttfyd}Yn-wtjd|d�g}ttd�r)|�	tj
�ttd�r4|�	tj�|D]
}tj|d|d�q6t
�t�t�tj�|jr\tj�dtj�|j��tj��D](}t|d�r{t|j�D]
\}}tj�|�|j|<qmt|dd�r�tj�|j�|_qa|jr�d	tj_ t�!�|j"dur�t�#|j"�|j$dur�t%�&|j$�t�'|j(o�|j(d
k�|j)t_)ttd�r�dd
�}t�*|�t+�t,�|j-du�rt.tj/|j-d�t_/t.tj0|j-d�t_0t1tj2|j-�t_2t1tj3|j-�t_3t1tj/|j-�t_/t1tj0|j-�t_0|j4�rddl5m6}d|_7t8�r'tj9�r'tj:�;t<�=�t8�dSt>�r3tj?�;t<t>�dSdS)NT)Zall_threads�file�SIGALRM�SIGUSR1)�chainrr�__path__�__file__F��addaudithookcSsdS�N�)�name�argsrr�3/usr/local/lib/python3.10/test/libregrtest/setup.py�_test_audit_hookUsz%setup_tests.<locals>._test_audit_hook�(�)�RegressionTestResult)@�sys�
__stderr__�fileno�
ValueError�AttributeError�faulthandler�enable�hasattr�signal�appendrr	�register�_adjust_resource_limits�replace_stdoutrZrecord_original_stdout�stdoutZtestdir�path�insert�os�abspath�modules�values�	enumerater�getattrrZ
huntrleaks�unittestZ
BaseTestSuite�_cleanup�_deactivate_opcache�memlimitZset_memlimitZ	threshold�gcZ
set_thresholdZsuppress_msvcrt_asserts�verboseZ
use_resourcesrrr�timeout�maxZ
SHORT_TIMEOUTZLONG_TIMEOUT�minZLOOPBACK_TIMEOUTZINTERNET_TIMEOUTZxmlpathZtest.support.testresultrZUSE_XMLr�supports_bytes_environ�environb�
setdefault�UNICODE_GUARD_ENV�encoder�environ)	�nsZ	stderr_fdZsignals�signum�module�indexr&rrrrr�setup_testssl�


�



�rAcsZtj�z���}Wn
tyYdSwt|d�jdddd�t_�fdd�}t�|�dS)	z�Set stdout encoder error handler to backslashreplace (as stderr error
    handler) to avoid UnicodeEncodeError when printing a tracebackN�w�backslashreplaceF�
)�encoding�errors�closefd�newlinecstj���t_dSr)rr%�closer�r%rr�restore_stdout�s

z&replace_stdout.<locals>.restore_stdout)rr%rr�openrE�atexitr")�fdrKrrJrr$ss��r$cCs�zddl}ddlm}m}Wn
tyYdSw|�|�\}}d}||krh||krjt||�}z|�|||f�td|�d|���WdStt	fyg}ztd|�d|�d	|�d
��WYd}~dSd}~wwdSdS)z5Adjust the system resource limits (ulimit) if needed.rN)�
RLIMIT_NOFILE�
RLIM_INFINITYizRaised RLIMIT_NOFILE: z -> z#Unable to raise RLIMIT_NOFILE from z to z: �.)
�resourcerOrP�ImportErrorZ	getrlimitr6Z	setrlimit�printr�OSError)rRrOrPZfd_limitZmax_fdsZdesired_fdsZnew_fd_limit�errrrrr#�s,�

�����r#)rMrr(r rr.�testrZtest.support.os_helperrrr2rSZtest.libregrtest.utilsrrr:rAr$r#rrrr�<module>s$�^