403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python315/Lib/test/__pycache__/test_sys.cpython-315.opt-2.pyc
R
>lqj�c���]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s	]PH(s
]PH,s]PH0s]PH4s
]PH8s]QHGs]QHDGs]QH<Gs]QH8Gs]QHTGsGs]QH`Gs]QH8Gs]QH8Gs]Q	H8Gs]Q
H8Gs]QHzGs]PH�s!]PHDs]PH�s"Qs#Q
s$QQ\OJ2s&QQ\OJ2s'QQ\OJ2s(QQ\OJ2s)\O&OT\O&OVQQ\OJ222s,\O&OTQQ\OJ22s-\O&O\\O&OTQQ\OJ222s/QQ\OJ2s0\1Q6Xc\Od2P!P!\ cPsCK^h9h)�)�StringIO)�mock)�support)�	os_helper)�assert_python_ok�assert_python_failure)�find_unused_port)�threading_helper)�
import_helper)�force_not_colorized)�
SHORT_TIMEOUT)�interpretersc�J�[O[PIQ2U2!)Nzsubinterpreters required)�unittest�skipIfr
)�meths&�"C:\Python315\\Lib\test\test_sys.py�requires_subinterpretersr#s%���?�?�<�4�/�5�7�7;�=�=��n2BI2nc�:`�\sQs]+snQsQsQsQsQsUs	P!)�DisplayHookTestc���[Oo[O29^tt^2oU]*2PPP2UO	WO2Q2UO	[O]*2[;[O29^tt^2oUP2PPP2UO	UO2P2UO[Q2UO[U2[Oo[;UO[U]*2U[mP!)%fhCK9h)%fhK�9hS[mh9h)�*z42
�_)
�sys�__displayhook__r�captured_stdout�assertEqual�getvalue�builtinsr�assertNotHasAttr�assertRaises�	TypeError�stdout�RuntimeError)�self�dh�outr$s&   r�test_original_displayhook�)DisplayHookTest.test_original_displayhook-s���
�
 �
 ��
�
$�
$�
&�
&�#��r�F�'�	
��������0�������R�(��J�
�
$�
$�
&�
&�#��t�H�'�	
��������,����h��,�	
���)�R�(�����	 ��
����l�B��3��C�J�-'�
&�
&��'�
&�� �C�J�s/�	D;�#	E�E"�;E	�E	�E	�E	�"
E/c��[Oo[;[QQQ2oUO[[
U2U[mP!S[mh9h)�42�<string>�single)r�displayhook�compiler"r%�eval)r&r/�codes&  r�test_lost_displayhook�%DisplayHookTest.test_lost_displayhookHsD���o�o��	*����4��X�6�D����l�D�$�7�)�C�O��k�C�O�s�.A�
Ac���Qo[O[QU29^tt^2[QQQ2oUO	[
[U2PPP2P!)%fhP!9h)c��[g�N��
ValueError)�objs&r�baddisplayhook�?DisplayHookTest.test_custom_displayhook.<locals>.baddisplayhookR����rr/r,r-r.)r�	swap_attrrr0r"r9r1)r&r;r2s&  r�test_custom_displayhook�'DisplayHookTest.test_custom_displayhookQsN��	��
�
�s�M�>�
B�
B��4��X�6�D����j�$��5�C�
B�
B�
B�s�)A�A-	�%A-	c��QQ2o[O[QP29^tt^2[O2[m[OU22PPP2P!)%fhP!9h)c�(`�\sQs]ZsnQsQsUsP!)�(DisplayHookTest.test_gh130163.<locals>.Xc�n�[O2[m[O
2Q!)�foo)�iorrr$r�
gc_collect�r&s&r�__repr__�1DisplayHookTest.test_gh130163.<locals>.X.__repr__[s���[�[�]��
��"�"�$�r�)�__name__�
__module__�__qualname__�__firstlineno__rI�__static_attributes__�__classdictcell__��
__classdict__s@r�XrCZs����
�
rrTr$)rr>rrFrr$r/)r&rTs& r�
test_gh130163�DisplayHookTest.test_gh130163YsM��	�	��
�
�s�H�d�
3�
3�����C�J��O�O�A�C� �4�
3�
3�
3�s�:A4�4B	�=B	rK)
rLrMrNrOr)r3r?rUrPrQrRs@rrr+s���� �6*�6�	!�	!rrc�F`�\sQs]esnQsQsQsQsQsQs	Qs
UsP!)�ActiveExceptionTestsc�R�UO[O2Q2P!)N)NNN)rr�exc_inforHs&r�test_exc_info_no_exception�/ActiveExceptionTests.test_exc_info_no_exceptionfs���������);�<rc�R�UO[O2P2P!r7)rr�	exceptionrHs&r�test_sys_exception_no_exception�4ActiveExceptionTests.test_sys_exception_no_exceptionis���������$�/rc�Z�QoU2UOW[2UOW]*[2UOU]*U2UOU]*UO2P![c"oSo[O2oPo=K�Po=hh9h)c��[]*2g�rr8rKrr�f�EActiveExceptionTests.test_exc_info_with_exception_instance.<locals>.fm����R�.� r��	ExceptionrrZ�assertIsInstancer9�assertIs�
__traceback__�r&rd�e_�erZs&    r�%test_exc_info_with_exception_instance�:ActiveExceptionTests.test_exc_info_with_exception_instancels��	!�	&�
�C�
	
���a��,��
�
�h�q�k�:�.��
�
�h�q�k�1�%��
�
�h�q�k�1�?�?�3���	&��A��|�|�~�H��	&���A>�>	B*�B*�	B%�%B*c�Z�QoU2UOW[2UOW]*[2UOU]*U2UOU]*UO2P![c"oSo[O2oPo=K�Po=hh9h)c��[gr7r8rKrrrd�AActiveExceptionTests.test_exc_info_with_exception_type.<locals>.f|r=rrgrls&    r�!test_exc_info_with_exception_type�6ActiveExceptionTests.test_exc_info_with_exception_type{s��	�	&�
�C�
	
���a��,��
�
�h�q�k�:�.��
�
�h�q�k�1�%��
�
�h�q�k�1�?�?�3���	&��A��|�|�~�H��	&�rqc���QoU2UOW[2UOWU2P![c"oSo[O2oPo=KQPo=hh9h)c��[]*2grcr8rKrrrd�JActiveExceptionTests.test_sys_exception_with_exception_instance.<locals>.f�rfr�rhrr^rir9rj�r&rdrmrn�excs&    r�*test_sys_exception_with_exception_instance�?ActiveExceptionTests.test_sys_exception_with_exception_instance�sS��	!�	"�
�C�
	
���a��,��
�
�c�1����	"��A��-�-�/�C��	"���7�	A#�A#�A�A#c���QoU2UOW[2UOWU2P![c"oSo[O2oPo=KQPo=hh9h)c��[gr7r8rKrrrd�FActiveExceptionTests.test_sys_exception_with_exception_type.<locals>.f�r=rrzr{s&    r�&test_sys_exception_with_exception_type�;ActiveExceptionTests.test_sys_exception_with_exception_type�sS��	�	"�
�C�
	
���a��,��
�
�c�1����	"��A��-�-�/�C��	"�rrK)rLrMrNrOr[r_rorur}r�rPrQrRs@rrXrXes(����=�0�
4�
4���rrXc�H`�\sQs]�sn\Q2s\Q2sQsQsUs	P!)�ExceptHookTestc��[]*2g[cpo[O29^tt^2o[O[O
2PPP2Po=L)%fhPo=L9hPo=hh9hSO
WO2Q2SO[[O2P!)rzValueError: 42
)
r9r�captured_stderrr�__excepthook__rZ�assertEndsWithrr"r#�r&r|�errs&  r�test_original_excepthook�'ExceptHookTest.test_original_excepthook�s���	4��R�.� ���	4��(�(�*�*�c��"�"�C�L�L�N�3�+�*�*�*�*��	4��	
���C�L�L�N�,>�?����)�S�%7�%7�8s<��	B�B�B�)A,�B�,B�5B�7B�B�Bc
�R�[O29^tt^2[OQ[2[	QQ2g[cpo[
O29^tt^2o[O[O2PPP2Po=L)%fhPo=L9hPo=hh9hPPP2L)%fhL9hWO2oSOQS2SOQS2SOSQ2P!)�ignore�msgz%  File "b'bytes_filename'", line 123
z	    text
zSyntaxError: msg
)sbytes_filename�{r�text)
�warnings�catch_warnings�simplefilter�BytesWarning�SyntaxErrorrr�rr�rZr�assertInr�r�s&  r�test_excepthook_bytes_filename�-ExceptHookTest.test_excepthook_bytes_filename�s����
$�
$�
&�
&��!�!�(�L�9�
8�!�%�)L�M�M���
8��,�,�.�.�#��&�&�����7�/�.�.�.�.��
8��'�
&�
&�
&���l�l�n���
�
�B�C�H��
�
�&��,����C�!5�6sd�C�A�	C�C�B=�0)B&�B=�!C�&B:�/B:�1B=�5C�:B=�=C�C�C	�C	c	��[OOQ29^tt^2o[OO29^tt^2[O
]Q]2PPP2PPP2UO
QWO272P!)%fhK<9h)%fhKG9h)�stderr�1zETypeError: print_exception(): Exception expected for value, str found)�testr�captured_output�catch_unraisable_exceptionr�
excepthook�
assertTruer)r&r�s& r�test_excepthook�ExceptHookTest.test_excepthook�s|��
�\�\�
)�
)�(�
3�
3�v����8�8�:�:����q�#�q�)�;�4�	
���,�/5���/@�A�	B�;�:��4�
3�s/�'B0�B	�)B0�B-
�&B-
�(B0�0C	�9C	rK)
rLrMrNrOrr�r�r�rPrQrRs@rr�r��s7�����	9��	9��7��7�"B�Brr�c�(`�\sQs]�snQsQs\O2Q2sQs	Qs
QsQsQs
\OOQ	2sQ
sQs\O(\\Q2Q
2Q2s\OO0Q2sQsQs\O\O:\O<2Q222s\O:\O<2Q22s Qs!Qs"Qs#\O(\OHQ2Q2s%Qs&Qs'\O\(Q22s)\O\(Q22s*\O\(Q22s+Qs,Qs-Q s.Q!s/Q"s0Q#s1\OOQ$2s2\3\O2Q%22s4\O(\5OlQ&2\O(\On2\8OrP
26HQ'2\O2Q(222s:\Ov\Ox\Oz6gQ)2\O2Q*22s>QRQ+ks?Q,s@QSQ-ksAQ.sB\O2Q/2sC\O2Q02sDQ1sE\OOQ22sF\O(\\Q32Q42Q52sGQ6sHQ7sIQ8sJQ9sK\O(\O�Q:6HQ;2Q<2sM\3\O2Q=22sNQ>sO\O(\\Q?2Q@2QA2sP\O2QB2sQQCsR\O(\\QD2QE2QF2sS\O(\\QG2QH2QI2sT\O(\\QJ2QK2QL2sU\OO\O(\\QM2QN2QO22sVQPsWQQsXUsYP!)T�
SysModuleTestc�D�[OO2P!r7�r�r�
reap_childrenrHs&r�tearDown�SysModuleTest.tearDown�������"�"�$rc�Z`�RO[[O]*]*2RO[29^tt^2o[O2PPP2ROWOO2[QQ2vq#oROU]2ROUQ2ROUQ2[QQ2vq#oROUQ2ROUQ2ROUQ2[QQ2vq#oROUQ2ROUQ2ROUQ2RO[29^tt^2o[O]*2PPP2ROUOO]*2RO[29^tt^2o[OQ2PPP2ROUOO]*2RO[29^tt^2o[OQ2PPP2ROUOOQ2RO[29^tt^2o[OQ2PPP2ROUOOQ2[QQ2vq#oROU]/2ROUQ2ROUQ2U1QkoUQ	Q
2UQQ2UQ
QQQ5P!)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK?9h)%fhK�9h)r�-czimport sys; sys.exit()rz!import sys; sys.exit(0xffff_ffff)zimport sys; sys.exit(2**128)�exitzraise SystemExit(47)c�:�[QU1-U@vq4oROU]2ROUQ2ROVQ2P!)r�r)rr�assertStartsWith)r2�expected�env_vars�rcr(r�r&s&&,   �r�check_exit_message�3SysModuleTest.test_exit.<locals>.check_exit_messagesF���0��t�H�x�H�L�B�S����R��#����S�#�&��!�!�#�0rz?import sys; sys.stderr.write("unflushed,"); sys.exit("message")sunflushed,messagez)import sys; sys.exit("surrogates:\uDCFF")ssurrogates:\udcffzimport sys; sys.exit("h\xe9")sh�zlatin-1)�PYTHONIOENCODING)����l��rc)��)r"r#rr��
SystemExit�assertIsNoner^r2rrrr�)r&�cmr�r(r�r�sf     r�	test_exit�SysModuleTest.test_exit�s�������)�S�X�X�r�2�6��
�
�z�
*�
*�b��H�H�J�+����"�,�,�+�+�,�'��.F�G��������Q������c�"�����c�"�-�T�3V�W�����
�
�b�1�2�����c�"�����c�"�-�T�3Q�R�����
�
�b�1�2�����c�"�����c�"��
�
�z�
*�
*�b��H�H�R�L�+�������*�*�B�/��
�
�z�
*�
*�b��H�H�U�O�+�������*�*�B�/��
�
�z�
*�
*�b��H�H�V��+�������*�*�F�3��
�
�z�
*�
*�b��H�H�X��+�������*�*�H�5�-�T�3I�J��������R� �����c�"�����c�"�	1�	�N� �	"�	�8�!�	#�	�,��y�	2�M+�
*�
*��0+�
*�
*��+�
*�
*��
+�
*�
*��
+�
*�sZ�M
�5M�M2�9N�N�
M	�M	�M/	�'M/	�2N	�;N	�N	�N	�N*	�#N*	c���]PHo,QNoSFD�oQFD�oUOV4Q59^tt^2UOQ29^tt^2oUOUQUQ02UO	]2[
O[O,UQ5oUOUOU2PPP2PPP2J�	J�	P!)%fhK"9h)%fhJ�9h)r)�exitfunc�return_codezw+�(z)
)�stdin)r�z__import__('sys').exitzraise SystemExit)rr�)�tempfile�subTest�
TemporaryFile�write�seek�
subprocess�runr�
executabler�
returncode)r&r��	exit_waysr�r�r��procs&      r�test_exit_codes_under_repl�(SysModuleTest.test_exit_codes_under_repl$s���	�
�	�"�H�'���\�\�8�\�M�M�!�/�/��5�5�����x�j��+��c�$B�C��
�
�1�
�)�~�~�s�~�~�.>�e�L���(�(����+�F�	6�N�M� (�"�6�5��N�M�M�s0�C#
�
A,C�6C#
�C �C �C#
�#C4�,C4c��UO[[O]*2UO	[O2[
2P!rc)r"r#r�getdefaultencodingri�strrHs&r�test_getdefaultencoding�%SysModuleTest.test_getdefaultencoding9s3�����)�S�%;�%;�R�@����c�4�4�6��<rc�x�UO[[O2UO[[OQ2UO[[OQ2UO[[OQ2[O
2oUO
UQ6U2QQQU1FD>o[OU2UO[O
2U2J@	[OU2P![OS2h9h)�agg�?g�h㈵��>g�������?g@g�)r"r#r�setswitchintervalr9�getswitchintervalr��assertAlmostEqual)r&�orig�ns&  r�test_switchinterval�!SysModuleTest.test_switchintervalAs������)�S�%:�%:�;����)�S�%:�%:�C�@����*�c�&;�&;�T�B����*�c�&;�&;�S�A��$�$�&������s�
�D�)�	(��d�C��-���%�%�a�(��&�&�s�'<�'<�'>��B�.�
�!�!�$�'��C�!�!�$�'�s
�A	D!�!D9c���[O2oUOU[2UO	U]2UO[[O]*2P!��)r�getrecursionlimitri�int�
assertGreaterr"r#)r&�limits& r�test_getrecursionlimit�$SysModuleTest.test_getrecursionlimitPsH���%�%�'�����e�S�)����5�!�$����)�S�%:�%:�B�?rc��[O2o[OQ2UO[O2Q2UO	[
[O2UO	[[OQ2[OU2P![OS2h9h)i'i���)rr��setrecursionlimitrr"r#r9�r&�	old_limits& r�test_setrecursionlimit�$SysModuleTest.test_setrecursionlimitWs����)�)�+�	�	-��!�!�&�)����S�2�2�4�f�=����i��)>�)>�?����j�#�*?�*?��E��!�!�)�,��C�!�!�)�,�s�BB4�4Cc	�`�[[Q2%c-[O2%cUOQ2[O2oU1QknQFDto[O
U2UO[29^tt^2R2PPP2UO[29^tt^2R2PPP2Jv	[O
U2P![cJ�h9h)%fhKk9h)%fhJ�9h[O
S2h9h)�gettracez(fatal error if run with a trace functionc�:�R2P!r7rK)rds�rrd�5SysModuleTest.test_recursionlimit_recovery.<locals>.fgs���
�Cr)�2�K�d���)�hasattrrr��skipTestr�r��RecursionErrorr")r&r��depthrds&  @r�test_recursionlimit_recovery�*SysModuleTest.test_recursionlimit_recoverybs�����3�
�#�#�������M�M�D�E��)�)�+�	�	�	-�1����)�)�%�0��&�&�~�6�6��C�7��&�&�~�6�6��C�7�6�2�
�!�!�)�,��&�����7�6��6�6�6��
�!�!�)�,�sr�!D-�(C4�>D-�D	�#%D-�D	�D-�4	D�>D�?D-�D�D-�D
�D
�D-�D*
�"D*
�$	D-�-Ec	��[O2o[O2oUO	[O2UQ59^tt^2[O
U]*2[O
U2UO
[29^tt^2o[O
U2PPP2PPP2UO[WO2Q2[O
U2P!)%fhKU9h)%fhK`9h[O
S2h9h))r�r�z\cannot set the recursion limit to [0-9]+ at the recursion depth [0-9]+: the limit is too low)rr�r�get_recursion_depthr�r�r"r��assertRegexr�r^)r&r�r�r�s&   r�test_setrecursionlimit_to_depth�-SysModuleTest.test_setrecursionlimit_to_depth{s���
�)�)�+�	�	-��/�/�1�E����C�$9�$9�$;�5��I�I��%�%�e�a�i�0��%�%�i�0��&�&�~�6�6�"��)�)�%�0�7�J�
���S����.�4�
5�

�!�!�)�,�7�6��J�I��
�!�!�)�,�sI�AD6�AD#�,D	�D#�-D6�D 
�D 
�D#�#D3	�,D3	�.D6�6Ec���[OO[Q2[O2oUO[
U2]2UOU]*[2UOU]*[2UOU]*[2UOU]*[2UOU]*[2UO[[OU]2UOUO[2UOUO[2UOUO [2UOUO"[2UOUO$[2UOUO&[2UOUO([2UOUO*[2UOUO,[2UOU]*UO2UOU]*UO2UOU]*UO 2UOU]*UO"2UOU]*UO$2[O2vq#qEoP!��getwindowsversion)r�r�
get_attributerrr�lenrir�r�r"�
IndexError�operator�getitem�major�minor�build�platform�service_pack�service_pack_minor�service_pack_major�
suite_mask�product_type)r&�v�maj�min�buildno�plat�csds&      r�test_getwindowsversion�$SysModuleTest.test_getwindowsversion�s������"�"�3�(;�<��!�!�#������Q���#����a��d�C�(����a��d�C�(����a��d�C�(����a��d�C�(����a��d�C�(����*�h�&6�&6��1�=����a�g�g�s�+����a�g�g�s�+����a�g�g�s�+����a�j�j�#�.����a�n�n�c�2����a�2�2�C�8����a�2�2�C�8����a�l�l�C�0����a�n�n�c�2�����1��q�w�w�'�����1��q�w�w�'�����1��q�w�w�'�����1��q�z�z�*�����1��q�~�~�.�(+�'<�'<�'>�$��'�rc�\�UO[[O[]2P!)�)r"r#r�call_tracing�typerHs&r�test_call_tracing�SysModuleTest.test_call_tracing�s�����)�S�%5�%5�t�Q�?r�setdlopenflagsztest needs sys.setdlopenflags()c��UO[Q2UO[[O]*2[O2oUO[[O
2[O
U]*2UO
[O2U]*2[O
U2P!)�getdlopenflags)�
assertHasAttrrr"r#r&r$r)r&�oldflagss& r�test_dlopenflags�SysModuleTest.test_dlopenflags�s���	
���3� 0�1����)�S�%7�%7��<��%�%�'�����)�S�%7�%7�8����8�A�:�&�����+�+�-�x��z�:����8�$rc��UO[[O2[OP2oPrUO[OP2U2>UO[OP2U2[
[Q2%c,UO[O2[2P!P!)N�gettotalrefcount)
r"r#r�getrefcountr�rr�rir,r�)r&�cs& r�
test_refcount�SysModuleTest.test_refcount�s���	
���)�S�_�_�5��O�O�D�!�����������.��2�
��������.��2��3�*�+�+��!�!�#�"6�"6�"8�#�>�,rc�.�UO[[O]*]*2UO[[OQ2UO[OO[O2OI2P!)ri�5w)
r"r#r�	_getframer9r�r��
test_getframe�__code__�f_coderHs&rr3�SysModuleTest.test_getframe�s_�����)�S�]�]�B��;����*�c�m�m�Z�@�����'�'�0�0��}�}��%�%�
&�	
rc�T�UO[[O22UOQ[O]22]o[OU2oU%c�SOUO
Q*[OU29%fQ2U]*
oUOo[OU2oUOV#2J�UO[OU22P![cJ5h9h)z
unittest.caserL�__main__)
rrLr�_getframemodulenamer2�	f_globals�f_backr9rjr�)r&�ird�f2s&   r�test_getframemodulename�%SysModuleTest.test_getframemodulename�s�������3�#:�#:�#<�=�����#�*A�*A�!�*D�E�
���M�M�!����������J�'��'�'��*�8�8�j�
�
��F�A����B�
��M�M�!�$��
�M�M�!� ����#�1�1�!�4�5���
��
�s�D�	D'�"D'�&D'c�^`````�]PHn]PHoRO2nRO2n,nU1QkoUUUU1QknROUQ5oUO	2RO2UO
[R2]2R]*o[O2oSFD+oUOU[2UOU]2J-	RO2oUOVu2UOVE2UOU2oUO!U[O"2I2UOU2oUO%U2o	['U	2FDvo
vq�q�U
Q6XfJL	UO)Q2UO
WQ2U	W
]**vq�q�UO
U
Q2UOUQQ	,2RO+2UO-2P!RO+2SO-2h9h)
rc�:�R2P!r7rK��g456s�r�f123�/SysModuleTest.test_current_frames.<locals>.f123������Frc�:�RORO22RO2RO2P!r7)�append�	get_ident�set�wait)�	entered_g�leave_g�thread_info�	threadings����rrC�/SysModuleTest.test_current_frames.<locals>.g456s,������y�2�2�4�5��M�M�O��L�L�Nr��targetrD�)didn't find f123() on thread's call stack�g456()rCzleave_g.wait()zentered_g.set())rO�	traceback�Event�Thread�startrKrr	r�_current_framesrir�r�rIr��popr�r2�
extract_stack�	enumerate�failrJ�join)r&rUrD�t�	thread_id�d�tid�main_id�frame�stackr<�filename�lineno�funcname�
sourcelinerLrCrMrNrOs&              @@@@@r�test_current_frames�!SysModuleTest.test_current_frames�s����	��
�O�O�%�	��/�/�#����	�	�	�

���D��)��	���	�����(	�
���S��-�q�1�#�A��I��#�#�%�A����%�%�c�3�/��"�"�3��*�� �)�)�+�G��M�M�'�%��M�M�)�'��E�E�'�N�E��O�O�E�S�]�]�_�4�5�
�E�E�)�$�E��+�+�E�2�E�?H��?O�;��;�H�h��v�%��@P��	�	�E�F����Z��2�6;�1�Q�3�Z�2�H�h����X�v�.��M�M�*�'7�9J�&K�L�
�K�K�M�
�F�F�H��
�K�K�M�
�F�F�H�s�3DH
�A!H
�
"H,c�v`````�]PHn]PHoRO2nRO2n,nU1QkoUUUU1QknROUQ5oUO	2RO[OQ5UO[R2]2R]*o[O2oSFD+oUOU[2UOU]2J-	RO2oUO!Vu2UO!VE2UOPUO#U22UO#U2oUO%UO&O(2o	[+U	2FDvo
vq�q�U
Q6XfJL	UO-Q2UOWQ2U	W
]**vq�q�UOU
Q2UO/UQ	2RO12UO32P!RO12SO32h9h)
rc�:�R2P!r7rKrBs�rrD�3SysModuleTest.test_current_exceptions.<locals>.f123BrFrc��:�RORO22[Q2g[c>RO2RO	[
OQ5%cP!JTh9h)T�oops��timeout)rHrIr9rJrKr�LONG_TIMEOUT)�g_raisedrMrNrOs����rrC�3SysModuleTest.test_current_exceptions.<locals>.g456Ese������y�2�2�4�5���$�V�,�,��!���L�L�N��|�|�G�,@�,@�|�A�A��B��s�/�	A7�6A7�6A7rQrqrDrSrTrC)zif leave_g.wait(zg_raised.set())rOrUrVrWrXrKrrsrr	r�_current_exceptionsrir�r�rIr�rZr[rk�tb_framer\r]r�rJr^)r&rUrDr_r`rarbrc�	exc_valuerer<rfrgrhrirCrtrMrNrOs&              @@@@@r�test_current_exceptions�%SysModuleTest.test_current_exceptions5s����	��
�?�?�$���/�/�#����	�	�	�
���D��)��	���	��
�
�g�2�2�
�3�"	����S��-�q�1�#�A��I��'�'�)�A����%�%�c�3�/��"�"�3��*�� �)�)�+�G��M�M�'�%��M�M�)�'����T�1�5�5��>�2�
���i�(�I��+�+�I�,C�,C�,L�,L�M�E�?H��?O�;��;�H�h��v�%��@P��	�	�E�F����Z��2�6;�1�Q�3�Z�2�H�h����X�v�.��!�!�*�.T�U�
�K�K�M�
�F�F�H��
�K�K�M�
�F�F�H�s�D
H�AH�"H8c	��UO[O[2UO[O[
2[OFDoUOU[2J	UO[O[
2[OFDoUOU[2J	UO[OQ2UO[O[2UO[O[2UO[O[2UO[O[2UO[O[2UO![#[O$2]2UO![O$O&]2UO![#[O(2]2UO+[O(O,]*]6H2UO+[O(O.]6�2UO1[O(O2Q2UO1[O(O4]d2UO7[O(O2[O(O42UO![9[O(O,2[2UO![9[O(O.2[2UO[O(O2[2UO[O(O4[2UO[O:[2UO![#[O<2]	2UO?[O<O@][O<OB*2[E]]d2FDoUO![GU[O<O@]*
[O<O@2]QOI[O<O@22J�	UO[O<OJ[2UO[O<OL[2UO[O<ON[2[PORQ2o[O<OTQ7CcUO[O<OV] ]@.2UO[O<OX.Q
l2U]6Xc,UO![O<OTQ2L�U]6Xc,UO![O<OTQ2LqU]6Xc,UO![O<OTQ2L?UO[O<OT.Ql2LUO!U]2UO1[O<OZ]2UO?[O<OZ]2UO[O\[2UO[O^[2UO![O^Q2UO[O`[2UO[Ob[2UO[Od[2UO[Of[2UO[Oh[2[OjoUOUQ*[2UO![#U2]2UOU]*[2UOU]*[2UOU]*[2UOU]*Q2UOU]*[2UOUOl[2UOUOn[2UOUOp[2UOUOrQ2UOUOt[2UO!U]*UOl2UO!U]*UOn2UO!U]*UOp2UO!U]*UOr2UO!U]*UOt2UO+UQ6�2UO[Ov[2UO[OvQ2[O`OyQ	2%f'UO[Oz[2P!UO}[[Q
22P!)�little��z'sys.hash_info.modulus {} is a non-prime�Py_HASH_ALGORITHM�fnv�	siphash13�	siphash24i��:NNN�win�abiflags)r|�big>rr�r�>� �@�)�alpha�beta�	candidate�final)r�rr)�short�legacy)@rir�api_versionr��argv�listr��	orig_argvr��	byteorder�builtin_module_names�tuple�	copyright�exec_prefix�base_exec_prefixr�rr	�
float_info�radix�int_infor��bits_per_digit�sizeof_digit�assertGreaterEqual�default_max_str_digits�str_digits_check_thresholdr�r!�
hexversion�	hash_info�
assertLess�modulus�width�range�pow�format�inf�nan�imag�	sysconfig�get_config_var�	algorithm�	hash_bits�	seed_bits�cutoff�maxsize�
maxunicoder�prefix�base_prefix�
platlibdir�version�version_infor
r�micro�releaselevel�serial�float_repr_style�
startswithr��assertFalser�)r&�arg�x�algo�vis&    r�test_attributes�SysModuleTest.test_attributesws������c�o�o�s�3����c�h�h��-��8�8�C��!�!�#�s�+�����c�m�m�T�2��=�=�C��!�!�#�s�+�!��
�
�c�m�m�%6�7����c�6�6��>����c�m�m�S�1����c�o�o�s�3����c�2�2�C�8����c�n�n�c�2�����S�^�^�,�b�1�������-�-�q�1�����S�\�\�*�A�.�������3�3�a�7�1�<�=�������1�1�Q�6�7������� C� C�S�I������� G� G��M����3�<�<�>�>��<�<�B�B�	D�����c�l�l�9�9�:�C�@�����c�l�l�7�7�8�#�>����c�l�l�A�A�3�G����c�l�l�E�E�s�K����c�n�n�c�2�����S�]�]�+�Q�/�����
�
�-�-�q�#�-�-�2E�2E�/E�F��q�#��A�����A�s�}�}�,�,�Q�.��
�
�0E�0E�F��9�@�@��M�M�)�)�+�
��	
���c�m�m�/�/��5����c�m�m�/�/��5����c�m�m�0�0�#�6��'�'�(;�<���=�=�"�"�&G�G��M�M�#�-�-�1�1�B��8�<��M�M�#�-�-�1�1�=�A��q�y�� � ����!8�!8�+�F����� � ����!8�!8�%�@����� � ����!8�!8�+�F��
�
�c�m�m�5�5�7X�Y�
���T�1�%�����
�
� 4� 4�a�8�����
�
�,�,�a�0����c�k�k�3�/����c�n�n�c�2��������2����c�l�l�C�0����c�j�j�#�.����c�o�o�s�3����c�n�n�c�2����c�k�k�3�/�
�
�
�����b��e�U�+�����R��!�$����b��e�S�)����b��e�S�)����b��e�S�)��
�
�b��e�D�E����b��e�S�)����b�h�h��,����b�h�h��,����b�h�h��,��
�
�b�o�o�'N�O����b�i�i��-�����A�����)�����A�����)�����A�����)�����A�����0�����A���	�	�*�����W��%����c�2�2�C�8��
�
�c�*�*�,?�@��|�|�&�&�u�-�-��!�!�#�,�,��4����W�S�*�5�6rc�$�[OoUO[U2]2UO	UO
Q2UO	UOQ2[OOQ2%cUOUO
Q2P![OQ6XcUOUO
Q2P![OQ6Xc!UO	UO
QQ.2P!P!)	��nt�pthread�
pthread-stubs�win32�
emscripten)r�r�r��solarisN)�pymutexN)�linux�android�freebsd�wasi)	rrNrr	r��name�lockrr�)r&�infos& r�test_thread_info�SysModuleTest.test_thread_info�s�����������T��A�&��
�
�d�i�i�!T�U��
�
�d�i�i�!2�3��<�<�"�"�#J�K�K����T�Y�Y�	�2�
�\�\�W�
$����T�Y�Y��-�
�\�\�\�
)��M�M�$�)�)�i��%A�B�*rc��[Oo.QloUO[[	U22U2[O
Q6�c]@L] oUOUOU2UOUO[[OQ222UOUO[[OQ222UOUO[O2P!)�pointer_bits�Py_GIL_DISABLED�Py_DEBUG>�debugr�r��
free_threadedl)
r�abi_inforrJ�varsr�r�r��boolr�r�r�r�)r&r��	info_keysr�s&   r�
test_abi_info�SysModuleTest.test_abi_info�s����|�|��K�	�����T�$�Z��)�4� �[�[�5�0�r�b������*�*�L�9�����+�+��i�6�6�7H�I�J�	L��������i�6�6�z�B�C�	E����������7rzonly available on Emscriptenc���UO[[O2]2UO	[OO
[2UO	[OO[[P212UO	[OO[2UO	[OO[2P!)�)
rr	r�_emscripten_infori�emscripten_versionr��runtimer�r!�pthreadsr��
shared_memoryrHs&r�test_emscripten_info�"SysModuleTest.test_emscripten_info�s�������S�1�1�2�A�6����c�2�2�E�E�u�M����c�2�2�:�:�S�$�t�*�<M�N����c�2�2�;�;�T�B����c�2�2�@�@�$�Grc��UO[OO[OO2P!r7)rr�
__stdout__�encoding�
__stderr__rHs&r�
test_43581�SysModuleTest.test_43581�s(��	
������0�0�#�.�.�2I�2I�Jrc���[OOP	Q59%f[[Q2oUO[[O2UO[[OQ2U%cJUO[[O2UO[[OQ2Q[[O]Q22*oUO[OU2UI2U%c'UO[OU2P	2UO2O2oU%c'UO[OU2P
2UO[OU2UI2U%c'UO[OU2P
2QQ[2oUO[[OUQ22U%c/UO[OUQ22P
2P!P!)	T��cpython�_is_internedsabc�never interned beforec�(`�\sQsQsnQsQsUsP!)�$SysModuleTest.test_intern.<locals>.S�c��]{!)r�rKrHs&r�__hash__�-SysModuleTest.test_intern.<locals>.S.__hash__���rrK)rLrMrNrOr�rPrQrRs@r�Sr������
�
rr��abc�ʚ;)r�r�check_impl_detailr�rr"r#�internr�r��random�	randranger�rj�swapcase)r&�has_is_interned�s�s2r�s&    r�test_intern�SysModuleTest.test_intern�s����<�<�9�9�$�9�G�;�;�%�c�>�:�	����)�S�Z�Z�0����)�S�Z�Z��8�����i��)9�)9�:����i��)9�)9�6�B�#�c�&�*:�*:�1�e�*D�&E�E������
�
�1�
��*�+���M�M�#�*�*�1�-�t�4�
�Z�Z�\�
"�
"�
$����M�M�#�*�*�2�.��6�����
�
�2��!�+�,���M�M�#�*�*�2�.��6�	��	�	
���)�S�Z�Z��5��:���M�M�#�*�*�1�U�8�4�e�<�rc��Q[[O]Q22*o[OU2oUOV!2[O2oUO[OQUO28Q[U2Q[U2Q[U2Q[U2Q022P!)r�zn
            import sys

            # set `s`, avoid parser interning & constant folding
            s = str(zG, 'utf-8')

            t = sys.intern(s)

            assert id(t) != �
, (id(t), z)
            assert id(t) != z)
            r)
r�rrrrrjr
�create�exec�textwrap�dedent�encode�id�r&rr_�interps&   r�+test_subinterp_intern_dynamically_allocated�9SysModuleTest.test_subinterp_intern_dynamically_allocateds���

$�c�&�*:�*:�1�e�*D�&E�E���J�J�q�M���
�
�a���$�$�&�����H�O�O�)��X�X�Z�N�#� ��U�G�:�b��e�W�5���U�G�:�b��e�W�5
�
%�
�
	rc��QFD�oUOUQ59^tt^2[OU2o[O2oUO[OQUO28Q[U2Q[U2Q022PPP2J�	P!)%fhJ�9h)�__init__�r��
                    import sys

                    # set `s`, avoid parser interning & constant folding
                    s = str(zV, 'utf-8')

                    t = sys.intern(s)
                    assert id(t) == rz)
                    )r�	CANCELLEDz<module>�utf-8z{{��
rr���¸�ÿ)
r�rrr
r
rrrrrrs&   r�*test_subinterp_intern_statically_allocated�8SysModuleTest.test_subinterp_intern_statically_allocated3s����A������"�"��J�J�q�M��%�,�,�.�����H�O�O�1��X�X�Z�N�+%�&(��U�G�:�b��e�W�=�-���	#�"��#�"�"�s�A<B,	�,B=
�5B=
c��QFD�oUOUQ59^tt^2[O2oUO[O
QUO
28Q[U2Q022UO[OU22PPP2J�	P!)%fhJ�9h)rrrz0, 'utf-8')

                    assert id(s) == z;
                    t = sys.intern(s)
                    )rrrr�rr r!)r�r
r
rrrrrr�rr�)r&rrs&  r�test_subinterp_intern_singleton�-SysModuleTest.test_subinterp_intern_singletonKs���
A�A������"�"�%�,�,�.�����H�O�O�1��X�X�Z�N�+%�%'��U�G�,�
-������� 0� 0�� 3�4�#�"�A�"�"�"�s�A?B/	�/C
�8C
c���UO[O2Qo[U2FD�vq#UO	[OU2UQ7c[
L[oUO[[[OU22VC2[[OU2oUO[OU*UQUQUQ0Q5J�	UO[[O22UO[[O2]QQ5UO[OO.Ql2P!)	r�zsys.flags .z vs [�])r�zDo not increase, see GH-122575)r��inspect�interactive�optimize�dont_write_bytecode�no_user_site�no_site�ignore_environment�verbose�
bytes_warning�quiet�hash_randomization�isolated�dev_mode�	utf8_mode�warn_default_encoding�	safe_path�int_max_str_digits)r5r8>rr�r)r�r�flagsr\r'r�r�rr!�getattr�reprr	r�r6)r&�indexable_attrs�attr_idx�attr�	attr_type�
attr_values&     r�#test_sys_flags_indexable_attributes�1SysModuleTest.test_sys_flags_indexable_attributes^s�������	�	�"�M��(��8�N�H����s�y�y�$�/� $�(A� A��s�I����T�'�#�)�)�T�":�;�Y�M� ����D�1�J����S�Y�Y�x�0�*�#.�t�f�E�(��1�!E�
�
G�9�	
����S�Y�Y��(�����S�Y�Y���1Q��R��
�
�c�i�i�)�)�9�5rc��UO[OO[[P2*2UO[OO[[P2*2UO[OO[[P2*2UO[OO[[P2*2P!r7)	rirr:�gilr�r!�thread_inherit_context�context_aware_warnings�lazy_importsrHs&r�#test_sys_flags_name_only_attributes�1SysModuleTest.test_sys_flags_name_only_attributests������c�i�i�m�m�S��d��^�<����c�i�i�>�>��D��J��O����c�i�i�>�>��D��J��O����c�i�i�4�4�c�$�t�*�n�Erc�J�[OU[U2U2P!r7)r�check_disallow_instantiationr!)r&�sys_attrs&&r�assert_raise_on_new_sys_type�*SysModuleTest.assert_raise_on_new_sys_type{s��	�,�,�T�4��>�8�Lrc�F�UO[O2P!r7)rNrr:rHs&r�test_sys_flags_no_instantiation�-SysModuleTest.test_sys_flags_no_instantiation�s���)�)�#�)�)�4rc�F�UO[O2P!r7)rNrr�rHs&r�&test_sys_version_info_no_instantiation�4SysModuleTest.test_sys_version_info_no_instantiation�s���)�)�#�*:�*:�;rc��[OO[Q2UO	[O
22P!r)r�rrrrNrrHs&r�+test_sys_getwindowsversion_no_instantiation�9SysModuleTest.test_sys_getwindowsversion_no_instantiation�s.�����"�"�3�(;�<��)�)�#�*?�*?�*A�Brc��UO[Q29^tt^2[O2PPP2P!)%fhP!9h)z*sys\._clear_type_cache\(\) is deprecated.*)�assertWarnsRegex�DeprecationWarningr�_clear_type_cacherHs&r�test_clear_type_cache�#SysModuleTest.test_clear_type_cache�sB��
�
"�
"�#5�#P�R�R��!�!�#�R�R�R�R�s�A�A	�	A	c��[[O2oQUQ$[O[
OQQ,[OUQ5oUO2]*O2oQ[O*OQ2oUOV42QUQ$[O[
OQQ,[OUQ5oUO2]*O2oUOUQ2QUQ$[O[
OQQ,[O[OUQ	5oUO2vq5UOUQ
2UOQU2UOQU2Q
UQ$[O[
OQQ,[O[OUQ	5oUO2vq5UOUQ
2UOQU2UOQU2QUQ$[O[
OQQ,[OUQ5oUO2]*O2oUOUQ2P!)�cp424r�r�zprint(chr(0xa2))�r$�env�¢z
ascii:replace�?�ascii�r$r�rbrsUnicodeEncodeError:s'\xa2'zascii:z:surrogateescapezprint(chr(0xdcbd))��)�dict�os�environr��Popenrr��PIPE�communicate�strip�lineseprrr�)r&rb�pr(r�r�s&     r�test_ioencoding�SysModuleTest.test_ioencoding�s(���2�:�:���
#*�������c�n�n�d�4F�G�&0�o�o�3�
@���m�m�o�a� �&�&�(���R�Z�Z�'�/�/��8������'�"1�������c�n�n�d�4F�G�&0�o�o�3�
@���m�m�o�a� �&�&�(������d�#�")�������c�n�n�d�4F�G�$.�O�O�J�O�O�!$�
&���=�=�?�������c�"��
�
�,�c�2��
�
�j�#�&�"*�������c�n�n�d�4F�G�$.�O�O�J�O�O�!$�
&���=�=�?�������c�"��
�
�,�c�2��
�
�j�#�&�"4�������c�n�n�d�4H�I�$.�O�O��
>���m�m�o�a� �&�&�(������g�&rz*requires OS support of non-ASCII encodingsz$requires FS encoding to match localec��[[O2oPUQ$[O[
OQQ[O*,[OUQ5oUO2]*O2oUOU[O[O22P!)rr�r�z	print(%a)ra)rhrirjr�rkrr�r�FS_NONASCIIrlrmrnr�fsencode)r&rbrpr(s&   r�test_ioencoding_nonascii�&SysModuleTest.test_ioencoding_nonascii�s����2�:�:���"$�������c�n�n�d� +�i�.C�.C� C�E�'1���C�
A���m�m�o�a� �&�&�(������b�k�k�)�*?�*?�@�ArzTest is not venv-compatiblec
��UO[OO[O
2[O
2[OO
[OO[O
22o[O,QN[O
[OUQ5oUO2]*oUO2OQ2oUO2UOUQ[![O
O#QQ22,2P!)�nonexistent)r�r$�cwd�ASCIIzb''re�backslashreplace)ryr�zEimport sys; print(sys.executable.encode("ascii", "backslashreplace")))rri�path�abspathrr��dirname�realpathr�rkrlrmrn�decoderKr�r<r)r&�
python_dirrpr$r�s&    r�test_executable�SysModuleTest.test_executable�s���
	
�����������8�#�.�.�I��W�W�_�_�R�W�W�%5�%5�c�n�n�%E�F�
����
V��~�~�j�o�o�:�
O�������#���\�\�^�*�*�7�3�
�	�����
�
�j�5�$�s�~�~�/D�/D�W�N`�/a�*b�"c�drc��UOU2[OU2U%cUOV2P!P!r7)�assertIsNotNone�codecs�lookupr�r&�fs_encodingr�s&&&r�check_fsencoding�SysModuleTest.check_fsencoding�s2�����[�)��
�
�k�"�����[�3�rc��[O2o[OQ6XcQoLPoUOV2P!)�darwinr)r�getfilesystemencodingrr�r�s&  r�test_getfilesystemencoding�(SysModuleTest.test_getfilesystemencoding�s4���/�/�1���<�<�8�#��H��H����k�4rc��[OO2oVQ$QUQ$QOQ
2o[O
QQQU,oU%cUO
Q2UdV4Q$LUOQP2[OU[O[OUP	Q	5oUO2vq�U!)�LC_ALL�0�PYTHONCOERCECLOCALEr�-Xzutf8=0r��-Ir�)r$r�rb�universal_newlines)�
import syszdef dump(name):z    std = getattr(sys, name)z(    print("%s: %s" % (name, std.errors))z
dump("stdin")zdump("stdout")zdump("stderr"))
rirj�copyr^rr�rHrZr�rkrl�STDOUTrm)
r&�localer4r�rbr2�argsrpr$r�s
&&&&      r�c_locale_get_error_handler�(SysModuleTest.c_locale_get_error_handler�s����j�j�o�o����H�
�%(��!�"��y�y�
�������h��d�;����K�K�����&.�"�#��G�G�&��-����T�%/�_�_�%/�%6�%6�"%�15�	
7��
�������
rc���UOUP	Q5oUOUQ2UOUQQ5oUOUQ2UOUQQ5oUOUQ2UOUQQ5oUOUQ2UOUQ	Q5oUOUQ2UOUPQ5oUOUQ2P!)
T)r4zHstdin: surrogateescape
stdout: surrogateescape
stderr: backslashreplace
z:ignore�r�z6stdin: ignore
stdout: ignore
stderr: backslashreplace
z	iso8859-1z6stdin: strict
stdout: strict
stderr: backslashreplace
z
iso8859-1:�:)r�r)r&r�r(s&& r�check_locale_surrogateescape�*SysModuleTest.check_locale_surrogateescapes���-�-�f�t�-�D������6�	7��-�-�f�y�-�I������6�	7��-�-�f�{�-�K������6�	7��-�-�f�|�-�L������6�	7��-�-�f�s�-�C������6�	7��-�-�f�r�-�B������6�	7rc�*�UOQ2P!)�C�r�rHs&r�test_c_locale_surrogateescape�+SysModuleTest.test_c_locale_surrogateescape5s���)�)�#�.rc�*�UOQ2P!)�POSIXr�rHs&r�!test_posix_locale_surrogateescape�/SysModuleTest.test_posix_locale_surrogateescape9s���)�)�'�2rc�L�Q]
Q]Q]Q]-oUO[OQ2UO[OQ2UO[OQ2UO[OQ2UO[OQ2[OOoUO	UQ	*UO
UO12UO
]*UO]**UO]**VO*]**UO]**oUO	[OOU2UO	[OO[OOO22[OOoUOU[2[ O"O%P	Q
5%cg[ O"O&%f![ O"O(%cUO+U2P!UO-U2P!P!)r�r�r�r�r�r�r��	cache_tag�supports_isolated_interpreters:NrNr�)r'r�implementationr�rr
rr�r�r�r�r��lowerr�rir�r�rr�
is_emscripten�is_wasir�r�)r&�levelsr�r��siis&    r�test_implementation�!SysModuleTest.test_implementation=s����3���[�#�w��L�����3�-�-�v�6����3�-�-�y�9����3�-�-�|�<����3�-�-�{�;����3�-�-�/O�P��$�$�,�,��������w�}�}�g�m�m�&D�E��m�m�r�)�G�M�M�R�,?�?��m�m�q�(�)�+1�2F�2F�+G�1�+L�M��n�n��)�*�
�	
����+�+�6�6�
�C�	
����+�+�0�0��+�+�0�0�6�6�8�	:�� � �?�?�����c�4�(��<�<�)�)�$�)�7�7��|�|�)�)�)�T�\�\�-A�-A�-A�� � ��%�����$�	8rc�(�]QHGoQQ,oUUvq4o[OQ6wcC[O
Q2oUO
QU2U%cUO
QU2UO[[OP	2P!)r)rr�z#import sys; sys._debugmallocstats()r��
WITH_PYMALLOCsfree PyDictObjectssSmall block threshold)
�test.support.script_helperrrrr�r�r�r"r#�_debugmallocstats)r&rr��retr(r��
with_pymallocs&      r�test_debugmallocstats�#SysModuleTest.test_debugmallocstats]sz��	@��;�<��(�$�/�
��#��<�<�7�"�%�4�4�_�E�M��M�M�/��5���
�
�6��<�	
���)�S�%:�%:�D�Ar�getallocatedblocksz0sys.getallocatedblocks unavailable on this buildc�J�]PHoUO2oUQ7o[O2oUO[U2[2U%cUOU]2LUOU]2[O2[O2oUOVe2[O P	Q5oUO#VW*
[O$22[O2[O2oUO)U[+U]2*
U]2*22P![coP	oPo=CKHPo=hh9h[c[O
2oCKsh9h[&cK�h9h)r)�_only_immortal)�pymalloc�pymalloc_debug)�_testinternalcapi�pymem_getallocatorsnamer%�ImportErrorrr�rr�rjr!r�r�r��gc�collect�assertLessEqual�getunicodeinternedsizer�r,�AttributeErrorr�r�)	r&r��
alloc_namer�r|r��b�interned_immortalr.s	&        r�test_getallocatedblocks�%SysModuleTest.test_getallocatedblocksosH��	O�$�
O�.�F�F�H�
�
",�/M�!M�
�
�"�"�$���
�
�d�1�g�s�#�����q�!�$�

�#�#�A�q�)�
�
�
���"�"�$�����Q�"�		�
!$� :� :�$� O���O�O�A�1�3�3G�3G�3I�J�	�
�
���"�"�$���
�
�a��q�2�v�q�2�v�.�/��? �
%� $�
��
%���	4�#�1�1�3�M�	4��>�	��	�sM�E-�E�:AF�	E*�E*�E%�%E*�-	F�7F�F�	F"�F"�!F"c���[O%c5UO[[O
22[2P!UO[O
22P!r7)rr�rjr!r�_is_gil_enabledr�r�rHs&r�test_is_gil_enabled�!SysModuleTest.test_is_gil_enabled�s?���"�"�"��M�M�$�s�2�2�4�5�t�<��O�O�C�/�/�1�2rc��UO[O2P
2Qo[QU2vq#oUO	UO2Q2P!)Fa�if 1:
            import sys

            class AtExit:
                is_finalizing = sys.is_finalizing
                print = print

                def __del__(self):
                    self.print(self.is_finalizing(), flush=True)

            # Keep a reference in the __main__ module namespace, so the
            # AtExit destructor will be called at Python exit
            ref = AtExit()
        r�sTrue)rjr�
is_finalizingrr�rstrip�r&r2r�r$r�s&    r�test_is_finalizing� SysModuleTest.test_is_finalizing�sI���
�
�c�'�'�)�5�1�
��.�d�D�9���F��������'�2rc��Qo[QU2vq#oUO2oUOQU]*2UOQU]*2P!)z�if 1:
            import sys
            class A:
                def __del__(self, sys=sys):
                    print(sys.flags)
                    print(sys.float_info)
            a = A()
            r�s	sys.flagsssys.float_info)r�
splitlinesr��r&r2r�r(r�s&    r�test_issue20602�SysModuleTest.test_issue20602�sL����(��d�3�����n�n����
�
�l�C��F�+��
�
�'��Q��0rc���Qo[QU2vq#oUOU]2UOUO2Q2UOUO2Q2P!)z�if 1:
            import struct, sys

            class C:
                def __init__(self):
                    self.pack = struct.pack
                def __del__(self):
                    self.pack('I', -42)

            sys.x = C()
            r�r)rrr�r�s&    r�&test_sys_ignores_cleaning_up_user_data�4SysModuleTest.test_sys_ignores_cleaning_up_user_data�sX��
��.�d�D�9���F�����Q���������#�.��������#�.rr�zAndroid onlyc��[O2oUOU[2UO	U]2P!�r)r�getandroidapilevelrir�r�)r&�levels& r�test_getandroidapilevel�%SysModuleTest.test_getandroidapilevel�s0���&�&�(�����e�S�)����5�!�$rc�h``�QnUU1Qko,QNoU]
U2U]U2U]UQ*UQ**2U]UQ*UQ**2U]UP*,2UPUP*,2U]Q*U2UPQ*UP*,2UPU2P!)z�if 1:
            import sys
            def f1():
                1 / 0
            def f2():
                f1()
            sys.tracebacklimit = %r
            f2()
        c��:�[O[OQRU*,[OQ5oUO2]*oRO
UO2U2P!)r�)r�)r�rkrr�rlrmrr�)�tracebacklimitr�rpr(r2r&s&&  ��r�check�4SysModuleTest.test_sys_tracebacklimit.<locals>.check�sS���� � �#�.�.�$��~�8M�!N�(2���9�A��-�-�/�!�$�C����S�^�^�-�x�8r:Nr�N:r�NN:�NNr�)s"Traceback (most recent call last):s&  File "<string>", line 8, in <module>s    f2()�    ~~^^s   File "<string>", line 6, in f2s    f1()r�s   File "<string>", line 4, in f1s	    1 / 0s	    ~~^~~s#ZeroDivisionError: division by zerorK)r&r�rUr2sf  @r�test_sys_tracebacklimit�%SysModuleTest.test_sys_tracebacklimit�s������	9�
�	�	�b�)��
�a���
�a��2���2��.�/�
�a��2���2��.�/�
�a�)�B�-��!�
�b�9�R�=�/�"�
�a��g�y�!�
�b�$�h��2���(�
�d�I�rc��UO[[O2[[	[O222P!r7)rr	r�	meta_pathrJrHs&r�test_no_duplicates_in_meta_path�-SysModuleTest.test_no_duplicates_in_meta_paths)������S�]�]�+�S��S�]�]�1C�-D�Er�_enablelegacywindowsfsencodingz*needs sys._enablelegacywindowsfsencoding()c��Qo[QQOU22vq#oUOQQ2O2oUO	UQ2P!)r�r�z; re�replacezmbcs replace)r�z$sys._enablelegacywindowsfsencoding()zCprint(sys.getfilesystemencoding(), sys.getfilesystemencodeerrors()))rr^r�r�rr�s&    r�#test__enablelegacywindowsfsencoding�1SysModuleTest.test__enablelegacywindowsfsencodingsM��W��(��d�i�i��o�>�����j�j��)�,�3�3�5������n�-rc�8�[OQ2o[OQQQQUQ,o[O
UP	P	P	Q5o[
QQ,2[
U2,oUOUOO2O2UU2P!)z]
            import sys
            print(sys.argv)
            print(sys.orig_argv)
        r�r��utf8r�r�)r��capture_outputr�)rrrr�r�r�r<rr$r�r�)r&r2r�r�r�s&    r�test_orig_argv�SysModuleTest.test_orig_argvs������ �
��
����d�F�D�$��F���~�~�d�$�t�$�O���$������J�
��	
������+�+�-�8�8�:�H��	rc��UO[O[2[OFDoUOU[2J	P!r7)rir�stdlib_module_names�	frozensetr�)r&r�s& r�test_module_names�SysModuleTest.test_module_names!s8�����c�5�5�y�A��+�+�D��!�!�$��,�,r�_stdlib_dirzneed sys._stdlib_dirc��[OQ2o[UQP2oU%c$UOO	U2%fPoU%cUOOU2LPoUO
UOO[O2UOOU22P!)ri�__file__)
r
�import_fresh_moduler;r}�existsrr�normpathrr)r&ri�markerr�s&   r�test_stdlib_dir�SysModuleTest.test_stdlib_dir&s���
�
.�
.�t�
4����Z��.���"�'�'�.�.��0�0��F�.4�2�7�7�?�?�6�*�$��������)�)�#�/�/�:����)�)�(�3�	5r�
getobjectszneed sys.getobjects()c���[O]2oUOU[2UO	[U2]2QQ2o]do[
U2Tt,tFD	pB2MJ	oo[O]U2oUO[U2U2SFDoUOVr2J	[O]U2oUO[U2]2P!ttoh)rc��\sQsQsQsP!)�-SysModuleTest.test_getobjects.<locals>.MyTypei8rK�rLrMrNrOrPrKrr�MyTyper8���rr)rrrir�r�r	r�r)r&�all_objectsr�sizer�
my_objects�get_objectsr:s&       r�test_getobjects�SysModuleTest.test_getobjects0s����n�n�Q�'�����k�4�0����3�{�+�Q�/�	�	���(-�d��4��1�f�h��
�4��n�n�Q��/������[�)�4�0��C��!�!�#�.���n�n�Q��/������[�)�1�-��5s�!C5�	_stats_onzneed Py_STATS buildc��[O2[O2[O2[O2P!r7)rr�
_stats_off�_stats_clear�_stats_dumprHs&r�test_pystats�SysModuleTest.test_pystatsEs-��	�
�
�������������rr�zneed sys.abiflagsc�j�UOQ[O7[O2P!)r_)rrr�rr�rHs&r�test_disable_gil_abi�"SysModuleTest.test_disable_gil_abiNs#��	
�������,�g�.E�.E�Frc��[O2oUOU[2UO	U]2UO[OU2[O]2UO[O2]2[OQ2UO[O2Q2UO[29^tt^2[O]2PPP2UO[29^tt^2[OQ2PPP2UO[29^tt^2[OQ2PPP2P!)%fhK�9h)%fhKa9h)%fhP!9h)rig�@���)r�get_int_max_str_digitsrir�r��
addCleanup�set_int_max_str_digitsrr"r9r#r�s& r�test_int_max_str_digits�%SysModuleTest.test_int_max_str_digitsSs���.�.�0�	����i��-����	�1�-�����2�2�I�>��"�"�1�%�����3�3�5�q�9��"�"�5�)�����3�3�5�u�=�
�
�
�z�
*�
*��&�&�q�)�+��
�
�z�
*�
*��&�&�r�*�+�
�
�
�y�
)�
)��&�&�w�/�*�
)�+�
*��+�
*��
)�
)�
)�s6�2F�.F�*F1�F	�F	�F.	�'F.	�1G	�:G	rKr7)FN)ZrLrMrNrOr�r�r�requires_subprocessr�r�r�r�r�r�r��cpython_onlyrrr"r�
skipUnlessr�rr)�
refcount_testr/r3r>r	�reap_threads�requires_working_threadingrjryr�r�r�r�r�r�r	rrr"r%rBrIrNrQrTrWr]rrqrrtr�r��getpreferredencodingrvrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�rrrrr"r%r,rPrQrRs@rr�r��s����%�M2�^
� � �"�G�#�G�(=�
(�@�	-�-�2
�\�\���-��-�.?�<@������&6�7�:�<�%�<�%�
�\�\���?� �?�*
�6�(
����"�"��0�0�2�?�3�#��?�B�"�"��0�0�2�>�3�#�>�@_7�B
C�
8�����.�.�0N�O�H�P�H�K�
=�@
��������(
��������,
����5���5�"6�,F�M�
5�<�C�

�\�\���$��$�
�� � �"�)'�#��)'�V����.�.�E�G�
����2�2�4��8S�8S�TY�8Z�Z�?�A�� � �"�B�#�A�G�
B��_�_�S�_�_��
�
�2�2�4�� � �"�e�#�4�e�(4�5��:$7�L
� � �"�/�#�/�
� � �"�3�#�3�%�@
�\�\���B��B�"�����&:�;�K�M�'0�M�'0�R3�3�*
1�/�"�������2�N�C�%�D�%�
�� � �"�%�#��%�NF������&F�G�E�G�.�G�.�
� � �"�
�#�
�-�
�����m�4�6L�M�5�N�5������l�3�5L�M�.�N�.�(�����k�2�4I�J��K��
�\�\���
�����j�1�3F�G�G�H��G�0�0rr�c�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�UnraisableHookTestihc	�D�[OQ2o]QH
GoGo[
o[O[Q[O29^tt^2[O29^tt^2oU[]*2U2PPP2WO2O2oUOU]*QU802UOU]*Q2UOUP*Q2[O29^tt^2oU[]*2P2PPP2UO2O2oUOU]*Q2UOUP*Q2[O29^tt^2oU[]*2QU2PPP2UO2O2oUOU]*QU8Q02UOU]*Q2UOUP*Q2[O29^tt^2oU[]*2P2PPP2UO2O2oUOU]*Q2UOUP*Q2PPP2P!)%fhCK?9h)%fhCK�9h)%fhCK99h)%fhK�9h)%fhP!9h)	�	_testcapi��err_writeunraisable�err_formatunraisable�unraisablehookzException ignored in: z"Traceback (most recent call last):zValueError: 42zError in %Rz	Error in r�)r
�
import_moduler8r:r;�hexrr>r�__unraisablehook__r�r9rr�r)r&r8r:r;r:r��liness&      r�test_original_unraisablehook�/UnraisableHookTest.test_original_unraisablehookksG��!�/�/��<�	�G���
�
�
�s�$4�$'�$:�$:�<�<��(�(�*�*�f�#�J�r�N�C�8�+��O�O�%�0�0�2�E����U�1�X�)?��w�'G�H����U�1�X�'K�L����U�2�Y�(8�9��(�(�*�*�f�#�J�r�N�D�9�+��O�O�%�0�0�2�E����U�1�X�'K�L����U�2�Y�(8�9��(�(�*�*�f�$�Z��^�]�C�H�+��O�O�%�0�0�2�E����U�1�X��3�'��';�<����U�1�X�'K�L����U�2�Y�(8�9��(�(�*�*�f�$�Z��^�T�:�+��O�O�%�0�0�2�E����U�1�X�'K�L����U�2�Y�(8�9�5<�<�*�*�*��+�*�*��+�*�*��+�*��-<�<�<�s��L�6J?	�	BL�K	�.A5L�#K'	�7BL�
K;	�AL�?K
�K
�
	L�K$
�K$
�	L�'K8
�0K8
�2	L�;L
�L
�L�L	�L	c
�`�QQ2oQQ[2nU1QkQ2oV1FCDmoUOU29^tt^2U2o[OO	29^tt^2o[OO[Q[O29^tt^2=PPP2PPP2WO2oUOQU2UOUOOU2UOQU2UOQ	U2V2Ic&UOQU2UOQ
U2L$UOQU2UOQU2UOUQ
2PPP2CJp	P!)%fhK�9h)%fhK�9h)%fhCJ�9h)c�(`�\sQsQsnQsQsUsP!)�FUnraisableHookTest.test_original_unraisablehook_err.<locals>.BrokenDeli�c��[Q2oUg)�
del is brokenr8�r&r|s& r�__del__�NUnraisableHookTest.test_original_unraisablehook_err.<locals>.BrokenDel.__del__�s�� ��1���	rrK�rLrMrNrOrIrPrQrRs@r�	BrokenDelrE�s����
�
rrLc�(`�\sQsQsnQsQsUsP!)�OUnraisableHookTest.test_original_unraisablehook_err.<locals>.BrokenStrExceptioni�c��[Q2g)zstr() is broken�rhrHs&r�__str__�WUnraisableHookTest.test_original_unraisablehook_err.<locals>.BrokenStrException.__str__�s��� 1�2�2rrK)rLrMrNrOrQrPrQrRs@r�BrokenStrExceptionrN�s����
3�
3rrSc�0:`�\sQsQsnU1QksQsUsP!)�OUnraisableHookTest.test_original_unraisablehook_err.<locals>.BrokenExceptionDeli�c�:�R2oUgr7rK)r&r|rSs& �rrI�WUnraisableHookTest.test_original_unraisablehook_err.<locals>.BrokenExceptionDel.__del__�s���(�*���	rrKrK)rSrSs@�r�BrokenExceptionDelrU�s����
�
rrXr<zException ignoredztest_sys.pyz	raise excz<exception str() failed>r9rGr)
rhr�r�rr�r>rr?rr�rIrNr�)r&rLrX�
test_classr:r��reportrSs&      @r� test_original_unraisablehook_err�3UnraisableHookTest.test_original_unraisablehook_err�sa���	�	�	3��	3�	�	�%�9�J����j�)�)� �l���\�\�1�1�3�3�v��\�\�+�+�C�1A�,/�,B�,B�D�D��D�4� ���*���
�
�1�6�:��
�
�j�0�0�=�=�v�F��
�
�m�V�4��
�
�k�6�2��3��M�M�"6��?��M�M�"<�f�E��M�M�,��7��M�M�/�6�:��#�#�F�D�1�'*�)�:�D�D��4�3��*�)�)�sV�
.G	�8<F4
�4F!�6F4
�>A8G	�7AG	�!F1�*F1�,F4
�4G�=G�?G	�G
�G
c
�x�[OQ2o]QH
GoQQ2oQFCDOoUO	UQ59^tt^2VCO
Om[OO29^tt^2o[OO[Q[O29^tt^2UUO
O
2Q2PPP2PPP2WO2oUOUO
OO U2UQ	7cUO#UQ*U2LUOUQ*U2PPP2CJR	P!)%fhK�9h)%fhK�9h)%fhCJ�9h)
r8�r:c�,�\sQsQsQQ2sQsP!)�MUnraisableHookTest.test_original_unraisablehook_exception_qualname.<locals>.Ai�c�.�\sQsQsQQ\2sQsP!)�OUnraisableHookTest.test_original_unraisablehook_exception_qualname.<locals>.A.Bi�c��\sQsQsQsP!)�QUnraisableHookTest.test_original_unraisablehook_exception_qualname.<locals>.A.B.Xi�rKrrKrrrTrd�s��rrTrK)rLrMrNrOrhrTrPrKrr�Brb�s���	��rrerK)rLrMrNrOrerPrKrr�Ar`�s��
�
rrf)�
moduleNamer<r:�.)r r8�some_module)r r8)r
r=r8r:r�rerTrMr�rr�r>rr?rr�rN�assertNotIn)r&r8r:rfrgr�rZs&      r�/test_original_unraisablehook_exception_qualname�BUnraisableHookTest.test_original_unraisablehook_exception_qualname�s+��
"�/�/��<�	�1�	�	�
@�J������4�4�#-����� ��\�\�1�1�3�3�v�t�|�|�?U�?U��)�3�+A�+A�@�@�(��������7�@�3� ���*���
�
�a�c�c�e�e�0�0�&�9��!9�9��$�$�Z�#�%5�v�>��M�M�*�s�"2�F�;�5�4�@�@�@��3�3��5�4�4�sV�	AF'	�
<F
�"F�(F
�0AF'	�?3F'	�F�
F�F
�F$�F$�F'	�'F9
�0F9
c	�l�[]*2o[OO[Q[O
29^tt^2UO
[29^tt^2[OU2PPP2PPP2P!)%fhK9h)%fhP!9h)rr<)	r9r�rr>rr?r"r#r<rHs& r�'test_original_unraisablehook_wrong_type�:UnraisableHookTest.test_original_unraisablehook_wrong_type�su����n��
�\�\�
#�
#�C�)9�$'�$:�$:�<�<��"�"�9�-�-��"�"�3�'�.�<�<�-�-��<�<�<�s0�B"�&B	�=B"�B
�B
�B"�"B3	�+B3	c��`�[OQ2o]QH
GoGoPnU1Qko[
o[OO[QU29^tt^2[]*2oUVe2UORO[U22UOROU2UOROUO 2UO#RO$2UO'RO(U2UUQU2UORO[U22UOROU2UOROUO 2UO'RO$QU802UO#RO(2PPP2PoPnP!)%fhK9hPoPnh9h)r8r9c�:�UnP!r7rK)r��	hook_argss&�r�	hook_func�@UnraisableHookTest.test_custom_unraisablehook.<locals>.hook_func�s����Irr<zcustom hook %Rzcustom hook )r
r=r8r:r;r>r�rr>rr9rj�exc_typer!rx�
exc_tracebackrkr��err_msgr�object)	r&r8r:r;rsr:r|r�rrs	&       @r�test_custom_unraisablehook�-UnraisableHookTest.test_custom_unraisablehook�st���!�/�/��<�	�G��	�	���	����'�'��-=�y�I�I� ��n��#�C�-��
�
�i�0�0�$�s�)�<��
�
�i�1�1�3�7��
�
�i�5�5�s�7H�7H�I��!�!�)�"3�"3�4�� � ��!1�!1�3�7�$�S�*:�C�@��
�
�i�0�0�$�s�)�<��
�
�i�1�1�3�7��
�
�i�5�5�s�7H�7H�I�� � ��!2�!2�l�3�'�4J�K��!�!�)�"2�"2�3�J�"�H��I�%J�I��"�H��I�s*�-G�EG	�;G�	G	�G	�G�G"c	��[OQ2o]QH
GoQo[O
O
Q29^tt^2o[O
O[QU29^tt^2U[]*2Q2PPP2PPP2WO2oUOQU8Q0U2UOQU2UOQ	U2P!)%fhKe9h)%fhKp9h)
r8r^c��[Q2g)zhook_func failedrP)r�s*rrs�EUnraisableHookTest.test_custom_unraisablehook_fail.<locals>.hook_func�s���.�/�/rr�r<zcustom hook failz)Exception ignored in sys.unraisablehook: rz#Traceback (most recent call last):
zException: hook_func failed
)r
r=r8r:r�rr�r>rr9rr�)r&r8r:rsr�r�s&     r�test_custom_unraisablehook_fail�2UnraisableHookTest.test_custom_unraisablehook_fail�s���!�/�/��<�	�1�	0��\�\�
)�
)�(�
3�
3�v����'�'��-=�y�I�I�#�J�r�N�4F�G�J�4��o�o����
�
�A�"�
�R�)��	�	
�
�
�<�c�B��
�
�5�s�;�J�I��4�
3�s0�.C9�6C&	�	C9�&C6
�/C6
�1C9�9D		�D		rK)rLrMrNrOrAr[rkrnryr~rPrQrRs@rr6r6hs*����:�B&2�P<�4(��><�<rr6c�``�\sQsQsnQs\OOsQsQs	Qs
U1QksQsQs
Q	sQ
sQsQsUsU9s!)
�
SizeofTestic���[OQ2Um[OO
Um[OQ2oUOUm
UOUmP!)�Pr�)
�struct�calcsizer�rr�r��	longdigitr
r=�SIZEOF_PYGC_HEAD�gc_headsize�SIZEOF_MANAGED_PRE_HEADER�managed_pre_header_size)r&r�s& r�setUp�SizeofTest.setUp
sQ������%������2�2���)�7�7�8K�L��,�=�=���'8�'R�'R��$rc�4�[OOoUOoUO	[
OP	2UP2UO*2UO	[
O,2UQ2U*2P!)T�Pn)r�r�calcvobjsizer�rr�	getsizeofr�)r&�vsize�gc_header_sizes&  r�test_gc_head_size�SizeofTest.test_gc_head_sizesd�����)�)���)�)��������t�,�e�B�i�$�.�.�.H�I�������r�*�E�$�K�.�,H�Irc�J�QQ2oUO[[OU22QQ2oUO[[OU22Q,oUO[OU2U2U2QQ2oUO[[OU22UO[OU2U2U2QQ[2oUO[OU[O22[OUO*UO*2UO[29^tt^2[OU[O]*22PPP2UO[29^tt^2[OUP22PPP2UO[[129^tt^2[OU[O']*
22PPP2P!)%fhK�9h)%fhK�9h)%fhP!9h)	c�(`�\sQsQsnQsQsUsP!)�)SizeofTest.test_errors.<locals>.BadSizeofic��[gr7r8rHs&r�
__sizeof__�4SizeofTest.test_errors.<locals>.BadSizeof.__sizeof__s�� � rrK�rLrMrNrOr�rPrQrRs@r�	BadSizeofr������
!�
!rr�c�(`�\sQsQsnQsQsUsP!)�-SizeofTest.test_errors.<locals>.InvalidSizeofi"c��P!r7rKrHs&rr��8SizeofTest.test_errors.<locals>.InvalidSizeof.__sizeof__#s��rrKr�rRs@r�
InvalidSizeofr�"s����
�
rr��sentinelc�(`�\sQsQsnQsQsUsP!)�+SizeofTest.test_errors.<locals>.FloatSizeofi)c��Q!)g@rKrHs&rr��6SizeofTest.test_errors.<locals>.FloatSizeof.__sizeof__*r�rrKr�rRs@r�FloatSizeofr�)r�rr�c�(`�\sQsQsnQsQsUsP!)�.SizeofTest.test_errors.<locals>.OverflowSizeofi/c��[U2!r7)r�rHs&rr��9SizeofTest.test_errors.<locals>.OverflowSizeof.__sizeof__0s���4�y� rrKr�rRs@r�OverflowSizeofr�/r�rr�)r"r9rr�r#rjr�rr�r�r��
OverflowError)r&r�r�r�r�r�s&     r�test_errors�SizeofTest.test_errorss���	!�	!�	
���*�c�m�m�Y�[�A�	�	�	
���)�S�]�]�M�O�D��<���
�
�c�m�m�M�O�X�>��I�	�	�	
���)�S�]�]�K�M�B��
�
�c�m�m�K�M�8�<�h�G�	!�S�	!�	
������~�c�k�k�'B�C����t�'7�'7�7�$�:V�:V�V�	X�
�
�
�}�
-�
-��M�M�.����q��9�:�.�
�
�
�z�
*�
*��M�M�.��,�-�+�
�
�
�
�M�:�
;�
;��M�M�.�#�+�+���)9�:�;�<�
;�	.�
-��
*�
*��
;�
;�
;�s6�2I+�&I>�.3J�+I;	�4I;	�>J	�J	�J"	�J"	c�2�[OOoUO[O
P	2UP2UO*2UO[O
P	P2UP2UO*2P!)T)r�rr�rrr�r�)r&rs& r�test_default�SizeofTest.test_default;s_���|�|�(�(��������t�,�d�2�h����.G�H�������t�R�0�$�r�(�T�^�^�2K�Lrc�:``)`*�[Oo[OOn*[OO
oROn)R)P	UP2RO*2R)P
UP2RO*2R)[R*Q22QQQ*,oSFD1o[U2oR)VRQ2UO2*2J3	R)[[22R*Q22R)QUQ2]*2R)QBUQ2]*2QoR)U2O]*R*Q	22U1Q
koUU2OR*Q22UUOR*Q22QoUUOR*Q2UQ2*2R)[]]2R*Q
22R)[O R*Q22]PHFo	R)U	O$O&R*Q22]PHRo
R)U
O*O,R*Q22R)[.O0R*Q22R)-O2R*Q22R)-R*Q22R)Q]-R*Q2U[42*]*]UQ2**2[7]2Tt-tFDo[U2UaJ	ooR)UR*Q2U[42*]*]
UQ2**2R)]]-R*Q2U[42*]*]UQ2**2]]]]]]]]]]]]]]]]-oR)UR*Q2U[42*]*]
UQ2**2R)-O92R*Q	22R)-O;2R*Q	22R)-O=2R*Q	22R)[-2R*Q22R)[-O922R*Q22R)[-O;22R*Q22R)[-O=22R*Q22QQ[>2o
R)U
O@R*Q	22R)[C2R*Q22R)[EPP]]P2R*Q22R)[GPQ]]P2R*Q22R)[IP]]P2R*Q22R)[JR*P22]PH�o]PH�oUOPUOROT2oR)UR*Q22R)[W,2R*Q22R)[YP2R*Q22R)[[]2R*Q22R)[\O^RO`UP2*RO`[[\O^2**2QoU2o[Ob%cQoLQoR)UR*Q U*Q	*22Q!oR)UR*Q"22U)U*1Q#kQ$2oQ%oR)U2R*Q&U*Q	*22R)[Q'2R*Q(22]PH�oR)UOgPP2R*Q22R)[i,2UQ)22R)[i],2UQ)2]RO`**2R)[i]],2UQ)2]RO`**2R)[i,QCN2UQ)2]RO`**2R)[,2R*Q(22R)[Y,2R*Q22R)]UP2RO*2R)]UP2RO*2R)PUP2RO*2][\OjOl*oR)[/U2UP2]RO**2R)[/U]*]*
2UP2]RO**2R)[/U]*2UP2]RO**2[Ob%cQ*oLPoR)[nR*Q+U*Q,*22R)PR*P22R)[pR*P22R)[?2R*P22U)U*1Q-kQ[>2o
]PH�oR)UOtR*Q.22R)[[7]22R*Q/22R)[[7]]A*22R*Q022R)[YP2R*Q22R)[7]2R*Q122R)[7Q22R*Q122]o,[7]
2[7]22,oR*Q3UQ**Q4*2oSFD�o[U2oU]6Xc]oU]*oSoUU6:cU]*oJU]6:c'R)[yU2U2R)[{U2U2JaR)[yU2UUUQ2**2R)[{U2UUUQ2**2J�	R)[[y22R*Q522R)[}]2R*Q022R)[[.2R*Q022R)QDUP2RO`*2R)QCUP2RO`*]RO`**2Q6oUU2oR)[.U2[Ob%cQLPoUUQ7*U*2oQ8Q9[>2oR)UUU[42*]@*]*UQ2**2[7]d2T t,tFD
o U2MJ	o R)U2O@R*Q2RO`*2U2o!]9U!m@9U!mA9U!mB9U!mC9U!mD9U!mE9U!mFU!mGR)UUU[42*]@*]*UQ2**2R)U2O@R*Q2RO`*2,QENoQ:o"U"Q*o#U#Q	*o$SFD�o[�[�U22o%U%]�6c!R*U"2[U2*]*o&L{U%Q;6c!R*U#2[U2*]*o&LTU%Q<6c(R*U#2][U2]***o&L&R*U#2][U2]***o&R)UU&2J�	[�Q=2oR)UR*U#2]*2[�UQ>Q?2R)UR*U#2]*]*2]PCH2o'[Ob%c
R*Q@2o(LR*QA2o(R)U'O�[.2U(2R)U'O�[.2U(2P!ttoh[vcCKIh9htto h)FT�5Pr�ui���n2PiP�nPr�c�`�]*nU1QkoU!)rc�
:�R!r7rK�r�s�r�inner�<SizeofTest.test_objecttypes.<locals>.get_cell.<locals>.innerZ�����rrK)r�r�s @r�get_cell�-SizeofTest.test_objecttypes.<locals>.get_cellXs����A�
��Lrr�c�V:�RO[OU2U2P!r7)r�rr�)r��
expected_sizer&s&&�r�check_code_size�4SizeofTest.test_objecttypes.<locals>.check_code_size_s����#�#�C�M�M�!�$4�m�Dr�6i13Pc�`�U1QkoU!)c�
:�R!r7rKr�s�rr��=SizeofTest.test_objecttypes.<locals>.get_cell2.<locals>.innerdr�rrK)r�r�sf r�	get_cell2�.SizeofTest.test_objecttypes.<locals>.get_cell2cs
���
��Lr�2d�3PPP�3PP�3P2P�2P�nQ2Pr��n2P�P2nPnc��\sQsQsQsP!)�&SizeofTest.test_objecttypes.<locals>.Ci�rKrrKrrr�r��s��rr��6Pbz	6Pb 2P2nP�32B2iB�n4Prac�.�[O2!r7)rr2rKrr�func�)SizeofTest.test_objecttypes.<locals>.func�s���=�=�?�"r�9PihcP�9PhcP�3PiccPPPc��P!r7rKrKrrr�r��s��Dr�16Pic�:`�\sQsQsn\Q2s\Q2sY\YQ22Y\YQ22QsUs	P!)�&SizeofTest.test_objecttypes.<locals>.ci�c��P!r7rKrKrrrE�*SizeofTest.test_objecttypes.<locals>.c.foo����rc��P!r7rK)�clss&r�bar�*SizeofTest.test_objecttypes.<locals>.c.bar�r�r�PPrK)
rLrMrNrO�staticmethodrE�classmethodr�rPrQ�rSr�rs@��rr.r��sJ����
�
��
�
�
��
�
�#�t�D�z�"��#�t�D�z�"�"rr.c3� �]w�	P!3hr�rKrKrr�get_gen�,SizeofTest.test_objecttypes.<locals>.get_gen�s	���Q�w�s�	�6P4cr��lPr��?zPPPP?�NPPPPPc�n:`�\sQsQsnQsQsQs\\\\P2sY\YQ22Qs	Us
P!)r�i�c��UO!r7��_C__xrHs&r�getx�+SizeofTest.test_objecttypes.<locals>.C.getx�s
��4�8�8�Orc��VmP!r7r�)r&�values&&r�setx�+SizeofTest.test_objecttypes.<locals>.C.setx�s��e�8rc��U;P!r7r�rHs&r�delx�+SizeofTest.test_objecttypes.<locals>.C.delx�s���r�5Pi)�__x)rLrMrNrOr�r�r��propertyr�rPrQr�s@��rr�r��s/����+�3�(���t�T�2�.�A��!�T�%�[�!�!r�6P�3l�3P�4Pi��3nP�2nP�P3n�P2nPI13Pl4Pn9Pn12PI2Pc�4P36P3P10P2P7P1PIPc��\sQsQsQsP!)�2SizeofTest.test_objecttypes.<locals>.newstyleclassi-rKrrKrr�
newstyleclassr-s��Trr�nnb�ii@z<stdin>r1�2Pn4P�2Pn3Ps
xxxxxxxxxx)r�rr�rK)�d1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111udÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿuPĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀu,￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ux𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀u�􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿􏿿)Or�r�r�r�calcobjsizer��check_sizeofr�r	�	bytearray�	__alloc__�iter�__closure__r4�complexr�r��datetime�	timedelta�days�collections�defaultdict�default_factoryr��__add__�__iter__�DICT_KEY_STRUCT_FORMATr��keys�values�itemsrx�__dict__�
BaseException�UnicodeEncodeError�UnicodeDecodeError�UnicodeTranslateError�Ellipsisr��encodings.iso8859_3�
charmap_build�	iso8859_3�decoding_tabler\�reversed�floatrr�r�r��re�finditerr�r�r�r�NotImplemented�	_datetime�
datetime_CAPI�ModuleNotFoundErrorrJr�slice�superr�r�r.rarnrd�g�h�ord�max�chrr0�weakref�ref�proxy),r&r�r��samples�sampler�r�r�r�rrr<�longdictr�r��	encodingsr��INTERPRETER_FRAMEr.r�r4�PyLong_BASE�md_gilr7�
PySet_MINSIZEr�minused�tmp�newsize�fmt�typeidrr�o�asciifields�
compactfields�
unicodefields�maxchar�LrAr�r�r�	__class__s,f                                        @@�r�test_objecttypes�SizeofTest.test_objecttypes@s�����?�?���|�|�'�'�����)�)���!�!��
�d�E�"�I����.�/�
�e�U�2�Y����/�0�	�c�4��:����V��$���F��&�!�A��!�U�7�^�a�k�k�m�3�4��	�d�9�;���d��,�
�c�5��:��>�"�
�i��s��b��)�	�
	�h�j�$�$�Q�'��c��3�	E���
