__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

*�_i�d��V�Sr\S:wa\"S5eSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKrSSK
r
SSKrSSKrSSKrSSKr/SQrSrSrSrS	r\R.R1\R.R3\55r\R.R1\5r\R.R1\5r\R.R1\5r"S
S\5r "SS
\ 5r!"SS\!5r""SS\ 5r#"SS\RH5r%Sr&Sr'Sr(Sr)Sr*Sq+Sq,Sr-Sr.Sq/Sr0Sr1Sr2Sr3Sr4S�Sjr5Sr6S r7S!r8S"r9S�S#jr:SSSSS$.S%jr;S�SSSSS$.S&jjr<\;"S'S(9r=S)r>S*r?S+r@S,rA\R�"\CR�S-5R�S.5S/5rFS�S0jrGS�S1jrHS�S2jrIS�S3jrJS4rKS�S5jrL\R�S�S6j5rNS7rO\R�S8:HrQ\R�R�S95rR\R�S::HrS\R�S;;a\S(aS<OS=rTOSrT\R�S>:HrU\R�S?:HrV\R�S@;rW\W=(d \R�SA:HrX\Y"\SB5=(a" \U=(d \V=(d \W=(d \S(+rZSCr[\U=(d \V=(d \W=(d \S(+r\SDr]\U=(d \V(+r^SSE.SFjr_Sr`\R�S8:wa\R�"SG5SG:gr`SHrcSrdSre\R.R�\SI5rgSJrhS�SKjriSLrjSM\kSN\l\k\m44SOjrnS�SSSP.SQjjroSRrp\R�SS5rqSTrrSUrsSVrtSWru\R�SX5rv\R�SY5rwSZrxS[ryS\rz\{"\R�"S]55r}S�S^jr~S_r\}(aS`r�OSar�Sbr�\�Sc-r�Sdr�Ser�Sfr�Sgr�Shr�\R�Si5r�Sjr�Skr�Slr�Sm\�-r�Sn\�-r�So\�-r�\GRr�Sp\kSN\�4Sqjr�Sp\kSNS4Srjr�"SsSt5r�S�Sujr�Svr�Swr�Sxr�Syr�S�Szjr�S{r�S|r�S}r�S~r�Sr�\R�"S�5=(d S�S�:Hr�S�r�S�r�\�"5=(a- \R�S8:g=(a \R�"S�5(+r�\�RSL=(a \�(+r�\R�"\�S�5r�S�r�S�r�\GRP\�l�Sq�S�r�\R�S�5r�\R�S�5r�S�r�S�r�"S�S�\m5r�Sq�S�r�"S�S�5r�S�r�S�S�.S�jr�S�S�jr�S�S�jr�"S�S�5r�S�r�\R�S�5r�S�r�SS�.S�jr�S�r�S�S�jr�/4S�jr�Sq�S�r�S�r�\R�S�5r�"S�S�5r�S�r�S�r�"S�S�5r�\�"5r�"S�S�5r�\�"5r�\GR�"S�S�55r�\�"5r�\GR�"S�S�55r�\�"5r�S�r�\GR�GR�r�\�S�;deS�r�"S�S�5r�SS�.S�jr�S�r�S�r�S�r�S�r�\R�S�5r�S�S�jr�S�\kS�\kSN\m4S�jr�S�\mSNS4S�jr�S�r�\GR�S�5r�\R�S�5r�\Y"\S�5r�S�r�S�S'S�.S�jjr�S�S�S�S'S�.S�jjr�"S�S�5r�\R�S�5r�S�r�S�r�\Y"\S�5=(a  \GR�"5GR�S�:Hr�\GR�"\�S�5r�\Y"\S�5r�S�r�\�"S�S�15r�S�r�S�r�S�r�\R�S�5r�S�r�S�r�SN\l\k\k44S�jr�S�r�"S�S�5r�S�r�g!\ba GN�f=f)�z7Supporting definitions for the Python regression tests.ztest.supportz.support must be imported from the test package�N)X�
PIPE_MAX_SIZE�verbose�
max_memuse�
use_resources�failfast�Error�
TestFailed�
TestDidNotRun�ResourceDenied�record_original_stdout�get_original_stdout�captured_stdout�captured_stdin�captured_stderr�captured_output�is_resource_enabled�requires�requires_freebsd_version�requires_gil_enabled�requires_linux_version�requires_mac_ver�check_syntax_error�
requires_gzip�requires_bz2�
requires_lzma�
bigmemtest�bigaddrspacetest�cpython_only�
get_attribute�requires_IEEE_754�
requires_zlib�has_fork_support�
requires_fork�has_subprocess_support�requires_subprocess�has_socket_support�requires_working_socket�anticipate_failure�load_package_tests�detect_api_mismatch�check__all__�skip_if_buggy_ucrt_strfptime�check_disallow_instantiation�check_sanitizer�skip_if_sanitizer�requires_limited_api�requires_specialization�
MS_WINDOWS�	is_jython�
is_android�
is_emscripten�is_wasi�is_apple_mobile�check_impl_detail�
unix_shell�setswitchinterval�get_pagesize�open_urlresource�
reap_children�run_with_locale�	swap_item�findfile�infinite_recursion�	swap_attr�Matcher�set_memlimit�SuppressCrashReport�sortdict�run_with_tz�PGO�missing_compiler_executable�	ALWAYS_EQ�NEVER_EQ�LARGEST�SMALLEST�LOOPBACK_TIMEOUT�INTERNET_TIMEOUT�
SHORT_TIMEOUT�LONG_TIMEOUT�Py_DEBUG�exceeds_recursion_limit�get_c_recursion_limit�
skip_on_s390x�without_optimizer�force_not_colorized�force_not_colorized_test_class�make_clean_env�
BrokenIterg$@gN@g>@g�r@c��\rSrSrSrSrg)r�qz*Base class for regression test exceptions.�N��__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r]��,/usr/lib/python3.13/test/support/__init__.pyrrqs��4rerc�:^�\rSrSrSrSS.U4SjjrSrSrU=r$)r	�t�Test failed.N��statsc�@>�XlX l[TU]"U/UQ76 g�N)�msgrk�super�__init__)�selfrnrk�args�	__class__s    �rfrp�TestFailed.__init__vs������
�
����$�t�$rec��UR$rm�rn�rqs rf�__str__�TestFailed.__str__{s���x�x�re)rnrk)	r_r`rarbrcrprxrd�
__classcell__�rss@rfr	r	ts����)-�%�%�
�rer	c�,^�\rSrSrSrU4SjrSrU=r$)�TestFailedWithDetails�~ric�:>�X lX0l[TU]
XX4S9 g)Nrj)�errors�failuresrorp)rqrnr�r�rkrss     �rfrp�TestFailedWithDetails.__init__�s����� �
�
����h��<re)r�r�)r_r`rarbrcrprdrzr{s@rfr}r}~s����=�=rer}c��\rSrSrSrSrg)r
�zTest did not run any subtests.r]Nr^r]rerfr
r
�s��(rer
c��\rSrSrSrSrg)r�z�Test skipped because it requested a disallowed resource.