�+�+�T�'�]�;���)�)�4��=�9�	�	�	�*�*�D��M�H�S�M�,I�J�
�g�a��l�D��J�'�
�c�i�i��f��&�	�
�h� � �%�%�t�E�{�3��
�k�%�%�5�5�t�E�{�C�
�c�k�k�4��<�(�
�b�k�k�4��:�&�
�b�$�v�,��
�s�A�h��V��x�0F�'G�G�!�K�v�W_�`d�We�Ne�e�f�',�Q�x�0�x�!�C��F�A�I�x��0�
�h��V��x�0F�'G�G�"�L�PW�Ya�bf�Yg�Og�g�h�
�q�!�f�d�6�l�X�.D�%E�E��I�V�U]�^c�Ud�Ld�d�e��a��1�a��1�Q��!�Q�q�!�A�q��;��
�h��V��x�0F�'G�G�"�L�PW�Ya�bg�Yh�Oh�h�i�
�b�g�g�i��c��#�
�b�i�i�k�4��9�%�
�b�h�h�j�$�s�)�$�
�d�2�h��W�
�&�
�d�2�7�7�9�o�t�G�}�-�
�d�2�9�9�;���g��/�
�d�2�8�8�:���W�
�.����
�a�j�j�$�s�)�$�
�m�o�t�E�{�+�
� ��R��A�r�2�D��4E�F�
� ��S�!�Q��3�T�+�5F�G�
�#�B��1�b�1�4��3D�E�
�h��R��!�*�� � ��!4�!4�!C�!C�D��
�a��h�� �
�i��m�T�%�[�)�
�h�r�l�D��J�'�
�e�A�h��S�	�"�
�c�n�n�d�f�f�u�R�y�0�4�6�6�C����<O�3O�O�P�	#��F���"�"�"� (�� '��
�a��j�#4�4�s�:�;�<��
�d�D��L�!�
	#�
	#�	�
�g�i��f�'8�8�3�>�?�@�
�d�5�k�4��:�&��
�b�k�k�"�R� �$�t�*�-�
�d�2�h��d��$�
�d�A�3�i��t��q����x�/�0�
�d�A�q�6�l�E�$�K�!�D�F�F�(�2�3�
�d�9�o�u�T�{�Q�t�v�v�X�5�6�	�d�2�h��T�
�#�
�h�r�l�D��J�'�
�a��r��T�^�^�+�,�
�a��r��T�^�^�+�,�
�b�%��)�d�n�n�,�-�����4�4�4��
�c�+���b�	�A�d�n�n�,<� <�=�
�c�+�q�.��"�#�U�2�Y��4�>�>�1A�%A�B�
�c�+�q�.�!�5��9�q����/?�#?�@��"�"�"��F��F�
�h��W�v�-��8�9�:�
�d�D��H��
�n�d�2�h�'�
�f�h��R��!�	"�	"��	"�	7��
�)�)�)�4��:�6�
�d�5��8�n�d�4�j�)�
�d�5��B��<� �$�t�*�-�
�h�r�l�D��J�'�
�e�A�h��T�
�#�
�e�E�l�D��J�'��
��u�R�y�%��)�,�����t�+�+�e�3�4���F��&�k�G��!�|�1�S��a�i�G�#�G��W�$�!�Q�,���!�|��c�&�k�1�%��i��'��+��c�&�k�1�w�x��~�'=�#=�>��i��'��W�X�d�^�-C�)C�D�� 	�d�3�5�k�4��;�'�
�e�A�h��T�
�#�
�e�C�j�$�t�*�%�
�b�%��)�d�f�f�$�%�
�g�u�R�y�4�6�6�)�A�d�f�f�H�4�5�'���#�J��
�c�1�
��/�/�/��R���#�����	
��	*�F�)�
�m�Q��*@�!A�A�B�F��H�UY�N�IZ�Z�[�"'��*�-�*�Q���*�-�
�m�o�&�&��V��t�v�v�(=�>��O��89�9���9�a�c�9�A�C�9�!�#�9���9�a�c�9�A�C�!�#�
�m�Q��*@�!A�A�B�F��H�UY�N�IZ�Z�[�
�m�o�&�&��V��t�v�v�(=�>�
6����#�d�*�
�%��+�
��A��#�a�&�k�G���}���%��A��.��2���3����'�#�a�&�0�1�4���5����'�!�S��V�a�Z�.�8����'�!�S��V�a�Z�.�8���!�Q�K��
��K��
�a��m�$�q�(�)�	��9�f�%�
�a��m�$�q�(�1�,�-�	��"�"�"��G�}�H��G�}�H�
�g�k�k�#���)�	�g�m�m�C� �(�+��M1��n#�	��	��|	.s$�z?�,{�{�	{�{�{c�J�[OU2[OU2*o[O
U2%c/[O
U2%fV@O*
oUO[OU2U2P!r7)rr�r�r�r��
is_trackedr�r)r&r:�base�extrar�s&&&& r�check_slots�SizeofTest.check_slotsdsb���=�=��&�����)?�?��
�=�=����b�m�m�D�&9�&9��(�(�(�H�������s�+�X�6rc��UOoQQ[2oUU2[2Q2QQ[2oUU,Q5Q,-Q2QQ[2oUU2,Q2Q	Q
[2oUU2[	2Q2QQ[
2oQ
Q[2oUUU2,2[U2,2Q2]QHGoQQU2o	UU	,Q5U,Q5Q2P!)c��\sQsQsQsQsP!)�!SizeofTest.test_slots.<locals>.BAinrK�r�r�r.�rLrMrNrO�	__slots__rPrKrr�BArbn���%�Irrfrc��\sQsQsQsQsP!)� SizeofTest.test_slots.<locals>.DiqrKrcrdrKrr�Driqrgrrjr�r�c��\sQsQsQsQsP!)� SizeofTest.test_slots.<locals>.LitrKrcrdrKrrrVrltrgrrVc��\sQsQsQsQsP!)� SizeofTest.test_slots.<locals>.SiwrKrcrdrKrrr�rnwrgrr�c��\sQsQsQsQsP!)�!SizeofTest.test_slots.<locals>.FSizrKrcrdrKrr�FSrpzrgrrqc��\sQsQsQsP!)�&SizeofTest.test_slots.<locals>.mytuplei}rKrrKrr�mytuplers}rrrt)�OrderedDictc��\sQsQsQsQsP!)�!SizeofTest.test_slots.<locals>.ODi�rKrcrdrKrr�ODrw�rgrrx)	r^rrhr�rJrr�rru)
r&r�rfrjrVr�rqrtrurxs
&         r�
test_slots�SizeofTest.test_slotsjs���� � ��	&��	&�
�b�d�I�K��&�	&��	&�
�a�"�g��R�y�$�'�	&��	&�
�a�c�2�t��	&��	&�
�a�c�3�5�$��	&��	&�	�e�	�
�b�'�)��o�y�'�)��5�t�<�+�	&��	&�
�b�2�h��b�)�4�0rc	��[OOo[OOoUOo]PHoUUO
2UQ22[g[c)oSOoSdSXaQ22Po=LPo=hh9h]oS[OSP2SO*SOS[[O2***2P!)rr�2P2i)
r�rrr�r�_ast�Moduler#rkrr:r�r	)r&rr�r�r}rn�tb�non_sequence_fieldss&       r�test_pythontypes�SizeofTest.test_pythontypes�s����|�|�'�'�����)�)���!�!���
�d�k�k�m�T�$�Z�(�	(��O���	(����B��~��b�$�v�,�'���		(��  ��
�c�i�i��r��T�V�V�+�d�f�f�8K�c�RU�R[�R[�n�8\�.]�]�^s$�$A*�*	B�4B�5B�B�Bc�6�[O2oUOUO2UOUO2QoQoUO[29^tt^2[OUQQ5PPP2[O2oUOUO2UOUO2UO[29^tt^2[OQUQ5PPP2[O2oUOUO2UOUO2[OUQ5[O2oUOUOU2UOU]*U2UOUOP2UOU]*P2[OUQ5[O2oUOUOU2UOU]*U2UOUOU2UOU]*U2[OU[O2oUOUO2UOUO2P!)%fhCKs9h)%fhCK�9h)c��P!r7rK�r�s*r�<lambda>�0SizeofTest.test_asyncgen_hooks.<locals>.<lambda>����trc��P!r7rKr�s*rr�r��r�r�invalid)�	firstiter�	finalizer)r�)r�)	r�get_asyncgen_hooksr�r�r�r"r#�set_asyncgen_hooksrj)r&�oldr�r��cur�hookss&     r�test_asyncgen_hooks�SizeofTest.test_asyncgen_hooks�s���$�$�&�����#�-�-�(����#�-�-�(�#�	�#�	�
�
�
�y�
)�
)��"�"�Y�)�L�*��$�$�&�����#�-�-�(����#�-�-�(��
�
�y�
)�
)��"�"�Y�)�L�*��$�$�&�����#�-�-�(����#�-�-�(�����3��&�&�(���
�
�e�o�o�y�1��
�
�e�A�h�	�*��
�
�e�o�o�t�,��
�
�e�A�h��%�����3��&�&�(���
�
�e�o�o�y�1��
�
�e�A�h�	�*��
�
�e�o�o�y�1��
�
�e�A�h�	�*�����$��$�$�&�����#�-�-�(����#�-�-�(�=*�
)�
)��*�
)�
)�s$�0K3�9L�3L	�<L	�L	�L	c��[OQ2o[QU2vq#oUOUQ2UOUQ2P!)z�
            import sys
            class MyStderr:
                def write(self, s):
                    sys.stderr = None
            sys.stderr = MyStderr()
            1/0
        r�r)rrrrr�s&    r�/test_changing_sys_stderr_and_removing_reference�:SizeofTest.test_changing_sys_stderr_and_removing_reference�sI����� �
��-�T�4�8��������c�"�����c�"r)r�r�r�r�)rLrMrNrOr�r�rrr�r�r�rXr^ryr�r�r�rPrQ�
__classcell__)rWrSs@@rr�r�sT����S��<�<�,�,�L�J�<�>M�
b,�H	7�1�6_�:&)�P#�#rr�c�`�\sQsQsnQsPPPPP\OQ*1QksQsQs	Qs
\O\OQ2\O\O Q	6HQ
2Q22sQsQ
sQsQsQsQsQsQsQsQs\O\O Q6HQ2\O\O:Q2]6HQ2Q22s\O\O Q6HQ2\O\O:Q2]6HQ2Q22sQs Qs!Qs"Us#P!) �TestRemoteExeci�c�D�[OO2P!r7r�rHs&rr��TestRemoteExec.tearDown�r�r�
_remote.pyc	��UO[OU2[UQ29^tt^2oUO	U2PPP2[O
Q*o	UO[OU	2[
2o
[U	Q29^tt^2oUO	QU
QUQ02PPP2Ue[OoU,oU%cUOU2UOU	2[O[O[O2oUOQU
12UO[ 2UO#]2[$O&U[$O([$O(UQ59^tt^2o
PoUO+2vq�UO-2UO/Q2oUO1UQ2Ud	UU
2[O2U
O4U2UO7Q	2UO/Q2oUO1UQ
2U
O9QQ5vooU
O:UU1UdUO-2U
O=2U
O?2U
OA[ Q5ttPPP2!)%fhCK�9h)%fhCK29h[BcSOEQ
2Lh9hSdSO-2S
O=2S
O?2S
OA[ Q5LOSdSO-2S
O=2S
O?2S
OA[ Q5h9hPPP2P!)%fhP!9h)�wz
_target.pyz�
import sys
import time
import socket

# Connect to the test process
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('localhost', z))

a�

# Signal that the process is ready
sock.sendall(b"ready")

print("Target process running...")

# Wait for remote script to be executed
# (the execution will happen as the following
# code is processed as soon as the recv call
# unblocks)
sock.recv(1024)

# Do a bunch of work to give the remote script time to run
x = 0
for i in range(100):
    x += i

# Write confirmation back
sock.sendall(b"executed")
sock.close()
�	localhostrf�sreadyscontinuesexecutedg$@rqz:Insufficient permissions to execute code in remote process)#r*r�unlink�openr��TESTFNrrr��extendrH�socket�AF_INET�SOCK_STREAM�bind�
settimeoutr�listenr�rkrl�accept�close�recvr�remote_exec�pid�sendallrmr��kill�	terminaterK�PermissionErrorr�)r&�script_code�python_argsrb�python_executable�prologue�after_ready�script_pathrdrR�port�cmd�
server_socketr��
client_socketr�responser$r�s&&&&&&&&           r�_run_remote_exec_test�$TestRemoteExec._run_remote_exec_test�s��
	
���	�(�(�+�6�
�+�s�
#�
#�q�
�G�G�K� �$��!�!�L�0�����	�(�(�&�1��!��
�&�#�
�
�!�
�G�G��!�6�"�	�
���
��D�$� #���� �!����J�J�{�#��
�
�6���
�
�f�n�n�f�6H�6H�I�
����K��.�/�� � ��/����Q��
�
�
�c�%/�_�_�%/�_�_�"%� � �$(� �M�
1�#0�#7�#7�#9� �
��#�#�%�(�-�-�d�3��� � ��8�4��*���%�������+�6��%�%�k�2�)�-�-�d�3��� � ��;�7�"&�!1�!1�$�!1�!?���������6�!�,�!�'�'�)��	�	����� ��	�	�-�	�0�K � �s$�
#�
#���
�
��\#�
\��
�
�Z�[�
\��[� �,�!�'�'�)��	�	����� ��	�	�-�	�0��	!�,�!�'�'�)��	�	����� ��	�	�-�	�0��0�K � � � �s��K�%K'�1O�5AK;�>BK;�>O�AO�K$	�K$	�'K8	�0K8	�;	L�L�M)�L�M)�O�"AO�)N5�.AN5�5O�O	�O	c�``�UU1QkoQoROU1QU-U@vqVoROU]2ROQU2ROUQ2P!)c�:�[OR2[QUOQ0QQ59^tt^2oRO	RQ0UO22PPP2P!)%fhP!9h)z/proc/z/mapsrr�z
 (deleted))rr�r�r�r��read)r��maps�deleted_pathr&s& ��r�delete_loaded_mapping�STestRemoteExec._run_remote_exec_with_deleted_mapping.<locals>.delete_loaded_mappingHsX������\�*���t�x�x�j��.��A�A�T��
�
���j�9�4�9�9�;�G�B�A�A�A�s�$A*�*A;	�3A;	�-print("Remote script executed successfully!")r��$Remote script executed successfully!r�r�rr�)r&r��kwargsr��scriptr�r$r�sff,     r�%_run_remote_exec_with_deleted_mapping�4TestRemoteExec._run_remote_exec_with_deleted_mappingGsk���	H�
A��%)�%?�%?��&A� 5�&A�9?�&A�"�
�F�����Q�'��
�
�=�v�F������%rc�|�QoUOU2vq#oUOQU2UOUQ2P!)r�r�r)r�r�r�r&r�r�r$r�s&    r�test_remote_exec�TestRemoteExec.test_remote_execTs;��@��%)�%?�%?��%G�"�
�F��
�
�=�v�F������%rc���Qo[O[O2Q*oUO	UUQ5vq4oUOQU2UO
UQ2P!)r�s_bytes_remote.py�r�r�r)rirurr�r�r�r�r&r�r�r�r$r�s&     r�test_remote_exec_bytes�%TestRemoteExec.test_remote_exec_bytes\sa��@���k�k�)�"2�"2�3�6I�I��%)�%?�%?��@K�&@�&M�"�
�F��
�
�=�v�F������%rzrequires undecodable pathr�z,undecodable paths are not supported on macOSc���Qo[OQ*oU[OU21FD=oUO	UUQ5vq4oUOQU2UO
UQ2J?	P!)r�s_undecodable_remote.pyr�r�r)r�TESTFN_UNDECODABLEri�fsdecoder�r�rr�s&     r�test_remote_exec_undecodable�+TestRemoteExec.test_remote_exec_undecodabledst��A���2�2�5N�N��'����[�)A�B�K�)-�)C�)C�F�DO�*D�*Q�&�J���M�M�A�6�J����V�S�)�	Crc
�$�Qo[OQ*o[UQ29^tt^2oUOU2PPP2UO	[O
U2[OQ[Q59^tt^2o[OQ[Q59^tt^2o[O[O2[OOU22[Q2UO!UO#2Q2UO!UO#2Q2PPP2PPP2P!)%fhCK9h)%fhK.9h)%fhP!9h)	zIimport sys;print("Remote script executed successfully!", file=sys.stderr)z_remote_self.pyr�z
sys.stderr)�new_callablez
sys.stdout�Donez%Remote script executed successfully!
zDone
)rr�r�r�r*r�r�patchrrr�ri�getpidr}r~�printrr)r&r2�filerd�mock_stderr�mock_stdouts&     r�"test_remote_exec_with_self_process�1TestRemoteExec.test_remote_exec_with_self_processps���[�����"3�3��
�$��_�_��
�G�G�D�M�����	�(�(�$�/�
�Z�Z��8�
<�
<�����L�x�@�@�K�����	�	��R�W�W�_�_�T�-B�C��f�
�� � ��!5�!5�!7�9a�b�� � ��!5�!5�!7��B�	A�=�
<��_�_��A�@��=�
<�
<�sB�E�
%E>�2BE+	�E>�E(	� E(	�+E;
�4E;
�6E>�>F	�F	c���QoQoUOV!Q5vq4oUOU]2UOQU2UOQU2UOUQ2P!)z�import sys
def audit_hook(event, arg):
    print(f"Audit event: {event}, arg: {arg}".encode("ascii", errors="replace"))
sys.addaudithook(audit_hook)
z/
print("Remote script executed successfully!")
)r�r�s2Audit event: cpython.remote_debugger_script, arg: rr�)r&r�r�r�r$r�s&     r�#test_remote_exec_raises_audit_event�2TestRemoteExec.test_remote_exec_raises_audit_eventsh������&*�%?�%?��%?�%Z�"�
�F�����Q�'��
�
�=�v�F��
�
�K�V�T������%rc��QoUOU2vq#oUOU]2UOQU2UOUO2Q2P!)z,
raise Exception("Remote script exception")
sRemote script exception�Target process running...�r�rr�rnr�s&    r�test_remote_exec_with_exception�.TestRemoteExec.test_remote_exec_with_exception�sV����&*�%?�%?��%G�"�
�F�����Q�'��
�
�0�&�9��������)E�Frc���[OQ2oUOU2vq#oUOU]2UOUQ2UO	QU2P!)z�
            assert globals() is not __import__("__main__").__dict__
            print("Remote script executed successfully!")
            rs#Remote script executed successfully)rrr�rr�r�s&    r�'test_new_namespace_for_each_remote_exec�6TestRemoteExec.test_new_namespace_for_each_remote_exec�s[�����
�
��&*�%?�%?��%G�"�
�F�����Q�'������%��
�
�<�f�Erc���[OO2oQUQ$UO[Q29^tt^2UOQUQ5PPP2P!)%fhP!9h)r��PYTHON_DISABLE_REMOTE_DEBUG�5Remote debugging is not enabled in the remote process�print('should not run')�rb)rirjr��assertRaisesRegexr%r�)r&rbs& r� test_remote_exec_disabled_by_env�/TestRemoteExec.test_remote_exec_disabled_by_env�sU���j�j�o�o���-0��)�*�
�
#�
#�L�2i�
j�
j��&�&�'@�c�&�J�k�
j�
j�
j�s�A!�!A2	�*A2	c��UO[Q29^tt^2UOQQ,Q5PPP2P!)%fhP!9h)r�r��-Xdisable-remote-debug)r�)r�r%r�rHs&r�$test_remote_exec_disabled_by_xoption�3TestRemoteExec.test_remote_exec_disabled_by_xoption�s>��
�
#�
#�L�2i�
j�
j��&�&�'@�Og�Nh�&�i�k�
j�
j�
j�s�?�A	�A	c��UO[29^tt^2[OQQ2PPP2P!)%fhP!9h)i��r�)r"�OSErrorrr�rHs&r�test_remote_exec_invalid_pid�+TestRemoteExec.test_remote_exec_invalid_pid�s1��
�
�
�w�
'�
'��O�O�E�#<�=�(�
'�
'�
'�s�A�A	�
A	c�J�UO[29^tt^2[O]P2PPP2UO[29^tt^2[O]]{2PPP2P!)%fhKO9h)%fhP!9hr�)r"r#rr�rHs&r�test_remote_exec_invalid_script�.TestRemoteExec.test_remote_exec_invalid_script�s`��
�
�
�y�
)�
)��O�O�A�t�$�*�
�
�
�y�
)�
)��O�O�A�s�#�*�
)�*�
)��
)�
)�
)�s#�A>�B�>B	�B	�B"	�B"	c��QoUOU2vq#oUOU]2UOQU2UOUO2Q2P!)z
this is invalid python code
sSyntaxErrorr�r�r�s&    r�test_remote_exec_syntax_error�,TestRemoteExec.test_remote_exec_syntax_error�sU����&*�%?�%?��%G�"�
�F�����Q�'��
�
�n�f�-��������)E�Frc���UO[29^tt^2[O[O
2Q2PPP2P!)%fhP!9h)�invalid_script_path)r"rrr�rir�rHs&r�$test_remote_exec_invalid_script_path�3TestRemoteExec.test_remote_exec_invalid_script_path�s7��
�
�
�w�
'�
'��O�O�B�I�I�K�)>�?�(�
'�
'�
'�s�+A�A%	�A%	r�zLinux-only regression test�Py_ENABLE_SHAREDz!requires a shared libpython buildc	��[OQ2o[OQ2o[OQ2oU%cU%c	U%fUOQ2[OOV2o[OO
U2%fUOU8Q02[O29^tt^2o[OOVS2o[OVF2V#6wc5[OU[OOVR22[OO2oUOQ2oU%fSLU[O*U*UQ$UO!UUQ5PPP2P!)%fhP!9h)�abs_builddir�	LDLIBRARY�
INSTSONAMEz*cannot determine shared libpython location� does not exist�LD_LIBRARY_PATHr�)r�r�r�rir}r^rr�temp_dir�shutil�copy2�symlinkrjr��get�pathsepr�)	r&�	build_dir�	ldlibrary�
instsoname�source_libpython�lib_dir�copied_libpythonrb�ld_library_paths	&        r�"test_remote_exec_deleted_libpython�1TestRemoteExec.test_remote_exec_deleted_libpython�sA���,�,�^�<�	��,�,�[�9�	��-�-�l�;�
��	���M�M�F�G��7�7�<�<�	�>���w�w�~�~�.�/�/��M�M�-�0��@�A�
�
�
�
!�
!�W�!�w�w�|�|�G�@���L�L�)�<��&��
�
�:�r�w�w�|�|�G�'G�H��*�*�/�/�#�C�!�g�g�&7�8�O�4C�W��"�*�*�$��6�
�!�"�
�6�6�7G�;>�
7�
@�"�
!�
!�
!�s�#;G
�A*G
�
6G
�
G	�G	zrequires a static Python buildc	��[OQ2o[OO	[OO[O22oU%c&[OOU2%fUOQ2[OOUQ2o[OOU2%fUOU8Q02[UQQ59^tt^2oUO2O2oPPP2[OOUW2o[OOU2%fUOU8Q02[O29^tt^2o[OOUQ2o[OOV�2o	[O [OO	U	22[O"U[OOUQ22[O"Vi2[$O&U[OOUQ22[OOU[OO)[*O,22o
[$O&[*O,U
2UO/U
Q,U
Q	5PPP2P!)%fhCK
9h)%fhP!9h)
rz%cannot determine build-tree locationszpybuilddir.txtrrr�r�Libz-S)r�r�)r�r�rir}rr~r	�isdirr�r^rr�r�rnrr�makedirsrrr�basenamerr�r�)r&r�
stdlib_dir�pybuilddir_txt�pybuilddir_file�
pybuilddir�source_ext_dir�copied_root�copied_build_dir�copied_pybuilddir�
copied_pythons&          r�*test_remote_exec_deleted_static_executable�9TestRemoteExec.test_remote_exec_deleted_static_executable�s���,�,�^�<�	��W�W�_�_�R�W�W�_�_�R�[�[�%A�B�
�����
�
�j� 9� 9��M�M�A�B������i�1A�B���w�w�~�~�n�-�-��M�M�^�.�o�>�?�
�.�7�
3�
3��(�-�-�/�5�5�7�J�4������i��<���w�w�}�}�^�,�,��M�M�^�.�o�>�?�
�
�
�
!�
!�[�!�w�w�|�|�K��A�� "�����-=� J���K�K������(9�:�;��J�J�z�2�7�7�<�<��U�#C�D��J�J�~�9��L�L�������&6�8H�I�
K��G�G�L�L�)9�)+���)9�)9�#�.�.�)I�K�M��L�L�����7��6�6��D�6�"/�
7�
1�"�
!�
4�
3�
3��"�
!�
!�s%�L/�-E8M�/M	�8M	�M	�M	c��[OQ*oUO[OU2[	UQ29^tt^2oUOQ2PPP2[OO2oQUQ$[QQUQ01-U@vqEoUOQU2UOUQ	2P!)%fhKn9h)
r�r�r�r�r�r��.import os, sys; sys.remote_exec(os.getpid(), "�")�Remote debugging is not enabledr)rr�r*r�r�r�rirjr�rr�r)r&r�rdrbrr(r�s&      r�6test_remote_exec_in_process_without_debug_fails_envvar�ETestRemoteExec.test_remote_exec_in_process_without_debug_fails_envvar	s����!�!�L�0�����	�(�(�&�1�
�&�#�
�
�!�
�G�G�C�D���j�j�o�o���-0��)�*�+�D�4b�ci�bj�jl�2m�u�qt�u�����
�
�8�#�>�����c�"��
�s�
C�C	�C	c�h�[OQ*oUO[OU2[	UQ29^tt^2oUOQ2PPP2[
QQQUQ02vq4oUOQU2UOUQ2P!)%fhKJ9h)	r�r�r�r�r�r4r5r6r)	rr�r*r�r�r�rr�r)r&r�rdrr(r�s&     r�7test_remote_exec_in_process_without_debug_fails_xoption�FTestRemoteExec.test_remote_exec_in_process_without_debug_fails_xoption#	s����!�!�L�0�����	�(�(�&�1�
�&�#�
�
�!�
�G�G�C�D��,�,D�d�N|�~D�}E�EG�MH�I�����
�
�8�#�>�����c�"��
�s�
B!�!B1	�*B1	rK)$rLrMrNrOr�rr�r�r�r�r�rr0r�rrrr�r�r�r�r�r�r�rrrrr�r�r!r1r7r:rPrQrRs@rr�r��s����%�>B�t�04�r�*.�*3�*:�*:�\�*I�e1�N&�&�&�����5�5�7R�S�
�_�_�S�\�\�X�-�C�E�*�E�T�*�
C�&�"G�F�K�j�
>�
$�G�@�
�������0�2N�O�
���� � �!3�4��9�+�-�@�-�P�@�4�������0�2N�O�
���� � �!3�4��9�(�*� 1�*�P� 1�D#�	#�	#rr�c�4`�\sQsQsnQsQsQsQsUsP!)�
TestSysJITi.	c��[OO2oQU0o[QUQQ5[QUQQ5P!)z.import sys; assert sys._jit.is_available() is r�r���
PYTHON_JITr�)r�_jit�is_availabler�r&�	availabler�s&  r�test_jit_is_available� TestSysJIT.test_jit_is_available0	s8���H�H�)�)�+�	�A�)��M����v�#�6���v�#�6rc��[OO2oQo[QUO	P
Q5QQ5[QUO	UQ5QQ5P!)z5import sys; assert sys._jit.is_enabled() is {enabled}r���enabledr�r?r�)rrArBrr�rCs&  r�test_jit_is_enabled�TestSysJIT.test_jit_is_enabled6	sG���H�H�)�)�+�	�H����v�}�}�U�}�;��L���v�}�}�Y�}�?�C�Prc���[OO2o[OQ2o[QUO
P
Q5QQ5[QUO
UQ5QQ5P!)a3
            import _testcapi
            import _testinternalcapi
            import sys

            def frame_0_interpreter() -> None:
                assert sys._jit.is_active() is False

            def frame_1_interpreter() -> None:
                assert sys._jit.is_active() is False
                frame_0_interpreter()
                assert sys._jit.is_active() is False

            def frame_2_jit(expected: bool) -> None:
                # Inlined into the last loop of frame_3_jit:
                assert sys._jit.is_active() is expected
                # Insert C frame:
                _testcapi.pyobject_vectorcall(frame_1_interpreter, None, None)
                assert sys._jit.is_active() is expected

            def frame_3_jit() -> None:
                # JITs just before the last loop:
                # 1 extra iteration for tracing.
                for i in range(_testinternalcapi.TIER2_THRESHOLD + 2):
                    # Careful, doing this in the reverse order breaks tracing:
                    expected = {enabled} and i >= _testinternalcapi.TIER2_THRESHOLD
                    assert sys._jit.is_active() is expected
                    frame_2_jit(expected)
                    assert sys._jit.is_active() is expected

            def frame_4_interpreter() -> None:
                assert sys._jit.is_active() is False
                frame_3_jit()
                assert sys._jit.is_active() is False

            assert sys._jit.is_active() is False
            frame_4_interpreter()
            assert sys._jit.is_active() is False
            r�rHr�r?r�)rrArBrrrr�rCs&  r�test_jit_is_active�TestSysJIT.test_jit_is_active<	sX���H�H�)�)�+�	����&
�(
��R	��v�}�}�U�}�;��L���v�}�}�Y�}�?�C�PrrK)	rLrMrNrOrErJrMrPrQrRs@rr=r=.	s����7�Q�,Q�,Qrr=r8)3r r�r�rFr�rrirrr�r�r�rr��test.supportr�rrrrrr�rr�test.support.socket_helperrr	r
rr�
concurrentr
r�rr�rr$�TestCaserrXr�r�r/�force_not_colorized_test_classr6r��support_remote_exec_onlyr�r=rL�mainrKrr�<module>rVs����
�	�	�
��	�
�
�
�
��
������"�N�7�)�&�,�&��'����=�"��7!�h�'�'�7!�t=�8�,�,�=�@%B�X�&�&�%B�VU0�H�%�%�U0�p$��������,�,�Z<��*�*�Z<�-��Z<�z�����P#��"�"�P#��P#�d���&�&������P#�X�&�&�P#��'�P#�d
:Q��"�"�:Q�z�z���M�M�O���_J���L��s�=G�G"�G"�!G"

Youez - 2016 - github.com/yon3zu
LinuXploit