This is raised when a test calls requires() for a resource that
has not be enabled.  It is used to distinguish between expected
and unexpected skips.
r]Nr^r]rerfrr�s��rerc�6�U(a[R$S$)z�Decorator to mark a test that is known to be broken in some cases

Any use of this decorator should have a comment identifying the
associated tracker issue.
c��U$rmr])�fs rf�<lambda>�$anticipate_failure.<locals>.<lambda>�s��Qre)�unittest�expectedFailure)�	conditions rfr(r(�s����'�'�'��rec�`�UcSn[nURUUUS9nURU5 U$)z�Generic load_tests implementation for simple test packages.

Most packages can implement load_tests using this function as follows:

   def load_tests(*args):
       return load_package_tests(os.path.dirname(__file__), *args)
ztest*)�	start_dir�
top_level_dir�pattern)�
STDLIB_DIR�discover�addTests)�pkg_dir�loader�standard_testsr��top_dir�
package_testss      rfr)r)�sD�������G��O�O�g�29�,3�$�5�M����M�*��rec�v�[X5nU$![a [R"SU<SU<35ef=f)z?Get an attribute, raising SkipTest if AttributeError is raised.zobject z has no attribute )�getattr�AttributeErrorr��SkipTest)�obj�name�	attributes   rfrr�sB����C�&�	�����O����3�� M�N�N�O�s��)8�Fc��Uqgrm)�_original_stdout)�stdouts rfrr�s���rec�<�[=(d [R$rm)r��sysr�r]rerfr
r
�s���)�s�z�z�)rec��U"U6$![a6n[S:�a&[URR<SU<35 eSnAf[
a�n[S:�aB[URR<SU<35 [SUR<U<35 [R"U[R5 U"U6sSnA$SnAff=f)N��: zre-run )
�FileNotFoundErrorr�printrsr_�OSError�os�chmod�stat�S_IRWXU)�path�funcrr�errs    rf�
_force_runr��s�����T�{������a�<��c�m�m�4�4�c�:�;�
�����a�<��c�m�m�4�4�c�:�;��4�=�=�$�7�8�
����t�|�|�$��T�{����s'��
C�1A�
C�A5C
�C�
Cc	�^�[[S5(a[R$SSKnSn[RRS5(aUR
5(aSnGO�[RRS5(a�SSKmSSKmSnSn"U4SjSTR5nTRRnUR5nU(dTR5eU"5nTRR5nUR!UUTR#U5TR%U5TR#U55n	U	(dTR5e['UR(U-5(dSnOb[RS	:XaNSSKn
U
R-S
S/SSS
9nUR.R1S5R35nUS:waSU<S3nU(d>SSKJn
 U
"5nUR;5 UR=5 UR?5 U[l&U(+[l[R$!U
R4a SnN�f=f![@aQn[CU5n[EU5S:�aUSSS-nSRG[IU5RJU5nSnAN�SnAff=f)N�resultr�winz(gui is not available on Windows IoT Corer�c�>�\rSrSrSYRR
4SYRR
4SYRR4/rSrg)�*_is_gui_available.<locals>.USEROBJECTFLAGS���fInherit�	fReserved�dwFlagsr]N)	r_r`rarb�wintypes�BOOL�DWORD�_fields_rd)�ctypess�rf�USEROBJECTFLAGSr��s@���#�V�_�_�%9�%9�:�$�f�o�o�&:�&:�;�"�F�O�O�$9�$9�:�<�Hrer�z,gui not available (WSF_VISIBLE flag not set)�darwin�	launchctl�managernameT)�capture_output�checkzutf-8�Aquazmanagername=z' -- can only run in a macOS GUI sessionz*unable to detect macOS launchd job manager)�Tk�2z [...]zTk unavailable due to {}: {})'�hasattr�_is_gui_availabler��platformr��
startswith�win32_is_iotr��ctypes.wintypes�	Structure�windll�user32�GetProcessWindowStation�WinErrorr�r��GetUserObjectInformationW�byref�sizeof�boolr��
subprocess�runr��decode�strip�CalledProcessError�tkinterr��withdraw�update�destroy�	Exception�str�len�format�typer_�reason)r�r��	UOI_FLAGS�WSF_VISIBLEr��dll�h�uof�needed�resr��rcr�r��root�e�
err_stringr�s                 @rfr�r��si���� �(�+�+� �'�'�'��
�F�
�|�|���u�%�%�(�*?�*?�*A�*A�;��	���	 �	 ��	'�	'�	���	���	<�f�.�.�	<��m�m�"�"���'�'�)����/�/�#�#�������&�&�(���+�+�A���L�L����M�M�#���L�L�� �	"��
��/�/�#�#��C�K�K�+�-�.�.�C�F��	����	!�	�	R�����m� <�/3�4� �A�B��)�)�*�*�7�3�9�9�;�K��f�$�(�K�>�)P�Q���	G�"��4�D��M�M�O��K�K�M��L�L�N� &���#)�z����#�#�#��1�,�,�	B�A�F�	B���	G��Q��J��:���#�'���_�x�7�
�3�:�:�4��7�;K�;K�;E�G�F��		G�s+�"<I�3=I3�I0�/I0�3
K�=AK	�	Kc�2�[SL=(d	 U[;$)z�Test whether a resource is enabled.

Known resources are set by regrtest.py.  If not running under regrtest.py,
all resources are assumed enabled unless use_resources has been set.
N)r��resources rfrr!s���D� �=�H�
�$=�=rec���[U5(dUcSU-n[U5eUS;a[(d[S5eUS:Xa)[5(d[[R5egg)z@Raise ResourceDenied if the specified resource is not available.Nz"Use of the %r resource not enabled>�network�urlfetchzNo socket support�gui)rrr&r�r�)r�rns  rfrr)sm���x�(�(��;�6��A�C��S�!�!��*�*�3E�3E��0�1�1��5��!2�!4�!4��.�5�5�6�6�"5�rec�x�SSKnSR[[U55nUR	5RSS5SnUR
5U:Xa.[[[URS555nXQ:nOSn[R"UUSUSU35$![a SnN-f=f)	z�Decorator raising SkipTest if the OS is `sysname` and the version is less
than `min_version`.

For example, @_requires_unix_version('FreeBSD', (7, 2)) raises SkipTest if
the FreeBSD version is less than 7.2.
rN�.�-r�Fz	 version � or higher required, not )r��join�mapr��release�split�system�tuple�int�
ValueErrorr��skipIf)�sysname�min_versionr��min_version_txt�version_txt�version�skips       rf�_requires_unix_versionr4s�����h�h�s�3��4�5�O��"�"�$�*�*�3��2�1�5�K�����G�#�	)��C��[�%6�%6�s�%;�<�=�G��(�D����?�?���)�9�_�-�-F��-�	�����	��D�	�s�(B*�*B9�8B9c��[SU5$)z�Decorator raising SkipTest if the OS is FreeBSD and the FreeBSD version is
less than `min_version`.

For example, @requires_freebsd_version(7, 2) raises SkipTest if the FreeBSD
version is less than 7.2.
�FreeBSD�r�rs rfrrOs��"�)�[�9�9rec��[SU5$)z�Decorator raising SkipTest if the OS is Linux and the Linux version is
less than `min_version`.

For example, @requires_linux_version(2, 6, 32) raises SkipTest if the Linux
version is less than 2.6.32.
�Linuxrrs rfrrXs��"�'�;�7�7rec�^�U4SjnU$)z�Decorator raising SkipTest if the OS is Mac OS X and the OS X
version if less than min_version.

For example, @requires_mac_ver(10, 5) raises SkipTest if the OS X version
is lesser than 10.5.
c�X>^�[R"T5UU4Sj5nTUlU$)Nc�d>�[RS:Xa�SSKnUR5Sn[[	[
UR
S555nUT:a=SR[	[T55n[R"SU<SU<35eT"U0UD6$![a Nf=f)Nr�rr�z	Mac OS X r)r�r��mac_verrrrrrr�r�r�r)rr�kwr�r
rrr�rs      ��rf�wrapper�4requires_mac_ver.<locals>.decorator.<locals>.wrapperis�����|�|�x�'��&�.�.�0��3��	>�#�C��[�->�->�s�-C�$D�E�G���,�*-�(�(�3�s�K�3H�*I��&�/�/�.��=�>�>�-�
��$��$�$��"����s�(B"�"
B/�.B/)�	functools�wrapsr)r�rrs` �rf�	decorator�#requires_mac_ver.<locals>.decoratorhs-���	����	�	%�
�	%�*����rer])rr s` rfrras����&�rec��SSKnU(dSnUR5R5S:Hn[R"X 5$![[4a4n[
R"[5RSX3S9 SnSnANUSnAff=f)z4Decorator raising SkipTest if running on a buildbot.rNznot suitable for buildbots�buildbotzgetpass.getuser() failed %s.��exc_infoF)�getpass�getuser�lower�KeyErrorr��logging�	getLoggerr_�warningr�r	)r�r&�
isbuildbotr�s    rf�skip_if_buildbotr.~sx����-����_�_�&�,�,�.�*�<�
��?�?�:�.�.��
�g������(�#�+�+�,J�C�+�^��
���s�!A�B
�*B�B
��address�memory�ub�threadc���U(d U(dU(dU(d[S5e[R"S5=(d Sn[R"S5=(d SnSU;=(d SU;nSU;=(d SU;nS	U;=(d S
U;nSU;=(d SU;n	U=(a U=(d/ U=(a U=(d U=(a U=(d U=(a U	$)
z9Returns True if Python is compiled with sanitizer supportz:At least one of address, memory, ub or thread must be True�CFLAGS��CONFIG_ARGSz-fsanitize=memoryz--with-memory-sanitizerz-fsanitize=addressz--with-address-sanitizerz-fsanitize=undefinedz#--with-undefined-behavior-sanitizerz-fsanitize=threadz--with-thread-sanitizer)r�	sysconfig�get_config_var)
r0r1r2r3�cflags�config_args�memory_sanitizer�address_sanitizer�ub_sanitizer�thread_sanitizers
          rfr.r.�s����v��v��U�V�V��
%�
%�h�
/�
5�2�F��*�*�=�9�?�R�K��v�%�	1�!�[�0��
	��&�	2�"�k�1��
	�&�(�	=�-��<��
	�v�%�	1�!�[�0��

�	$�$�	&�	�	&�&�	&�	�	��	&�
�	$�$�	rec�T�U(dSn[XX4S9n[R"XP5$)z>Decorator raising SkipTest if running with a sanitizer active.z"not working with sanitizers activer/)r.r�r	)r�r0r1r2r3rs      rfr/r/�s%���5���7�b�P�D��?�?�4�(�(reT)r0c�J�SHnX ;aX==SU3-
ss'MXU'M g)N)�ASAN_OPTIONS�MSAN_OPTIONS�
UBSAN_OPTIONS�TSAN_OPTIONS�:r])�env�optionr�s   rf�set_sanitizer_env_varrI�s+��Q���;��I�1�V�H��%�I���I�	Rrec�F^�[R"T5U4Sj5nU$)z5Skip the test on TLS certificate validation failures.c�>�T"U0UD6 g![a+nS[U5;a[R"S5eeSnAff=f)N�CERTIFICATE_VERIFY_FAILEDz.system does not contain necessary certificates)r�r�r�r�)rr�kwargsr�r�s   �rf�dec�&system_must_validate_cert.<locals>.dec�sO���	�
�t��v����	�*�c�!�f�4��'�'�)A�B�B���		�s��
A�&<�A�rr)r�rNs` rf�system_must_validate_certrQ�s%����_�_�Q������Jrei@i�double�IEEEztest requires IEEE 754 doublesc�\�SSKn[R"X5$![a SnN$f=f�Nr)�zlib�ImportErrorr��
skipUnless)r�rVs  rfr!r!��3�������t�,�,����������+�+c�\�SSKn[R"X5$![a SnN$f=frU)�gziprWr�rX)r�r\s  rfrr�rYrZc�\�SSKn[R"X5$![a SnN$f=frU)�bz2rWr�rX)r�r^s  rfrr�s3�������s�+�+�������rZc�\�SSKn[R"X5$![a SnN$f=frU)�lzmarWr�rX)r�r`s  rfrr�rYrZc��SSKnUR	5n[US5(+$![a [R"S5ef=f)Nr�_testinternalcapi required�code_debug_ranges)�_testinternalcapirWr�r��
get_configr�)rd�configs  rf�has_no_debug_rangesrg�sQ��>� ��
)�
)�
+�F��F�.�/�0�0�0���>���� <�=�=�>�s	�)�!A
c�@�[R"[5U5$rm)r�r	rg)r�s rf�requires_debug_rangesris���?�?�.�0�&�9�9rec#��# �SSKnU(dSv� gURS5 Sv� URS5 g![a Sv� gf=f!URS5 f=f7f)z-Suppress immortalization of deferred objects.rNTF)rdrW�suppress_immortalization)�suppressrds  rfrkrksc���� �
�
���.�.�t�4�:�
��2�2�5�9����
����	�2�2�5�9�s;�A&�<�A&�A�A&�A
�
A&�A
�
A&�A#�#A&c�v�SSKn[R"UR	5S5$![a gf=f)Nrz,requires immortalization of deferred objects)rdrWr�rX�get_immortalize_deferred)rds rf� skip_if_suppress_immortalizationrosD��� ����0�I�I�K� N�P�P������s�+�
8�8�win32�java�android>�ios�tvosrp�vxworks�watchosz/system/bin/shz/bin/sh�
emscripten�wasi>rsrtrvr��forkc�8�[R"[S5$)Nzrequires working os.fork())r�rXr"r]rerfr#r#@s�����/�1M�N�Nrec�8�[R"[S5$)z3Used for subprocess, os.spawn calls, fd inheritancezrequires subprocess support)r�rXr$r]rerfr%r%Os�����5�7T�U�Ure)�modulec��SnU(a"[(d[R"U5eg[R"[U5$)z{Skip tests or modules that require working sockets

Can be used as a function/class decorator or to skip an entire module.
zrequires socket supportN)r&r�r�rX)r|rns  rfr'r'Ys>��
$�C�
�!�!��#�#�C�(�(�"��"�"�#5�s�;�;rez%4Yzhttp://www.pythontest.net�datac���[RS:wagSSKnSnUS3nUR5upE[	URUS55 [	U5 [	SU-5 g)zKAssure user that loud errors generated by macOS libc's malloc are
expected.r�Nrz NOTICE z� may generate "malloc can't allocate region"
warnings on macOS systems. This behavior is known. Do not
report a bug unless tests are also failing.
See https://github.com/python/cpython/issues/85100r�)r�r��shutil�get_terminal_sizer��center)�	test_namer�rn�detail�padding�_s      rf�darwin_malloc_err_warningr�~sf���|�|�x����
�C���C�C�F�
�)�)�+�J�G�	�#�*�*�W�c�
"�#�	�&�M�	�#��-�rec�f�[RRU5(aU$Ub[RRX5n[/[
R-nUHJn[RRX05n[RR
U5(dMHUs $ U$)aGTry to find a file on sys.path or in the test directory.  If it is not
found the argument passed to the function is returned (this does not
necessarily signal failure; could still be the legitimate path).

Setting *subdir* indicates a relative path to use to find the file
rather than looking directly in the path directories.
)r�r��isabsr�
TEST_HOME_DIRr��exists)�filename�subdirr��dn�fns     rfr@r@�s~��
�w�w�}�}�X�����
���7�7�<�<��1���?�S�X�X�%�D���
�W�W�\�\�"�
'��
�7�7�>�>�"���b�y���Orec��[UR55nUVs/sHnSU-PM
 nnSRU5nSU-$s snf)z%Like repr(dict), but in sorted order.z%r: %rz, z{%s})�sorted�itemsr)�dictr��pair�	reprpairs�
withcommass     rfrFrF�sH���4�:�:�<� �E�-2�3�U�T��D��U�I�3����9�%�J��J����4s�A�code�returnc�J�0n[[R"U5U5 U$)zHRun a piece of code after dedenting it, and return its global namespace.)�exec�textwrap�dedent)r��nss  rf�run_coder��s��	�B������	��#�
�Ire)�lineno�offsetc��UR[U5n[USS5 SSS5 WRnUR	UR
5 UbUR
UR
U5 UR	UR5 UbUR
URU5 gg!,(df   N�=f)Nz
<test string>r�)�assertRaisesRegex�SyntaxError�compile�	exception�assertIsNotNoner��assertEqualr�)�testcase�	statement�errtextr�r��cmr�s       rfrr�s���	�	#�	#�K��	9�R��	�?�F�3�
:�
�,�,�C����S�Z�Z�(�
�����S�Z�Z��0����S�Z�Z�(�
�����S�Z�Z��0��
:�	9�s�B/�/
B=c�R^^^
�SSKnSSKnSSKJn SSKnTR
SS5m
URRU5SRS5Sn[RR[U5nUU
U4Sjn[RRU5(aU"U5n	U	bU	$U"U5 [S	5 [ (a[#S
U-[%5S9 UR&R)5n
U(aU
R*R-S5 U
R/U[0S
9n	U(a.U	R2R5S5S:XaUR7U	S9n	[/US5nU	R95nU(a*UR;U5 U	R95nU(aM*SSS5 U	R=5 U"U5n	U	bU	$[?SU-5e![
a SnGN�f=f!,(df   NL=f!U	R=5 f=f)Nrr�)�unlinkr�r��/���c�>�[U/TQ70TD6nTcU$T"U5(aURS5 U$UR5 grU)�open�seek�close)r�r�rrr�rs  ���rf�check_valid_file�*open_urlresource.<locals>.check_valid_file�sC�����!�d�!�b�!���=��H�
�1�X�X�
�F�F�1�I��H�	���	rer�z	fetching %s ...��file)zAccept-Encodingr\��timeoutzContent-Encodingr\)�fileobj�wbzinvalid resource %r) �urllib.request�urllib.parse�	os_helperr�r\rW�pop�parse�urlparserr�r�r�
TEST_DATA_DIRr�rrr�r
�request�build_opener�
addheaders�appendr�rO�headers�get�GzipFile�read�writer�r	)�urlrrr�urllibr�r\r�r�r�r��opener�out�sr�s ``          @rfr<r<�s����'�!���
�F�F�7�D�!�E��|�|�$�$�S�)�!�,�2�2�3�7��;�H�	�����m�X�	.�B��
�w�w�~�~�b����R� ���=��H��r�
�
�Z���w�
�!�C�'�.A�.C�D�
�^�^�
(�
(�
*�F����� � �!<�=����C�!1��2�A���	�	�
�
�0�1�V�;��M�M�!�M�$���
�"�d�^�s�����A���	�	�!���F�F�H���!��	
���	����A��}���
�*�R�/�
0�0��_������H�^��	
���	�s6�G0�/H�;AH�=H�0H�?H�
H�
H�H&c#��# �SSKn[[U5n[[XR	55 [[U5v� [[X5 g![[X5 f=f7f)z�Return a context manager used by captured_stdout/stdin/stderr
that temporarily replaces the sys stream *stream_name* with a StringIO.rN)�ior�r��setattr�StringIO)�stream_namer��orig_stdouts   rfrr�sL�����#�{�+�K��C��k�k�m�,�/��c�;�'�'���[�.����[�.�s�3A.�A�A.�A+�+A.c��[S5$)z�Capture the output of sys.stdout:

with captured_stdout() as stdout:
    print("hello")
self.assertEqual(stdout.getvalue(), "hello\n")
r��rr]rerfrr����8�$�$rec��[S5$)z�Capture the output of sys.stderr:

with captured_stderr() as stderr:
    print("hello", file=sys.stderr)
self.assertEqual(stderr.getvalue(), "hello\n")
�stderrr�r]rerfrrr�rec��[S5$)z�Capture the input to sys.stdin:

with captured_stdin() as stdin:
    stdin.write('hello\n')
    stdin.seek(0)
    # call test code that consumes from sys.stdin
    captured = input()
self.assertEqual(captured, "hello")
�stdinr�r]rerfrrs���7�#�#rec�l�SSKnUR5 UR5 UR5 g)a�Force as many objects as possible to be collected.

In non-CPython implementations of Python, this is needed because timely
deallocation is not guaranteed by the garbage collector.  (Even in CPython
this can be the case in case of reference cycles.)  This means that __del__
methods may be called later than expected and weakrefs may remain alive for
longer than expected.  This function tries its best to force all garbage
objects to disappear.
rN)�gc�collect)r�s rf�
gc_collectr�!s"����J�J�L��J�J�L��J�J�Lrec#��# �SSKnUR5nUR5 Sv� U(aUR5 gg!U(aUR5 ff=f7frU)r��	isenabled�disable�enable)r��have_gcs  rf�
disable_gcr�0sF���
��l�l�n�G��J�J�L��
���I�I�K���7��I�I�K��s�%A"�A�A"�A�A"c'�# �SSKnUR5nUR"U6 Sv� UR"U6 g!UR"U6 f=f7frU)r��
get_threshold�
set_threshold)rrr��
old_thresholds   rf�gc_thresholdr�;sH���
��$�$�&�M����d��)�
�
���-�(�����-�(�s�$A�;�A�A�Ac���[R"S5=(d SnSnUR5HnURS5(dMUnM [R"S5S:XaSnX;$SnX;$)z,Find if Python was built with optimizations.�	PY_CFLAGSr6z-O�CC�gcc)r6�-O0z-Og)r6r�)r8r9rr�)r:�	final_opt�opt�non_optss    rf�python_is_optimizedr�Esu��
�
%�
%�k�
2�
8�b�F��I��|�|�~���>�>�$����I������%��.�%���$�$����$�$rec��^�[R"S5=(d Sm/SQn[R"S5nU(aURU5 [U4SjU55$)N�PY_CFLAGS_NODISTr6)z
-fprofile-usez-fprofile-instr-usez	-prof-use�PGO_PROF_USE_FLAGc3�,># �UH	oT;v� M g7frmr])�.0rH�
cflags_nodists  �rf�	<genexpr>�#check_cflags_pgo.<locals>.<genexpr>bs����A�[�6��&�[�s�)r8r9r��any)�pgo_optionsr�r�s  @rf�check_cflags_pgorSsY����,�,�-?�@�F�B�M��K�"�0�0�1D�E������,�-��A�[�A�A�Arec�b�[(ag[R"S5=(d SnSU;$)NFr7r6z
--enable-bolt)r6r8r9)r;s rf�check_bolt_optimizedres,���w���*�*�=�9�?�R�K��k�)�)re�Py_GIL_DISABLEDc�8�[R"[U5$)z8Decorator for skipping tests on the free-threaded build.)r�r	rrvs rfrrps���?�?�?�C�0�0rec�>�[(a[R$S$)z+Expect test failure if the GIL is disabled.c��U$rmr])�	test_cases rfr��2expected_failure_if_gil_disabled.<locals>.<lambda>xs��Yre)rr�r�r]rerf� expected_failure_if_gil_disabledr	ts�����'�'�'�&�&re�PHBBInP�nP�0n�nc�H�SSKnUR[U-[-5$rU)�struct�calcsize�_header�_align��fmtrs  rf�calcobjsizer�s����?�?�7�S�=�6�1�2�2rec�H�SSKnUR[U-[-5$rU)rr�_vheaderrrs  rf�calcvobjsizer�s����?�?�8�c�>�F�2�3�3rei@ic��SSKn[R
"U5n[
U5[:XaUR[-(d4[
U5[:wa/[
U5R[-(aX#R-
nS[
U5XB4-nURXBU5 g![a [R"S5ef=f)Nrrbz&wrong size for %s: got %d, expected %d)rdrWr�r�r��	getsizeofr��	__flags__�_TPFLAGS_HEAPTYPE�_TPFLAGS_HAVE_GC�SIZEOF_PYGC_HEADr�)�test�o�sizerdr�rns      rf�check_sizeofr"�s���>� ��]�]�1�
�F�	
�a��D��q�{�{�->�>�
�q�'�T�/��Q�� 1� 1�4D� D��2�2�2��
2��A�w��%�&�C����V�3�'���>���� <�=�=�>�s�B,�,!C
c'�# �SSKn[X 5nURU5nUHnURX55  O" SU;a[R
"SU35eSv� U(aU(aURWU5 ggg!URa Mtf=f![a e[a" S=p$SU;a[R
"S5eNtf=f!U(aU(aURWU5 fff=f7f)Nrr6zno locales z
no locales)�localer��	setlocalerr�r�r�r�)�catstr�localesr$�category�orig_locale�locs      rfr>r>�s���A���6�*���&�&�x�0���C�
�� � ��/����� ��'�'�+�g�Y�(?�@�@�!�4�
��k����X�{�3�"�6���<�<�
��
����
��2�#�#��
�W���#�#�L�1�1��2��&�k����X�{�3�"�6�sa�C>� B�C>�B�$C>� C�$#C>�B�C>�B�C>�3C�C>�C�C>�$C;�;C>c�^^�UU4SjnU$)Nc�L>^�[R"T5UUU4Sj5nU$)Nc�N>�ST
;nSSKn[UT5nURU5nT
H;nURUS9 URXW5 SnT	"U/UQ70UD6 SSS5 M= URXV5 U(a%URSS9 T	"U/UQ70UD6 SSS5 gg!URa URSU<35 Nqf=f!,(df   M�=f!URXV5 f=f![a e[a N�f=f!,(df   g=f)Nr6r)r$Fz
no locale )r$r�r%�subTestr�skipTestr�r�)rqrrrM�dry_runr$r(r)r*r&r�r's        ���rfr�/run_with_locales.<locals>.deco.<locals>.wrapper�s.����G�m�G�
<��"�6�6�2��$�.�.�x�8��<�&��!�\�\��\�5�<� &� 0� 0�� ?�+0�� $�T� ;�D� ;�F� ;�6�5� '��$�$�X�;���\�\��\�.���/��/��/�/�.���$*�<�<�D� $�
�
�
�3�'�.B� C�D��6�5���$�$�X�;��%"�
���
��
��&/�.�sc�!C<�C&�C�B)�C�C&�
D�)%C�C�C�C�
C#	�C&�&C9�<D�D�
D$rP)r�rr&r's` ��rf�deco�run_with_locales.<locals>.deco�s%���	����	�	0�
�	0�<�rer])r&r'r2s`` rf�run_with_localesr4�s��� �B�Krec�^�U4SjnU$)Nc�\>^�UU4SjnTRUlTRUlU$)Nc�>�[RnS[
R;a[
RSnOSnT[
RS'U"5 T"U0UD6Uc[
RS	OU[
RS'[R"5 $![a [R"S5ef=f!Uc[
RS	OU[
RS'[R"5 f=f)Nztzset required�TZ)�time�tzsetr�r�r�r��environ)rr�kwdsr:�orig_tzr��tzs    ��rf�inner�-run_with_tz.<locals>.decorator.<locals>.inner�s����
:��
�
���r�z�z�!��*�*�T�*����!�B�J�J�t���G�
��T�*�T�*��?��
�
�4�(�'.�B�J�J�t�$��
�
���#"�
:��'�'�(8�9�9�
:���?��
�
�4�(�'.�B�J�J�t�$��
�
��s�B�C�!B>�?D)r_rc)r�r?r>s` �rfr �run_with_tz.<locals>.decorator�s%���	�,���������
��rer])r>r s` rfrGrG�s����4�rei�r���limitc�J�S[[S[-S.n[R"SU[R[R
-5nUc[
SU<35e[[URS55XRS5R5-5$)NrB)�k�m�g�tz(\d+(?:\.\d+)?) (K|M|G|T)b?$zInvalid memory limit: r�r�)�_1M�_1G�re�match�
IGNORECASE�VERBOSErr�float�groupr()rD�sizesrGs   rf�_parse_memlimitrSs���
�
�
�
�#�X�	
�E�	���0�%�������+�	-�A��y��1�%��;�<�<��u�Q�W�W�Q�Z� �5�����)9�)9�);�#<�<�=�=rec�r�[U5nU[S-
:a[S5eUq[	U[
5nUqg)Nr�z+Memory limit {limit!r} too low to be useful)rS�_2Gr�real_max_memuse�min�MAX_Py_ssize_tr)rD�memlimits  rfrDrD!s<���u�%�H��#��'���F�G�G��O��8�^�,�H��Jrec�*�\rSrSrSrSrSrSrSrg)�_MemoryWatchdogi-zXAn object which periodically watches the process' memory consumption
and prints it out.
c�`�SR[R"5S9UlSUlg)Nz/proc/{pid}/statm)�pidF)r�r��getpid�procfile�startedrws rfrp�_MemoryWatchdog.__init__2s$��+�2�2�r�y�y�{�2�C��
���rec��SSKn[URS5nSSKnU [S5nUR[RU/UURS9UlSSS5 SUlg![aPn[R
"[5RSX3S9 [RR5 SnAgSnAff=f!,(df   Ns=f)Nr�rz!/proc not available for stats: %sr$zmemory_watchdog.py)r�r�T)�warningsr�r_r�r*r+r_r,r�r��flushr�r@�Popen�
executable�DEVNULL�mem_watchdogr`)rqrdr�r�r��watchdog_scripts      rf�start�_MemoryWatchdog.start6s����	��T�]�]�C�(�A�	�
�&�';�<�O� *� 0� 0�#�.�.�/�1R�78�8B�8J�8J�!1�!L�D���
�����	����h�'�/�/�0S�UV�/�c��J�J������	���Q�s#�A.�<C�.
C�8AC�C�
Cc��UR(a5URR5 URR5 ggrm)r`ri�	terminate�waitrws rf�stop�_MemoryWatchdog.stopGs2���<�<����'�'�)����"�"�$�re)rir_r`N)	r_r`rarbrcrprkrprdr]rerfr[r[-s�����"%rer[c�^^^�UUU4SjnU$)aPDecorator for bigmem tests.

'size' is a requested size for the test (in arbitrary, test-interpreted
units.) 'memuse' is the number of bytes per unit for the test, or a good
estimate of it. For example, a test that needs two byte buffers, of 4 GiB
each, could be decorated with @bigmemtest(size=_4G, memuse=2).

The 'size' argument is normally passed to the decorated test method as an
extra argument. If 'dry_run' is true, the value passed to the test method
may be less than the requested value. If 'dry_run' is false, it means the
test doesn't support dummy runs when -M is not specified.
c�8>^^�UUU4SjmTTlTTlT$)Nc�>�TRnTRn[(dSnOUn[(dT(d*[X2-:a[R"SX-S--5e[(aM[
(aB[
5 [
SRX-S-S95 [5nUR5 OSnT"X5U(aUR5 $$!U(aUR5 ff=f)Ni�'not enough memory: %.1fG minimum needed�@z* ... expected peak memory use: {peak:.1f}G)�peak)r!�memuserVr�r�rr�r�r[rkrp)rqr!rx�maxsize�watchdogr0r�rs     ���rfr�.bigmemtest.<locals>.decorator.<locals>.wrapper[s�����<�<�D��^�^�F�"�?����� ���#�g�&6�6��'�'�=��}�	�2�4�5�5���7�7����B��v�4�=�I�#>�v�?�A�*�,����� ���
$���'���M�M�O���8��M�M�O��s�C!�!C;)r!rx)r�rr0rxr!s`@���rfr �bigmemtest.<locals>.decoratorZs���	$�:�������rer])r!rxr0r s``` rfrrMs��� �B�rec�^�U4SjnU$)z0Decorator for tests that fill the address space.c��>�[[:aJ[S:�a [S:�a[R"S5e[R"S[S--5eT"U5$)Nl����lz-not enough memory: try a 32-bit build insteadrurv)rrXr�r�)rqr�s �rfr�!bigaddrspacetest.<locals>.wrappersb�����&���*�z�U�/B��'�'�C�E�E��'�'�=�%��3�5�6�6��T�7�Nrer])r�rs` rfrr}s���
��Nrec��U$rmr])r�s rf�_idr��s���Jrec���US:Xa3[5(d$[R"[R5$[	U5(a[
$[R"SR
U55$)Nr�zresource {0!r} is not enabled)r�r�rr�rr�r�r�s rf�requires_resourcer��sT���5��!2�!4�!4��}�}�.�5�5�6�6��8�$�$��
��}�}�<�C�C�H�M�N�Nrec� �[SS9"U5$)z1
Decorator for tests only applicable on CPython.
T)�cpython)�impl_detail�rs rfrr�s���t�$�T�*�*rec��[S0UD6(a[$UcR[U5up#U(aSnOSn[UR	55nURSR
U55n[R"U5$)Nz*implementation detail not available on {0}z%implementation detail specific to {0}z or r])	r8r��
_parse_guardsr��keysr�rr�r)rn�guards�
guardnames�defaults    rfr�r��sh���"�6�"��
�
�{�+�F�3��
��>�C�9�C��J�O�O�-�.�
��j�j����Z�0�1���=�=���rec��U(dSS0S4$[UR55Sn[UR55U/[U5-:XdeX(+4$)Nr�TFr)�list�valuesr�)r��is_trues  rfr�r��sY����D�!�5�)�)��6�=�=�?�#�A�&�G���
�
�� �W�I��F��$;�;�;�;��K� � rec�p�[U5upUR[RRU5$)aThis function returns True or False depending on the host platform.
Examples:
   if check_impl_detail():               # only on CPython (default)
   if check_impl_detail(jython=True):    # only on Jython
   if check_impl_detail(cpython=False):  # everywhere except on CPython
)r�r�r��implementationr�)r�r�s  rfr8r8�s-��$�F�+�O�F��:�:�c�(�(�-�-�w�7�7rec�^^^�Tm[[S5(a[R"T5U4Sj5mTnS[R;a:[R
Rm[R"T5UU4Sj5nU$)zEDecorator to temporarily turn off tracing for the duration of a test.�gettracec��>�[R"5n[R"S5 T"U0UD6[R"U5 $![R"U5 f=frm)r�r��settrace)rrrM�original_tracer�s   �rf�
trace_wrapper�!no_tracing.<locals>.trace_wrapper�sE��� �\�\�^�N�
-����T�"��T�,�V�,����^�,�����^�,�s�A�A$ztest.covc�>�[RRT5n[RRTS5 T"U0UD6[RRTU5 $![RRTU5 f=frU)r��
monitoring�
get_events�
set_events)rrrM�original_events�covr�s   ��rf�coverage_wrapper�$no_tracing.<locals>.coverage_wrapper�sg���!�n�n�7�7��<�O�
@����)�)�#�q�1�$�d�5�f�5����)�)�#��?�����)�)�#��?�s�'A*�*"B)r�r�rr�modulesr��COVERAGE_ID)r�r�r�r�s` @@rf�
no_tracingr��sx����M��s�J���	����	�	-�
�	-�%���S�[�[� ��n�n�(�(��	����	�	@�
�	@��rec�*�[[U55$)z�Decorator for tests which involve reference counting.

To start, the decorator does not run the test if is not run by CPython.
After that, any trace function is unset during the test to prevent
unexpected refcounts caused by the trace function.

)r�rr�s rf�
refcount_testr��s���l�4�(�)�)rec�p�SSKnSSKnU$![a [R"S5"U5s$f=f)Nrz,needs _testcapi and _testlimitedcapi modules)�	_testcapi�_testlimitedcapirWr�r)rr�r�s   rfr0r0�s=��S����K���S��}�}�K�L�T�R�R�S�s��&5�5�TEST_MODULES�yesc�X�[R"[RS5"U5$)Nzrequires specialization)r�rX�_opcode�ENABLE_SPECIALIZATIONr�s rfr1r1�s,������%�%�'@�B�BF�H�Hrec��g)z,Just used to check if docstrings are enabledNr]r]rerf�_check_docstringsr�s�re�WITH_DOC_STRINGSztest requires docstringsc���[Rb[RR5 [Rb[RR5 ggrm)r�r�rer�r]rerf�flush_std_streamsr�s;��
�z�z���
�
����
�z�z���
�
����rec��[5 [RnUR5Hn[	SU3US9 M UR5 g)NzWarning -- r�)r��
print_warning�orig_stderr�
splitlinesr�re)rn�stream�lines   rfr�r�s>����
�
&�
&�F���� ��
��D�6�"��0�!�
�L�L�Nrec��[[S5(a[[S5(dg[(dg[R"S[R5upUS:Xag[
SU35 SqMA![
a gf=f)z�Use this function at the end of test_main() whenever sub-processes
are started.  This will help ensure that no extra children (zombies)
stick around to hog resources and create problems when looking
for refleaks.
�waitpid�WNOHANGNTr�rz%reap_children() reaped child process )r�r�r$r�r�r�r��environment_altered)r]�statuss  rfr=r=.s���
�B�	�"�"�w�r�9�'=�'=��
#�
#���	��*�*�R����4�K�C��!�8���=�c�U�C�D�"�����	��	�s�'A:�:
B�Bc#�<# �[X5(a)[X5n[XU5 Uv� [XU5 g[XU5 Sv� [X5(a[X5 gg![XU5 f=f![X5(a[X5 ff=f7f)a�Temporary swap out an attribute with a new object.

Usage:
    with swap_attr(obj, "attr", 5):
        ...

    This will set obj.attr to 5 for the duration of the with: block,
    restoring the old value at the end of the block. If `attr` doesn't
    exist on `obj`, it will be created and then deleted at the end of the
    block.

    The old value (or None if it doesn't exist) will be assigned to the
    target of the "as" clause, if there is one.
N)r�r�r��delattr)r��attr�new_val�real_vals    rfrBrBLs���� �s����3�%����7�#�	)��N��C�x�(���7�#�	#���s�!�!���"�"��

�C�x�(���s�!�!���"�"�s3�(B�A*�B�	A;�
B�*A8�8B�;B�Bc#�# �X;aXnX U'Uv� X0U'gX U'Sv� X;aX	gg!X0U'f=f!X;aX	ff=f7f)a�Temporary swap out an item with a new object.

Usage:
    with swap_item(obj, "item", 5):
        ...

    This will set obj["item"] to 5 for the duration of the with: block,
    restoring the old value at the end of the block. If `item` doesn't
    exist on `obj`, it will be created and then deleted at the end of the
    block.

    The old value (or None if it doesn't exist) will be assigned to the
    target of the "as" clause, if there is one.
Nr])r��itemr�r�s    rfr?r?kse��� �{��9���D�	�	!��N� ��I��D�	�	���{��I���
!��I���{��I��s)�A�,�	A�5�	A�2�A�
?�Ac�*�SSKnUR5$)zjReturn a list of command-line arguments reproducing the current
settings in sys.flags and sys.warnoptions.rN)r��_args_from_interpreter_flags�r�s rf�args_from_interpreter_flagsr��s����2�2�4�4rec�*�SSKnUR5$)zcReturn a list of command-line arguments reproducing the current
optimization settings in sys.flags.rN)r��"_optim_args_from_interpreter_flagsr�s rf�!optim_args_from_interpreter_flagsr��s����8�8�:�:rec�$�\rSrSrSrSrSrSrg)rCi�)rn�messagec�~�SnUH4nX$nURU5nURXFU5(aM1Sn U$ U$)a
Try to match a single dict with the supplied arguments.

Keys whose values are strings and which are in self._partial_matches
will be checked for partial (i.e. substring) matches. You can extend
this scheme to (for example) do regular expression matching, etc.
TF)r��match_value)rq�drMr�rF�v�dvs       rf�matches�Matcher.matches�sN�����A��	�A����q��B��#�#�A�1�-�-�����
�
��
rec��[U5[U5:waSnU$[U5[LdXR;aX2:HnU$URU5S:�nU$)zD
Try to match a single stored value (dv) with a supplied value (v).
Fr)r�r��_partial_matches�find)rqrFr�r�r�s     rfr��Matcher.match_value�s_����7�d�2�h���F�
�
�	�"�X�S�
 �A�-B�-B�$B��g�F��
��W�W�Q�Z�1�_�F��
rer]N)r_r`rarbr�r�r�rdr]rerfrCrC�s��)���"
rerCc�
�SSKn[cP[RS:Xa:UR	5S:Xa&[
R"5RS:XaSqOSq[(a[R"S5"U5$U$)	a
Skip decorator for tests that use buggy strptime/strftime

If the UCRT bugs are present time.localtime().tm_zone will be
an empty string, otherwise we assume the UCRT bugs are fixed

See bpo-37552 [Windows] strptime/strftime return invalid
results with UCRT version 17763.615
rNrp�cp65001r6TFz!buggy MSVC UCRT strptime/strftime)
r$�_buggy_ucrtr�r��getencodingr9�	localtime�tm_zoner�r)rr$s  rfr,r,�sh������<�<�7�"��"�"�$�	�1���� �(�(�B�.��K��K�GR�{�8�=�=�<�=�d�C�\�X\�\rec�~�\rSrSrSrSSjr\RS:XaSrOSrSr	S	r
S
rSS.S
jrSS.Sjr
Srg)�
PythonSymlinki�z3Creates a symlink for the current Python executableNc��SSKJn U=(d [RR	U5Ul/Ul[RR[R5Ul
/UlSUlUR5 g)Nr�)�TESTFN)r�r�r�r��abspath�link�_linked�realpathr�rg�real�
_also_link�_env�_platform_specific)rqr�r�s   rfrp�PythonSymlink.__init__�sY��%��3�B�G�G�O�O�F�3��	�����G�G�$�$�S�^�^�4��	������	����!rerpc
��SSKnSSKn[RR	UR
5(aD[RR
UR
5(dURS5UlUR[R5n[RRU5n[RRUR5nURRU[RRU[RRU5545 UR[RRUR!U5S55H[nURRU[RRU[RRU5545 M] [R"Vs0sH'owR%5[R&"U5_M) snUl[RRUR
5UR(S'[*R,"5(a[.UR(S'ggs snf)Nrzvcruntime*.dll�
PYTHONHOME�
PYTHONPATH)�glob�_winapir�r��lexistsr�r��GetModuleFileNamer��	dllhandle�dirnamer�r�r�r�basename�escaper;�upper�getenvr�r8�is_python_buildr�)rqr�r�r��src_dir�dest_dir�runtimerFs        rfr�� PythonSymlink._platform_specific�s������w�w���t�y�y�)�)�"�'�'�.�.����2K�2K�$�5�5�a�8��	��+�+�C�M�M�:�C��g�g�o�o�c�*�G��w�w���t�y�y�1�H��O�O�"�"�������X�r�w�w�'7�'7��'<�=�$�
� �9�9�R�W�W�\�\�$�+�+�g�2F�HX�%Y�Z�����&�&���G�G�L�L��2�7�7�+;�+;�G�+D�E�(��[�;=�*�*�E�*�Q����B�I�I�a�L�0�*�E�D�I�&(�g�g�o�o�d�i�i�&@�D�I�I�l�#��(�(�*�*�*4��	�	�,�'�+��Fs�).Jc��grmr]rws rfr�r�����rec�2�[R"URUR5 URRUR5 URH6up[R"X5 URRU5 M8 U$rm)r��symlinkr�r�r�r�r�)rqr�r�s   rf�	__enter__�PythonSymlink.__enter__�sc��
�
�
�4�9�9�d�i�i�(������D�I�I�&��/�/�J�D��J�J�t�"��L�L����%�*��rec���URHn[R"U5 M g![a6n[(a [SR
XE55 SnAMTSnAMZSnAff=f)Nzfailed to clean up {}: {})r�r��remove�IOErrorrr�r�)rq�exc_type�	exc_value�exc_tbr��exs      rf�__exit__�PythonSymlink.__exit__sV���L�L�D�
H��	�	�$��!���
H��7��5�<�<�T�F�G�G���
H�s�,�
A,�%A'�'A,c�v�SSKnU/UQnURXeRURUS9nUR5nURU:waj[
(a;[
[US55 [
[US5[RS9 [SRUR55eU$)Nr)r�r�rGr�r�z'unexpected return code: {0} (0x{0:08X}))r�rf�PIPE�communicate�
returncoderr��reprr�r��RuntimeErrorr�)	rq�pythonrrrGrr��cmd�prcs	         rf�_call�PythonSymlink._calls�����o��o�����S���$.�O�O��
�
>��
�M�M�O���<�<�:�%��w��d�1�Q�4�j�!��d�1�Q�4�j�s�z�z�2��9�@�@����N�P�
P��rer)rc�>�URURUSU5$rm)rr��rqrrrs   rf�	call_real�PythonSymlink.call_reals���z�z�$�)�)�T�4��<�<rec�P�URURX RU5$rm)rr�r�rs   rf�	call_link�PythonSymlink.call_links���z�z�$�)�)�T�9�9�j�A�Are)r�r�r�r�r�rm)r_r`rarbrcrpr�r�r�rr
rrrrdr]rerfr�r��sM��=�
"��|�|�w��	5�6	��H��+,�=�+,�B�Brer�c��[(+=(d [nSnU(aU$[R"U5"U5$)z;Skip decorator for tests not run in (non-extended) PGO taskz#Not run for (non-extended) PGO task)rH�PGO_EXTENDEDr�r)r�okrns   rf�skip_if_pgo_taskr$!s.��
��	 �L�B�
/�C��4�3�8�=�=��-�d�3�3rer])�ignorec��[[U55[[U55-
nU(aU[U5-n[SU55nU$)z�Returns the set of items in ref_api not in other_api, except for a
defined list of items to be ignored in this check.

By default this skips private attributes beginning with '_' but
includes all magic methods, i.e. those starting and ending in '__'.
c3�# �UH5nURS5(aURS5(dM1Uv� M7 g7f)r��__N)r��endswith)r�rGs  rfr��&detect_api_mismatch.<locals>.<genexpr>2s2���F�=�a� �|�|�C�0�0�A�J�J�t�4D���=�s�0?�	?)�set�dir)�ref_api�	other_apir%�
missing_itemss    rfr*r*(sP����G��%��C�	�N�(;�;�M�
���V��$�
��F�=�F�F�M��rec���UcUR4nO[U[5(aU4n[U5n[	U5H�nURS5(dXd;aM [
X5n[
USS5U;d4[US5(aMO[U[R5(aMpURU5 M� URURU5 g)a�Assert that the __all__ variable of 'module' contains all public names.

The module's public names (its API) are detected automatically based on
whether they match the public name convention and were defined in
'module'.

The 'name_of_module' argument can specify (as a string or tuple thereof)
what module(s) an API could be defined in in order to be detected as a
public API. One case for this is when 'module' imports part of its public
API from other modules, possibly a C backend (like 'csv' and its '_csv').

The 'extra' argument can be a set of names that wouldn't otherwise be
automatically detected as "public", like objects without a proper
'__module__' attribute. If provided, it will be added to the
automatically detected ones.

The 'not_exported' argument can be a set of names that must not be treated
as part of the public API even though their names indicate otherwise.

Usage:
    import bar
    import foo
    import unittest
    from test import support

    class MiscTestCase(unittest.TestCase):
        def test__all__(self):
            support.check__all__(self, foo)

    class OtherTestCase(unittest.TestCase):
        def test__all__(self):
            extra = {'BAR_CONST', 'FOO_CONST'}
            not_exported = {'baz'}  # Undocumented name.
            # bar imports part of its API from _bar.
            support.check__all__(self, bar, ('bar', '_bar'),
                                 extra=extra, not_exported=not_exported)

Nr�r`)
r_�
isinstancer�r+r,r�r�r��types�
ModuleType�add�assertCountEqual�__all__)rr|�name_of_module�extra�not_exported�expectedr�r�s        rfr+r+7s���R�� �/�/�,��	�N�C�	(�	(�(�+���5�z�H��F����?�?�3���4�#7���f�#���C��t�,��>��S�,�/�/���U�%5�%5�6�6��L�L�������v�~�~�x�8rec���SSKnURURUR-UR
-UR-5 [US5(a|URURUR4HTnU(a8URX!R5 URX!R5 MBURUS5 MV gg![a gf=f)Nr�CrtSetReportMode)�msvcrtrW�SetErrorMode�SEM_FAILCRITICALERRORS�SEM_NOALIGNMENTFAULTEXCEPT�SEM_NOGPFAULTERRORBOX�SEM_NOOPENFILEERRORBOXr��CRT_WARN�	CRT_ERROR�
CRT_ASSERTr<�CRTDBG_MODE_FILE�CrtSetReportFile�CRTDBG_FILE_STDERR)rr=rGs   rf�suppress_msvcrt_assertsrIrs���������5�5� �;�;�<� �6�6�7�!�7�7�8�9��v�)�*�*��/�/�6�#3�#3�V�5F�5F�G�A���'�'��+B�+B�C��'�'��+D�+D�E��'�'��1�-�H�+������s�C�
C#�"C#c�,�\rSrSrSrSrSrSrSrSr	g)rEi�z�Try to prevent a crash report from popping up.

On Windows, don't display the Windows Error Reporting dialog.  On UNIX,
disable the creation of coredump file.
Nc��[RRS5(a�SSKnUR5UlURURUR-5 [US5(ay0Ul
URURUR4HKnURUUR5nUR!UUR"5nX44URU'MM U$SSKnXPlUR$btUR$R'UR$R(5UlUR$R+UR$R(SURS45 [RS:XajSSKn/SQnUR3UUR4UR4S9nU UR75Sn	SSS5 W	R95S	:Xa[;S
SSS
9 U$![a gf=f![a SUlGN%f=f![,[.4a N�f=f!,(df   Nm=f)z�On Windows, disable Windows Error Reporting dialogs using
SetErrorMode() and CrtSetReportMode().

On UNIX, try to save the previous core file size limit, then set
soft limit to 0.
r�rNr<r�r�)z/usr/bin/defaultsr�zcom.apple.CrashReporter�
DialogType)r�r�s	developerz:this test triggers the Crash Reporter, that is intentionalr6T)�endre)r�r�r�r=rW�GetErrorMode�	old_valuer>rAr��	old_modesrCrDrEr<rFrGrHr��	getrlimit�RLIMIT_CORE�	setrlimitrr�r�rfrrr�r�)
rqr=�report_type�old_mode�old_filer�r�r�procr�s
          rfr�SuppressCrashReport.__enter__�s���<�<�"�"�5�)�)�
��$�0�0�2�D�N��������1M�1M� M�N��v�1�2�2�!#���$*�O�O�$*�$4�$4�$*�$5�$5�$7�K� &�6�6�{�"�3�3� 5�H�%�6�6�{�"�5�5� 7�H�2:�2D�D�N�N�;�/�$7�T��A
%�� (�
��}�}�(��%)�]�]�%<�%<�T�]�]�=V�=V�%W�D�N��M�M�+�+�D�M�M�,E�,E�-.����q�0A�,B�D�
�|�|�x�'�!�@��!�'�'��/9���/9���(�@���!�-�-�/��2�F���<�<�>�\�1��0�57�t�E����k�
��
��0�
%� $��
�
%��#�G�,����� �T�sB�G?�4
H�A3H'�H=�?
H�H�H$�#H$�'H:�9H:�=
Ic��URcg[RRS5(azSSKnURUR5 UR(aIURR5H*unupEURX45 URX55 M, ggURb<URRURRUR5 gg![[4a gf=f)zARestore Windows ErrorMode or core file behavior to initial value.Nr�r)rOr�r�r�r=r>rPr�r<rGr�rSrRrr�)rq�
ignore_excr=rTrUrVs      rfr
�SuppressCrashReport.__exit__�s����>�>�!���<�<�"�"�5�)�)��������/��~�~�9=���9M�9M�9O�5�K�!5�(��+�+�K�B��+�+�K�B�:P��
�}�}�(���M�M�+�+�D�M�M�,E�,E�t�~�~�V�)��#�G�,����s�;:C7�7D
�	D
)rPrOr�)
r_r`rarbrcrOrPrr
rdr]rerfrErE�s���
�I��I�@�DrerEc��^^^^�[TT5 SmTRTmSmUUUU4SjnUR	U5 [TTU5 g![[4a [TTS5mNGf=f)z�Override 'object_to_patch'.'attr_name' with 'new_value'.

Also, add a cleanup procedure to 'test_instance' to restore
'object_to_patch' value for 'attr_name'.
The 'attr_name' should be a valid attribute for 'object_to_patch'.

FTNc�H>�T(a[TTT5 g[TT5 grm)r�r�)�
attr_is_local�	attr_name�object_to_patchrOs����rf�cleanup�patch.<locals>.cleanup�s�����O�Y�	�:��O�Y�/re)r��__dict__r�r)�
addCleanupr�)�
test_instancer`r_�	new_valuerar^rOs ``  @@rf�patchrg�s~����O�Y�'��M��#�,�,�Y�7�	��
�0�0����W�%��O�Y�	�2��
�H�%�>��O�Y��=�	�>�s�A
�
A-�,A-c#�<# �USSnSv� XSS&g!WUSS&f=f7f)z-Like unittest.mock.patch.dict, but for lists.Nr])�orig�saveds  rf�
patch_listrk	s&�����Q���
��Q���%��Q��s��	���c��[5 SSKnURU5$![a [R"S5ef=f)�]
Run code in a subinterpreter. Raise unittest.SkipTest if the tracemalloc
module is enabled.
rN�requires _testcapi)�_check_tracemallocr�rWr�r��run_in_subinterp)r�r�s  rfrprpsH��
��6���%�%�d�+�+���6���� 4�5�5�6�s	�!�!A)�own_gilc��[5 SSKnUbSU;dX45eU(aSOSUS'OIUSnUS:XaSUS'O8US:XaSUS'O,US	:XaSUS'O [U[5(d[U5e[R"S
0UD6nURX5$![a [R"S5ef=f)rmrNzrequires _testinternalcapi�gil�own�sharedr�r�r�r])rordrWr�r�r1r��NotImplementedErrorr2�SimpleNamespace�run_in_subinterp_with_config)r�rqrfrdrss     rfrxrx s���
��>� ����F�"�5�W�$5�5�"�!(��h��u�
��U�m���!�8�%�F�5�M�
�A�X�$�F�5�M�
�A�X�!�F�5�M��C��%�%�%�c�*�*�
�
"�
"�
,�V�
,�F��9�9�$�G�G��!�>���� <�=�=�>�s�B � !Cc��SSKnUR5(a[R"S5eg![a gf=f)NrzUrun_in_subinterp() cannot be used if tracemalloc module is tracing memory allocations)�tracemalloc�
is_tracingr�r�rW)rzs rfroro;sL��;���!�!�#�#��#�#�%:�;�
;�$���
��
�s�2�
?�?c�j^^^^^�SmUUUUU4SjnU"5 [5 TRT5 g)NFc�r>^�"UU4SjST5nT"U"T65mTR[[T5 g)Nc�$>�\rSrSrUU4SjrSrg)�6check_free_after_iterating.<locals>.wrapper.<locals>.AiLc�B>�Sm[T5 g![a gf=f�NT)�next�
StopIteration)rq�done�its ��rf�__del__�>check_free_after_iterating.<locals>.wrapper.<locals>.A.__del__Ms&��������H��$����s��
�r]N)r_r`rarbr�rd)r�r�s��rf�ArLs
���
�
rer�)�assertRaisesr�r�)r�r�rr�clsr��iterrs @�����rfr�+check_free_after_iterating.<locals>.wrapperKs5���	�	��	��!�T�(�^�����-��r�2re)r��
assertTrue)rr�r�rrrr�s```` @rf�check_free_after_iteratingr�Is*����D�3�3��I��L��O�O�D�rec��SSKJnJnJn SSKJn UR
5nUR"U5 URS:XaUR5 URHVnU(aX`;aM[XV5nU(aUc
SU-5eO	U(dM:URUS5bMQUSs $ g!URa gf=f)a(Check if the compiler components used to build the interpreter exist.

Check for the existence of the compiler executables whose names are listed
in 'cmd_names' or all the compiler executables when 'cmd_names' is empty
and return the first missing executable or None when none is found
missing.

r)�	ccompilerr8�spawn)r��msvcNz%the '%s' executable is not configured)�setuptools._distutilsr�r8r��
setuptoolsr��new_compiler�customize_compiler�
compiler_type�
initialize�
PlatformError�executablesr��find_executable)�	cmd_namesr�r8r�r��compilerr�rs        rfrIrI_s���B�A�!��%�%�'�H�
� � ��*�����'�	����!��$�$����.���h�%����?�
C�;�d�B�
C�?���� � ��Q��(�0��q�6�M�%���#�#�	��	�s�B;�;C�
Cc���Sn[(aOX:aJ[c6SSKnUR5nUR=(a UR
S:q[(aUn[R"U5$)Ng-C��6?r�)r4�_old_android_emulatorr��android_ver�is_emulator�	api_levelr�r:)�interval�minimum_intervalr��avs    rfr:r:�s_�����z�h�1� �(���%�%�'�B�$&�N�N�$H�r�|�|�b�7H�!� � �'�H�� � ��*�*rec���[R"S5nU$![[4a5 [R"S5nU$![[4a SnU$f=ff=f)zGet size of a page in bytes.�SC_PAGESIZE�SC_PAGE_SIZEi)r��sysconfrr�)�	page_sizes rfr;r;�so����J�J�}�-�	����
��'��	��
�
�>�2�I�����N�+�	��I���	���s&��A�A�A�A�A�Ac#�# �SSKn[RR5nUR	5nUR5 Sv� U(aUR
USS9 gg!U(aUR
USS9 ff=f7f)NrT)r��all_threads)�faulthandlerr��
__stderr__�fileno�
is_enabledr�r�)r��fdr�s   rf�disable_faulthandlerr��st����


���	�	�	 �B��(�(�*�J�;�����
�����R�T��:���:����R�T��:��s�3B�A#�
B�#A=�=Bc�*�\rSrSrSrSrSrSrSrg)�SaveSignalsi�z�
Save and restore signal handlers.

This class is only able to save/restore signal handlers registered
by the Python signal module: see bpo-13285 for "external" signal
handlers.
c���SSKnXlUR5UlSH*n[X5nURRU5 M, 0Ulg![a MCf=f)Nr)�SIGKILL�SIGSTOP)�signal�
valid_signals�signalsr�r�r�handlers)rqr��signame�signums    rfrp�SaveSignals.__init__�sd������+�+�-���-�G�
� ��1��
�L�L����'�.���
��"�
��
�s�A�
A&�%A&c��URH1nURRU5nUcM#X RU'M3 grm)r�r��	getsignalr��rqr��handlers   rf�save�SaveSignals.save�s:���l�l�F��k�k�+�+�F�3�G����$+�M�M�&�!�#rec��URR5H upURRX5 M" grm)r�r�r�r�s   rf�restore�SaveSignals.restore�s-��#�}�}�2�2�4�O�F��K�K���v�/� 5re)r�r�r�N)	r_r`rarbrcrpr�r�rdr]rerfr�r��s����
,�0rer�c��SSKnUR=(a [
(+$![a [R"S5ef=f�Nrrn)r�rWr�r��
WITH_PYMALLOCr�r�s rf�
with_pymallocr��sC��6���"�"�:�?�':�:���6���� 4�5�5�6�s	�$�!Ac�l�SSKnUR$![a [R"S5ef=fr�)r�rWr�r��
WITH_MIMALLOCr�s rf�
with_mimallocr��s;��6���"�"�"���6���� 4�5�5�6�s��!3c�$�\rSrSrSrSrSrSrg)�
_ALWAYS_EQi�z#
Object that is equal to anything.
c��gr�r]�rq�others  rf�__eq__�_ALWAYS_EQ.__eq__����rec��g�NFr]r�s  rf�__ne__�_ALWAYS_EQ.__ne__����rer]N)r_r`rarbrcr�r�rdr]rerfr�r��s����rer�c�*�\rSrSrSrSrSrSrSrg)�	_NEVER_EQi�z'
Object that is not equal to anything.
c��gr�r]r�s  rfr��_NEVER_EQ.__eq__�r�rec��gr�r]r�s  rfr��_NEVER_EQ.__ne__�r�rec��g)Nr�r]rws rf�__hash__�_NEVER_EQ.__hash__�s��rer]N)	r_r`rarbrcr�r�r�rdr]rerfr�r��s�����rer�c�$�\rSrSrSrSrSrSrg)�_LARGESTi�z7
Object that is greater than anything (except itself).
c�"�[U[5$rm)r1r�r�s  rfr��_LARGEST.__eq__s���%��*�*rec��gr�r]r�s  rf�__lt__�_LARGEST.__lt__r�rer]N)r_r`rarbrcr�r�rdr]rerfr�r��s���+�rer�c�$�\rSrSrSrSrSrSrg)�	_SMALLESTi	z4
Object that is less than anything (except itself).
c�"�[U[5$rm)r1r�r�s  rfr��_SMALLEST.__eq__s���%��+�+rec��gr�r]r�s  rf�__gt__�_SMALLEST.__gt__r�rer]N)r_r`rarbrcr�r�rdr]rerfr�r�	s���,�rer�c�6�SSKnURR$)zDReturn the global event loop policy if one is set, else return None.rN)�asyncio.events�events�_event_loop_policy)�asyncios rf�maybe_get_event_loop_policyr�s����>�>�,�,�,re)� �@c�|�Xp2SSKnUR5nUR5S-n[US5UlURU5nUS-
U-U-nX(-n	X)-
n
X:-
nXwS-
-US-
U-U--U	SU	-
--n[
U5[
UR554sSSS5 $!,(df   g=f)Nrr��r�)�decimal�localcontext�
bit_length�max�prec�DecimalrP�sqrt)
�nbins�nballsr
rFr��ctx�bitsr��p1empty�	meanempty�occupied�
collisions�vars
             rf�collision_statsr"s����q�$�	�	�	�	�3��|�|�~��!���t�R�=���
�_�_�Q�
����F�b�=�Q�&���K�	��=���\�
��Q�$�i�"�Q�$���Q��&��a�)�m�)D�D���Z� �%����
�"3�3�
 �	�	�s�BB-�-
B;c�0�\rSrSrSrSrSrSrSrSr	g)	�catch_unraisable_exceptioniDa�
Context manager catching unraisable exception using sys.unraisablehook.

Storing the exception value (cm.unraisable.exc_value) creates a reference
cycle. The reference cycle is broken explicitly when the context manager
exits.

Storing the object (cm.unraisable.object) can resurrect it if it is set to
an object which is being finalized. Exiting the context manager clears the
stored object.

Usage:

    with support.catch_unraisable_exception() as cm:
        # code creating an "unraisable exception"
        ...

        # check the unraisable exception: use cm.unraisable
        ...

    # cm.unraisable attribute no longer exists at this point
    # (to break a reference cycle)
c� �SUlSUlgrm)�
unraisable�	_old_hookrws rfrp�#catch_unraisable_exception.__init__]s�������rec��Xlgrm)r)rqrs  rf�_hook� catch_unraisable_exception._hookas	��%�rec�Z�[RUlUR[lU$rm)r��unraisablehookrrrws rfr�$catch_unraisable_exception.__enter__fs ���+�+���!�Z�Z����rec�2�UR[lU?grm)rr�rr)rqr%s  rfr
�#catch_unraisable_exception.__exit__ks��!�^�^����Ore)rrN)
r_r`rarbrcrprrr
rdr]rerfrrDs���0�%�
�
rerr�c	��[RS:wa�SSKnUc[n[R
"5n[
USS9H2n[R"U[R5upgUS:wdM2 O~ [R"XR5 [R"US5 [R
"5U-
n[SUSUSS	35e[R"US5upg[R"U5n	X�:wa[SUS
U	SUS35eX`:wa[S
USU35eg![a N�f=f)al
Wait until process pid completes and check that the process exit code is
exitcode.

Raise an AssertionError if the process exit code is not equal to exitcode.

If the process runs longer than timeout seconds (LONG_TIMEOUT by default),
kill the process (if signal.SIGKILL is available) and raise an
AssertionError. The timeout feature is not available on Windows.
�ntrNF��errorzprocess z is still running after �.1fz secondsz exited with code z, but exit code z is expectedzpid z != pid )r�r�r�rQr9�	monotonic�sleeping_retryr�r��killr�r��AssertionError�waitstatus_to_exitcode)
r]�exitcoder�r��
start_timer��pid2r��dt�	exitcode2s
          rf�wait_processr-psF��
�w�w�$����?�"�G��^�^�%�
���u�5�A��:�:�c�2�:�:�6�L�D��q�y��6�
�����^�^�,��
�
�3��"�
���!�J�.�B� �8�C�5�1*�*,�S���";�<�
<��z�z�#�q�)����)�)�&�1�I����x��u�,>�y�k�J.�.6�Z�|�E�F�	F��{��t�D�6��#��7�8�8���#�
��
�s�87D:�:
E�Ec���SSKJn U"S5 U"S5n[RS:XaUR	SS9 gg![
an[R"SU<35eSnAff=f)	z�
Skip tests if the multiprocessing.synchronize module is missing, if there
is no available semaphore implementation, or if creating a lock raises an
OSError (on Linux only).
r�)�
import_module�_multiprocessingzmultiprocessing.synchronize�linuxN)rz broken multiprocessing SemLock: )�
import_helperr/r�r��Lockr�r�r�)r/�synchronize�excs   rf�*skip_if_broken_multiprocessing_synchronizer6�sv��-��$�%� � =�>�K�
�|�|�w��	P�
�����&����	P��#�#�&F�s�g�$N�O�O��	P�s�=�
A&�A!�!A&c��URnURnUS:waUSU3nOUnS[R"U5S3nUR"[
Xq/UQ70UD6 g)z�
Check that given type cannot be instantiated using *args and **kwds.

See bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag.
�builtinsr�zcannot create 'z' instancesN)r`r_rLr�r��	TypeError)r��tprrr<�modr��qualnamerns        rfr-r-�sf��
�-�-�C�
�;�;�D�
�j���U�!�D�6�?���V���B�I�I�h�/�0��
<�C����y�#�A�D�A�D�Arec��SSKnUR5n[US-
S5$![[4aDnSn[R
"5nUbUS-
nURnUbMSnSnANW!Snf=fSnAff=f)znGet the recursion depth of the caller function.

In the __main__ module, at the module level, it should be 1.
rNr�)rd�get_recursion_depthrW�RecursionErrorr��	_getframe�f_backr)rd�depthr5�frames    rfr>r>�s���

� �!�5�5�7���u�q�y�!����
��(�
�	��E��M�M�O�E��#���
�������#�
�E��D�E��
�s&�%�A9�.A-�&A4�-A1�1A4�4A9c�H�[R"5n[5nX-
$)z�Get the number of available frames before RecursionError.

It depends on the current recursion depth of the caller function and
sys.getrecursionlimit().
)r��getrecursionlimitr>)rDrBs  rf�get_recursion_availablerF�s"��
�!�!�#�E��!�E��=�rec#��# �[R"5n[R"U5 Sv� [R"U5 g![R"U5 f=f7f)z'Temporarily change the recursion limit.N)r�rE�setrecursionlimit)rD�original_limits  rf�set_recursion_limitrJ�sG����*�*�,�N�.����e�$�
����n�-�����n�-���A%�A
�A%�
A"�"A%c��UcSnOUS:a[S5e[5n[US-
S5nX-n[U5$)Ni N�z-max_depth must be at least 3, got {max_depth}r�)rr>rrJ)�	max_depthrBrDs   rfrArA�sM�����	�	�Q���H�I�I��!�E����	�1��E���E��u�%�%rer|�likec
�p�[5n[R"S[UUS[	U5S3-S9 U$)Nr%�
(?#support�))r(r|r�)�objectrd�filterwarnings�DeprecationWarning�id)r|rO�tokens   rf�ignore_deprecations_fromrX�s<���H�E�����#���*�R��Y�K�q�1�1�	��Lre�tokensc���U(d[S5e/n[SU55n[RHyup4pVnUS:XaXU[LaO[U[R5(a
URnOU=(d SnURU5(aMeURX4XVU45 M{ [RU:wa)U[RSS&[R"5 gg)Nz<Provide token or tokens returned by ignore_deprecations_fromc3�@# �UHnS[U5S3v� M g7f)rQrRN)rV)r�rWs  rfr��-clear_ignored_deprecations.<locals>.<genexpr>	s���D�V�E�
�2�e�9�+�Q�/�V�s�r%r6)rrrd�filtersrUr1rL�Patternr�r)r��_filters_mutated)	rY�new_filtersr)�actionr�r(r|r�rns	         rf�clear_ignored_deprecationsrb		s�����W�X�X��K��D�V�D�D�H�5=�5E�5E�1���6��X��(�.@�"@��'�2�:�:�.�.��o�o���m����|�|�H�%�%�����F�X�v�F�G�6F����;�&�)�������!�!�#�'rec��SSKnSSKn[R
"US5$![a [R"SS5s$f=f![a SnNLf=f)NrTzvenv: ensurepip requires zlibzvenv: pip requires ctypes)rVrWr�r	r�rX)rVr�s  rf�requires_venv_with_piprd	sc��F�������v�'B�C�C���F����t�%D�E�E�F�������s �"�A	�!A�A�	A�Ac��[R"S5=(d$ [RR	[
S5n[R"U5n[USS9nUHWnURS5(dMUS-nURU5(dM8[RR	X5s $ [SUSU35e)	z�Try to find a wheel with the package specified as pkgname.

If set, the wheels are searched for in WHEEL_PKG_DIR (see ensurepip).
Otherwise, they are searched for in the test directory.
�
WHEEL_PKG_DIR�	wheeldataT)�reversez.whlr�z
No wheel for z
 found in )r8r9r�r�rr��listdirr�r)r�r�)�pkgname�	wheel_dir�	filenamesr��prefixs     rf�
_findwheelrn.	s����(�(��9��R�W�W�\�\��{�>�I��
�
�9�%�I��y�$�/�I���� � ��(�(���3������v�&�&��7�7�<�<�	�4�4�
��m�G�9�J�y�k�J�
K�Krec#�N^^	# �SSKmSSKm	SSKJn UU	4SjnU"5n[R
SSSSU/nU"U5 [RRX05n[RR[R
5n[RS	:Xa"[RRUS
U5nO![RRUSU5nUSSSSS
[S5[S5/nU"U5 Uv� SSS5 g!,(df   g=f7f)Nrr�)�temp_cwdc	�>�[(aJ[5 [SSR[TRU555 TRUSS9 gTRUTRTRSS9 g)NzRun:� T)r�)r�r�r�)rr�rr�quoter�r�STDOUT)r�shlexr�s ��rf�run_command�9setup_venv_with_pip_setuptools_wheel.<locals>.run_commandL	sa����7��G��&�#�(�(�3�u�{�{�C�#8�9�:��N�N�3�d�N�+��N�N�3�",�/�/�",�"3�"3�!%�
�
'rez-X�devz-m�venvrp�Scripts�bin�pip�installr��wheel)rur�r�rpr�rgr�r�rr�r�rn)
�venv_dirrprv�temp_dirrry�
python_exerrur�s
        @@rf�$setup_venv_with_pip_setuptools_wheelr�F	s�������#�	'�
��x��~�~�t�U�D�&�(�C���C���w�w�|�|�H�/���W�W�%�%�c�n�n�5�
��<�<�7�"��W�W�\�\�$�	�:�>�F��W�W�\�\�$��z�:�F��t�U��U�I��,�'��'�"�$��	�C����)
���s�D%�C*D�	D%�
D"�D%�gettotalrefcountc���U/nURU5 SSKnSnXlURU5 [	[
S5(aSnXl[
R"US9 gg)aR
Keep a Python alive as long as possible.

Create a reference cycle and store the cycle in an object deleted late in
Python finalization. Try to keep the object alive until the very last
garbage collection.

The function keeps a strong reference by design. It should be called in a
subprocess to not mark a test as "leaking a reference".
rNc��grmr])�encodings rf�search_func�"late_deletion.<locals>.search_func�	r�re�register_at_forkc��grmr]r]rerf�atfork_func�"late_deletion.<locals>.atfork_func�	rre)�before)r��codecs�	reference�registerr�r�r�)r��	ref_cycler�r�r�s     rf�
late_deletionr�s	sa��&��I�
���Y����%��
�O�O�K� ��r�%�&�&�	� )��
���;�/�'rer c#� # �US::a[S5e[R"5nX0-nSv� [R"5U:�aOM U(a8[R"5U-
nSUSS3nU(aUSU3n[U5eg7f)a�
Run the loop body until "break" stops the loop.

After *timeout* seconds, raise an AssertionError if *error* is true,
or just stop if *error is false.

Example:

    for _ in support.busy_retry(support.SHORT_TIMEOUT):
        if check():
            break

Example of error=False usage:

    for _ in support.busy_retry(support.SHORT_TIMEOUT, error=False):
        if check():
            break
    else:
        raise RuntimeError('my custom error')

rz!timeout must be greater than zeroNz	timeout (r"z	 seconds)r�)rr9r#r&)r��err_msgr!r)�deadliner+rns       rf�
busy_retryr��	s����,�!�|��<�=�=����!�J��#�H�
�
��>�>��x�'��	�
�
�^�^�
�
�
*���"�S���+����E��G�9�%�C��S�!�!�
�s�BBg{�G�z�?g�?)�
init_delay�	max_delayr!c#�# �Un[XUS9H,nSv� [R"U5 [US-U5nM. g7f)a�
Wait strategy that applies exponential backoff.

Run the loop body until "break" stops the loop. Sleep at each loop
iteration, but not at the first iteration. The sleep delay is doubled at
each iteration (up to *max_delay* seconds).

See busy_retry() documentation for the parameters usage.

Example raising an exception after SHORT_TIMEOUT seconds:

    for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
        if check():
            break

Example of error=False usage:

    for _ in support.sleeping_retry(support.SHORT_TIMEOUT, error=False):
        if check():
            break
    else:
        raise RuntimeError('my custom error')
r Nr�)r�r9�sleeprW)r�r�r�r�r!�delayr�s       rfr$r$�	s<���4
�E�
���
6��
��
�
�5���E�A�I�y�)��	7�s�>Ac�$�\rSrSrSrSrSrSrg)�CPUStopwatchi�	a�Context manager to roughly time a CPU-bound operation.

Disables GC. Uses CPU time if it can (i.e. excludes sleeps & time of
other processes).

N.B.:
- This *includes* time spent in other threads.
- Some systems only have a coarse resolution; check
  stopwatch.clock_info.rseolution if.

Usage:

with ProcessStopwatch() as stopwatch:
    ...
elapsed = stopwatch.seconds
resolution = stopwatch.clock_info.resolution
c�6�[Rn[R"S5nU"5S::a&[Rn[R"S5n[	5UlUR
R
5 XlX lU"5Ul	U$)N�process_timerr#)
r9r��get_clock_infor#r��contextr�get_time�
clock_infor))rqr�r�s   rfr�CPUStopwatch.__enter__�	sp���$�$���(�(��8�
��:��?��~�~�H��,�,�[�9�J�!�|�������� � �
�$��"�*����rec��UR5nURR"U6nX R-
UlU$!URR"U6nf=frm)r�r�r
r)�seconds)rqr5�end_timer�s    rfr
�CPUStopwatch.__exit__
sQ��	1��}�}��H��\�\�*�*�C�0�F��/�/�1����
���\�\�*�*�C�0�F�s�A�A)r�r�r�r�r)N)r_r`rarbrcrr
rdr]rerfr�r��	s���"�rer�c#��# �[R"5n[R"U5 Sv� [R"U5 g![R"U5 f=f7f)z>Temporarily change the integer string conversion length limit.N)r��get_int_max_str_digits�set_int_max_str_digits)�
max_digits�currents  rf�adjust_int_max_str_digitsr�
sG����(�(�*�G�,��"�"�:�.�
��"�"�7�+���"�"�7�+�rKc�l�SSKnUR$![a [R"S5ef=fr�)r��Py_C_RECURSION_LIMITrWr�r�r�s rfrTrT
s7��6���-�-�-���6���� 4�5�5�6�s��!3c��[5S-$)z<For recursion tests, easily exceeds default recursion limit.rM)rTr]rerfrSrS
s�� �"�Q�&�&re�uname�s390xzskipped on s390x�
getobjectsc�^^^�SSKJmJm [R
"T5UUU4Sj5nU$![a Ts$f=f)Nr)�
get_optimizer�
set_optimizerc�^>�T"5nT"S5 T"U0UD6T"U5 $!T"U5 f=frmr])rrrM�save_optr�r�r�s   ���rfr�"without_optimizer.<locals>.wrapper0
s5��� �?��	$��$����(��(��(�#��M�(�#�s�"�
,)rdr�r�rWrr)r�rr�r�s` @@rfrVrV+
sE����B��_�_�T��$��$��N�������s�0�?�?z.git�__pycache__c��[n[RRU5S:Xa	USS1-nU$SU;aUS1-nU$)N�Doc�buildry�Modules)� _BASE_COPY_SRC_DIR_IGNORED_NAMESr�r�r�)r��names�ignoreds   rf�copy_python_src_ignorer�C
s]��.�G�	�w�w������&����	
�	
���N�
�e�	���
�	
���Nrec#�# �[R5H2n[U[5(dMUnURS:waM.Uv� M4 g7f)Nr8)�__builtins__r�r1r�r`)r�r�s  rf�iter_builtin_typesr�V
sA����"�"�$���#�t�$�$�����>�>�Z�'���	�
%�s�AAc#��^# �TRS:XdT5eU4Sjn[T5n[U5n[T5H�nXB;aUR	U5 [TU5nURS5(aURS5(dU"XE5(a	TXE45eU"XE5(d%XB;aU"XBU5(aTXEX$45eM�M�XB;aX$ULdTXEX$45eUS4v� M�US4v� M� UHnX$nU"TXE5(dMUS4v� M g![a: US;d	TU45eXB;a!U"XBU5(aURU5 GM+f=f7f)Nr8c�>�[U[R5(d)[U5R	S5(a	TX45eg[U5R	S5(d	TX45e[U5(d	TX45eUR	S5(aUR
S5(d	TX45eg)Nz<slot wrapper Fr(T)r1r2�WrapperDescriptorTyperr��callabler))r��valuer�s  �rf�is_slot_wrapper�+iter_slot_wrappers.<locals>.is_slot_wrapperc
s�����%��!<�!<�=�=��E�{�-�-�.>�?�?�S�#�t�AS�S�?���E�{�%�%�&6�7�7�K�#�t�9K�K�7�����2��d� 2�2�����t�$�$����t�)<�)<�P�s�D�>P�P�<�re)�__annotate__�__annotations__�__abstractmethods__r(TF)
r`�varsr+r,rr�r�r4r�r))r�r�r��unusedr�r�s`     rf�iter_slot_wrappersr�`
s������>�>�Z�'�,��,�'��
�c��B�
��W�F��C����:��M�M�$��	��C��&�E����t�$�$�D�M�M�$�,?�,?�&�t�3�3�G�c�4�5G�G�3��t�+�+��z�*�4�D��:�:�X�S�$�r�x�<X�X�:�:���z��x�5�(�F�3��R�X�*F�F�(��D�j� ��E�k�!�/�2������3��,�,���*����'�	��U�U�b�X[�]a�Wb�b�U��z�o�d�t�H�=�=��
�
�4� ��	�s1�AE1�D*�(B3E1�E1�*?E.�)E1�-E.�.E1c#�# �SSKnSSKJn [USS
Sj5 U"5nUR	SSS5 URSS	5 Sv� SSS5 SSS5 g!,(df   N=f!,(df   g=f7f)Nrr�)�EnvironmentVarGuard�can_colorizec��gr�r]r�s rfr��no_color.<locals>.<lambda>�
s��ure�FORCE_COLOR�NO_COLOR�
PYTHON_COLORS�1rm)�	_colorizer�r�rB�unsetr+)r�r�rGs   rf�no_colorr��
sa����.�	�)�^�-D�E�����	�	�-��_�=����
�C� �
�		�	F�E����	F�E�s3�B�A1�*A �A1�	B� 
A.	�*A1�1
A?�;Bc�F^�[R"T5U4Sj5nU$)z'Force the terminal not to be colorized.c�^>�[5 T"U0UD6sSSS5 $!,(df   g=frm)r�)rrrMr�s  �rfr�$force_not_colorized.<locals>.wrapper�
s���
�Z���(��(��Z�Z�s��
,rP)r�rs` rfrWrW�
s%����_�_�T��)��)��Nrec�^�URm[[R"UR5U4Sj55nXlU$)zAForce the terminal not to be colorized for the entire test class.c�F>�UR[55 T"5 grm)�enterClassContextr�)r��original_setUpClasss �rf�new_setUpClass�6force_not_colorized_test_class.<locals>.new_setUpClass�
s���	���h�j�)��re)�
setUpClass�classmethodrr)r�r�r�s  @rfrXrX�
s@����.�.����_�_�S�^�^�$��%���$�N��Jrec�
�[RR5nUR5H,nURS5(dMUR	U5 M. UR	SS5 UR	SS5 U$)N�PYTHONr�r�)r�r;�copyr�r�)�	clean_envrFs  rfrYrY�
sb���
�
���!�I�
�^�^�
���<�<��!�!��M�M�!����M�M�-��&�
�M�M�*�d�#��rec�<�[[RSS5$)z<Detect whether PyREPL was used during Python initialization.�__main__�__file__)r�r�r�r]rerf�initialized_with_pyreplr��
s���3�;�;�z�*�J�7�7rec�*�\rSrSrSSjrSrSrSrg)rZi�
c�4�U(aSS- X lX0lg�Nr�r)�next_raises�iter_raises)rq�init_raisesr�r�s    rfrp�BrokenIter.__init__�
s���
�a�C�&��&�rec�2�UR(aSS- ggr�)r�rws rf�__next__�BrokenIter.__next__�
s�����
�a�C�rec�2�UR(aSS- U$r�)r�rws rf�__iter__�BrokenIter.__iter__�
s�����
�a�C��re)r�r�N)FFF)r_r`rarbrpr�r�rdr]rerfrZrZ�
s��'��rerZc���[RS:wagSSKn[[S[R5nSU/nURUSURS9nS	U;$![UR4a gf=f)
z@
Test if the Python executable is linked to the musl C library.
r1FrN�_base_executable�lddT)�textr��musl)	r�r�r�r�rg�check_outputrtr�r�)r��exerr�s    rf�linked_to_muslr�
s����|�|�w����
�#�)�3�>�>�
:�C��#�,�C���(�(��.2�0:�0A�0A�)�C��

�f����
�Z�2�2�3����s�A�A7�6A7rm)z
requires zlib)z
requires gzip)zrequires bz2)z
requires lzma)z$requires co_positions / debug_ranges)T)r6)zneeds the GIL enabled)Nr]r])F)r])�rcr_rW�
contextlib�dataclassesrr*r�r�rLr�r�r8r�r9r2r�rdr6rNrOrPrQr�r�r�r��TEST_SUPPORT_DIRr�r��	REPO_ROOTr�rr	r}r
r�rr(r)rrrrrV�junit_xml_listrr�rr
r�r�rrrrrrr.r.r/�HAVE_ASAN_FORK_BUGrIrQr�
SOCK_MAX_SIZErXrP�
__getformat__r�r r!rrrrgri�contextmanagerrkror�r2r3r4r9r5r6r7�is_appler�r"r#r$r%r&r'�has_strftime_extensions�strftimer�
TEST_HTTP_URLrHr"rr�r�r@rFr�r�rSr�rr<rrrrr�r�r�r�rrr�r9rrr	rrrrrrrr"r>r4rGrJrKrU�_4GryrXrrSrDr[rrr�r�rr�r�r8r�r�r0�TEST_MODULES_ENABLEDr1r��MISSING_C_DOCSTRINGS�HAVE_DOCSTRINGS�requires_docstringsr�r�r�r�r�r=rBr?r�r�rCr�r,r�r$r*r+rIrErgrkrprxror�rIr�r:r;r�r�r�r�r�rJr�rK�total_orderingr�rLr�rMr��	hash_info�width�	NHASHBITSrrr-r6r-r>rFrJrArXrbrd�cachernr�rRr�r�r$r�r�rTrSr��machine�is_s390xr	rU�
Py_TRACE_REFSrV�	frozensetr�r�r�r�r�rWrXrYr�rZrr]rerf�<module>r#s�	��=��~��
�F�
G�G������	�	��
�������,��p�����
����7�7�?�?�2�7�7�?�?�8�#<�=������� 0�1�
�
�W�W�_�_�]�
+�
��G�G�O�O�J�'�	�5�I�5����=�J�=�)�E�)��X�&�&����$����
�
�
�������
���*�
�"E$�N>�	7��6:�8��:
/� %�U�u�U��@)�e�E�e�TY�)�%�T�2����$$�
�%�
��'�'�	����!�,�,�V�4�$�&��-�-�,�-�1�:����:��:�$P��l�l�g�%�
�
�L�L�#�#�F�+�	�
�\�\�Y�
&�
��<�<�E�E�%/�!�Y�J��J�����,�
�

�,�,�&�
 ���,�,�"<�<���6�c�l�l�h�6���2�v�&�	��������	,��O�
�������
��V������
',�
<� ���<�<�7��
�"&�-�-��"6�%�"?��,�
����������]�F�3�
��&�&��3��4��V��,��	1�$�t�	1�41�n���	/��	/�%�%�
$�
����������)��)�%�B�$*��y�/�/�0A�B�C��1�'���G��G�	
���S�=��3�4�
����(�$���4��4�D"�P�F��
�S�j���#�g���#�g������>�3�>�3�>�	��	��	�%�%�@.�`
�$�O�+��!�8��8*��"�0�0��@�I�E�e�S��H�7�*�+�I�����/�I�%�4�4�5G�H�H��%�,�,�D�8�,�+�+���)�)�/�*D�F���� �J�J�
����#�<���#��#�<������<5�;��f��D��]�*OB�OB�d4�79��@B� �89�v.�*]�]�@3�D������
,�37�H�6;��,+-��B��+�	����;��;�"$0�$0�N;�#���
�L�	�	�	��;��
��������*��
��������;��-�
�M�M���	��H����4�D)�)�X,0�-9�^P�2
B��.����.��.�&��S��3��6��$��$�4�$�*
D� ���L��L�.���$��$�R�3�*�+��"0�J'"�$�'"�T*�#(�C�t�*�D%�%�P���,��,�6�'��2�w��A�B�H�H�J�$6�$6�'�$A������*<�=�
���\�*�
�
� $-�
��	.�$� ��&�*�Z���
��
�����S�#�X���8���"��QC�
��
�s�^�^(�'^(

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 112.16 KB 0644
ast_helper.cpython-313.pyc File 2.22 KB 0644
asynchat.cpython-313.pyc File 10.8 KB 0644
asyncore.cpython-313.pyc File 25.15 KB 0644
bytecode_helper.cpython-313.pyc File 9.39 KB 0644
hashlib_helper.cpython-313.pyc File 2.5 KB 0644
hypothesis_helper.cpython-313.pyc File 1.26 KB 0644
i18n_helper.cpython-313.pyc File 3.56 KB 0644
import_helper.cpython-313.pyc File 14.17 KB 0644
logging_helper.cpython-313.pyc File 1.59 KB 0644
numbers.cpython-313.pyc File 745 B 0644
os_helper.cpython-313.pyc File 30.43 KB 0644
pty_helper.cpython-313.pyc File 3.77 KB 0644
refleak_helper.cpython-313.pyc File 396 B 0644
script_helper.cpython-313.pyc File 13.72 KB 0644
smtpd.cpython-313.pyc File 38.75 KB 0644
socket_helper.cpython-313.pyc File 15.57 KB 0644
testcase.cpython-313.pyc File 7.56 KB 0644
threading_helper.cpython-313.pyc File 11.66 KB 0644
venv.cpython-313.pyc File 4.75 KB 0644
warnings_helper.cpython-313.pyc File 9.71 KB 0644
Filemanager