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 :  C:/Python315/Lib/test/test_interpreters/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_interpreters/__pycache__/test_api.cpython-315.opt-2.pyc
R
>lqj_c�T�]PHs]PHs]PHs]PHs]PHs]QHGs]PHs]PH s]PH$s	]QH(Gs]QH0G
s
]QH0Gs]QH0Gs]QH@GsGs\O&Q2s]QHTGs]Q	H0Gs]Q
H0Gs]PHdGs]QHpGsGsGs]QH�G!s!G"s"G#s#G$s$G%s%G&s&Q
s'Qs(Qs)Qs*Qs+Qs,Qs-\O\QP
-Qk2s/Q<Qks0QQ\$2s1QQ\$2s2QQ\$2s3QQ\$2s4QQ \$2s5Q!Q"\$2s6Q#Q$\$2s7Q%Q&\$2s8Q'Q(\$2s9Q)Q*\$2s:\Ovs<\Ozs>\O~s@Q+sAQ,sBQ-sCQ.sDQ/sEQ0sFQ1Q22sGQ=Q3P-Q4kksHQ5Q6\$2sIQ7Q8\$2sJQ9Q:\$2sK\LQ;6Xc\	O�2P!P!)>�)�dedent)�support)�	os_helper)�
script_helper)�
import_helper)�assert_python_ok�spawn_python�
_interpreters)�interpreters)�Py_GIL_DISABLED)�force_not_colorized)�InterpreterError�InterpreterNotFoundError�ExecutionFailed)�_captured_script�_run_output�_running�TestBase�requires_test_modules�_testinternalcapi�unknownzruntime init�legacy C-API�C-API�cross-interpreter C-APIz_interpreters modulec�Z�[OU2P	![cP
!h9h)F)�pickle�dumps�	Exception)�objs&�4C:\Python315\\Lib\test\test_interpreters\test_api.py�
is_pickleabler 's,������S��������s��	*�*�*�removec#�� �]PHo[U2o[VU2U%cUOU2w�	P!V@*w�UOUP2P!SOSP2h9h3h�r)�__main__�vars�exec�pop)�name�scriptr!�mainmod�mainnss&&$  r�defined_in___main__r,/sV����
�'�]�F���� �
��j�j����	#��,���J�J�t�T�"��F�J�J�t�T�"�s!�$A4�A4�A�	A4�A1�1A4c��[U[2%c9[OUOUO
UOQ5oLb[U[2%cMUOU2vqEoU%fU[7cQo[OSSS9%fPQ5o[OUUUUQ5!))�__name__�__qualname__�
__module__�builtins)�type�msg�	formatted�
errdisplay)
�
isinstancer2�types�SimpleNamespacer.r/r0�str�
rpartition�__builtins__)�exctyper3r4r5�module�_r(s&&&&   r�
build_excinfor?>s����'�4� � ��'�'��%�%� �-�-��)�)�
��

�G�S�	!�	!�!�,�,�W�5���4��$�,�.��F��'�'�� ��~�~��
��� � �
����	��c�(`�\sQs]\snQsQsUsP!)�ModuleTestsc�"�[O[O[O[O,o[O[O[O[O,oUOV!2P!�N)r
�create_queue�Queue�
QueueEmpty�	QueueFull�assertEqual)�self�first�seconds&  r�test_queue_aliases�ModuleTests.test_queue_aliases^sj���%�%�����#�#��"�"�	
��
�%�%�����#�#��"�"�	
��	
����'r@�)r.r0r/�__firstlineno__rM�__static_attributes__�__classdictcell__��
__classdict__s@rrBrB\s����
(�
(r@rBc�@`�\sQs]nsnQsQsQsQsQsQs	Us
P!)�CreateTestsc��[O2oUOU[O2UO	U[O
22UO
[[OQ2P!)u�)	r
�create�assertIsInstance�Interpreter�assertIn�list_all�assertRaises�UnicodeEncodeErrorr	�rJ�interps& r�test_in_main�CreateTests.test_in_mainpsX���$�$�&�����f�l�&>�&>�?��
�
�f�l�3�3�5�6�	
���,�m�.B�.B�H�Mr@c�L``�[O2nPnUU1Qko[OUQ5oR9^tt^2UO2PPP2UO	2UOR[O22P!)%fhKG9h)Nc�t:�[O2nRO2RO2P!rD)r
rX�acquire�release)r`�locks��r�f�%CreateTests.test_in_thread.<locals>.f{s#���!�(�(�*�F��L�L�N��L�L�Nr@��target)�	threading�Lock�Thread�start�joinr[r
r\)rJrh�tr`rgs&  @@r�test_in_thread�CreateTests.test_in_threadxsf����~�~�����	�

���A�&��
�T�
�G�G�I��	�����
�
�f�l�3�3�5�6��T�s�B�B#	�B#	c��[O2vo[O2o[U[	Q22o[O
[
U22oUO[O2VU,2P!)z�
            from concurrent import interpreters
            interp = interpreters.create()
            print(interp.id)
            )r
r\rXrrrZ�intrI)rJ�mainr`�out�interp2s&    r�test_in_subinterpreter�"CreateTests.test_in_subinterpreter�sl���%�%�'����$�$�&���&�&�*�#���
�*�*�3�s�8�4������.�.�0�4��2I�Jr@c��[[O22o,o[]2FD)o[O2oUOU2J+	SFDoUO
2J	[O2oUO[[O22V.*2P!��)�setr
r\�rangerX�append�closerI)rJ�before�
interp_lstr>�interpsr`s&     r�test_after_destroy_all�"CreateTests.test_after_destroy_all�s����\�*�*�,�-���
��q��A�"�)�)�+�G����g�&��!�F��L�L�N�!��$�$�&������\�2�2�4�5�v��7H�Ir@c��[[O22o[O2o[O2o[O2oUO	2UO	2[O2oUO[[O22VU.*2P!rD)r~r
r\rXr�rI)rJr��interp1rx�interp3r`s&     r�test_after_destroy_some�#CreateTests.test_after_destroy_some�s����\�*�*�,�-���%�%�'���%�%�'���%�%�'���
�
���
�
���$�$�&������\�2�2�4�5�v�&�@Q�7Q�Rr@rO)r.r0r/rPrarrryr�r�rQrRrSs@rrVrVns(����N�7�	K�J�S�Sr@rVc�4`�\sQs]�snQsQsQsQsUsP!)�GetMainTestsc�j�[O2oUOUO]2P!r#)r
�get_mainrI�id�rJrvs& r�test_id�GetMainTests.test_id�s$���$�$�&��������!�$r@c�~�[O2o[O2oUOV2P!rD)r
r��get_current�assertIs�rJrv�currents&  r�test_current�GetMainTests.test_current�s*���$�$�&���*�*�,���
�
�d�$r@c�~�[O2o[O2oUOV2P!rD)r
r�r�)rJ�main1�main2s&  r�test_idempotent�GetMainTests.test_idempotent�s*���%�%�'���%�%�'���
�
�e�#r@rO)	r.r0r/rPr�r�r�rQrRrSs@rr�r��s����%�%�
$�$r@r�c�D`�\sQs]�snQsQsQs\Q2sQs	Us
P!)�GetCurrentTestsc�~�[O2o[O2oUOV!2P!rD)r
r�r�rIr�s&  r�	test_main�GetCurrentTests.test_main�s,���$�$�&���*�*�,������'r@c��[O2o[O2o[U[	Q22o[O
[
U22oUOVB2UOVA2P!)z�
            from concurrent import interpreters
            cur = interpreters.get_current()
            print(cur.id)
            )	r
r�rXrrrZrurI�assertNotEqual)rJrvr`rwr�s&    r�test_subinterpreter�#GetCurrentTests.test_subinterpreter�sh���$�$�&���$�$�&���&�&�*�#���
�*�*�3�s�8�4������)����G�*r@c��UOQ29^tt^2[O2o[O2oUOV2PPP2UOQ29^tt^2[O2o[U[
Q22oQUO22vqVUOVV2PPP2UOQ29^tt^2[O2o[U[
Q22o[U2o[U2oUOVx2PPP2P!)%fhK�9h)%fhK�9h)%fhP!9h)rv�subinterpreterz�
                from concurrent import interpreters
                cur = interpreters.get_current()
                print(id(cur))
                cur = interpreters.get_current()
                print(id(cur))
                c3�D�SF �Do[U2w�	J	P!3hrD)ru)�.0�vs& r�	<genexpr>�2GetCurrentTests.test_idempotent.<locals>.<genexpr>�s��.>���.>��c�!�f�f�.>�s� zper-interpreterz�
                from concurrent import interpreters
                cur = interpreters.get_current()
                print(id(cur))
                )�subTestr
r�r�rXrr�
splitlinesrIrur�r�)	rJ�cur1�cur2r`rw�objid1�objid2�id1�id2s	&        rr��GetCurrentTests.test_idempotent�s��
�\�\�&�
!�
!��+�+�-�D��+�+�-�D��M�M�$�%�"�
�\�\�*�
+�
+�!�(�(�*�F��f�f�.�'��C�@�c�n�n�.>�?�N�F����V�,�,��\�\�+�
,�
,�!�(�(�*�F��f�f�.�'��C�
�c�(�C��V�*�C�����)�-�
,�#"�
!��
,�
+��-�
,�
,�s7�<E	�8AE�-AE/�	E	�E	�E,	�%E,	�/F	�8F	c���[O2oUOQ[OQ02o[U2vq4UO
V12UO
U[2P!)�
            import z{ as interpreters
            interp = interpreters.get_current()
            print((interp.id, interp.whence))
            )r�next_interpreter_id�run_temp_from_capir
r.�evalrI�WHENCE_STR_CAPI)rJ�expected�text�interpid�whences&    r�test_created_with_capi�&GetCurrentTests.test_created_with_capi�sg��$�8�8�:���&�&�,� �)�)�*�+
�(���
 ��:�������,������1r@rO)r.r0r/rPr�r�r�rr�rQrRrSs@rr�r��s(����(�

+�*�:�	2��	2r@r�c�@`�\sQs]�snQsQsQsQsQsQs	Us
P!)�ListAllTestsc�h�[O2oUO][U22P!��)r
r\rI�len)rJr�s& r�test_initial�ListAllTests.test_initial�s$���'�'�)������C��L�)r@c�^�[O2o[O2o[O2o,o[O2FDoUO	UO
2J 	UO
VAO
UO
UO
,2P!rD)r
r�rXr\r�r�rI�rJrvrKrL�idsr`s&     r�test_after_creating� ListAllTests.test_after_creatingsw���'�'�)���#�#�%���$�$�&����"�+�+�-�F��J�J�v�y�y�!�.�	
����w�w����&�)�)�<�=r@c�h�[O2o[O2o[O2oUO2,o[O2FDoUOUO2J 	UOVAOUO,2P!rD)r
r�rXr�r\r�r�rIr�s&     r�test_after_destroying�"ListAllTests.test_after_destroyingsz���'�'�)���#�#�%���$�$�&��
���
���"�+�+�-�F��J�J�v�y�y�!�.�	
����w�w��	�	�2�3r@c�&�[O2o[O2o[O2oVU,o[O2oUO	VT2[VT2FDvqgUO
Vg2J	P!rD)r
r�rXr\rI�zipr�)rJrvrKrLr��actualr�rxs&       rr��ListAllTests.test_idempotentsp���'�'�)���#�#�%���$�$�&����(���&�&�(������*� #�F� 5��G��M�M�'�+�!6r@c�N�[O2uq[O2o[O2o[O2oU]*oU]*oU[1U[1U[1U[1U[
1U[1,oUPQo	UO
Q[OQ02o
[U
2o[O2Tt,tFDp�OUO1MJ	o
oUOV�2UOV�2P!ttoh)r�r�z� as interpreters
            interp = interpreters.create()
            print(
                [(i.id, i.whence) for i in interpreters.list_all()])
            ���)r	r�rX�WHENCE_STR_RUNTIME�WHENCE_STR_STDLIBr�r�r
r.r�r\r�r�rI)rJ�mainidr>�	interpid1�	interpid2�	interpid3�	interpid4�	interpid5r��	expected2r��res�i�res2s&             rr��#ListAllTests.test_created_with_capi$s��"�+�+�-�
��!�(�(�*�	�!�(�(�*�	�!�(�(�*�	���M�	���M�	�
�'�(�
�)�*�
�)�*�
�)�*�
��(�
�)�*�

���S�b�M�	��&�&�,� �)�)�*�+
�(����4�j��*6�*?�*?�*A�B�*A�Q���q�x�x� �*A��B�����'�����)��Cs�"D"rO)r.r0r/rPr�r�r�r�r�rQrRrSs@rr�r��s#����*�	>�
4�
,�*�*r@r�c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
s\O"2\Q22s\O"2\O*\O.Q6HQ2Q22sQsUsP!)�InterpreterObjectTests�@c��[O2Oo[OU2oUO	UOU2P!rD)r
r�r�rZrI�rJr�r`s&  r�
test_init_int�$InterpreterObjectTests.test_init_intBs:���+�+�-�0�0���)�)�(�3��������H�-r@c��[O2Oo[OU2oUO	UOU2P!rD)r
r��_idrZrIr�s&  r�test_init_interpreter_id�/InterpreterObjectTests.test_init_interpreter_idGs:���+�+�-�1�1���)�)�(�3��������X�.r@c��[O2Oo[U2[	U2[2PP1FDjoUO
[U229^tt^2UO[29^tt^2[OU2PPP2PPP2Jl	P!)%fhK9h)%fhJ�9hrD)r
r�r�r9�float�objectr��reprr]�	TypeErrorrZ)rJ�actualidr�s&  r�test_init_unsupported�,InterpreterObjectTests.test_init_unsupportedLs����+�+�-�0�0����M��(�O��H���
�H����d�8�n�-�-��&�&�y�1�1� �,�,�X�6�2�.�-�
�2�1��.�-�-�s0�(C	�B3
�C	�3C�<C�>C	�C
�C
c��[O2o[OUO2oUO	V!2P!rD)r
r�rZr�r��rJrvr`s&  rr��&InterpreterObjectTests.test_idempotentYs0���$�$�&���)�)�$�'�'�2���
�
�f�#r@c��UO[29^tt^2[OQ2PPP2P!)%fhP!9h�i@B)r]rr
rZ�rJs&r�test_init_does_not_exist�/InterpreterObjectTests.test_init_does_not_exist^s1��
�
�
�7�
8�
8��$�$�Y�/�9�
8�
8�
8���A�A	�	A	c��UO[29^tt^2[OP2PPP2P!)%fhP!9hr�)r]�
ValueErrorr
rZrs&r�test_init_bad_id�'InterpreterObjectTests.test_init_bad_idbs0��
�
�
�z�
*�
*��$�$�R�(�+�
*�
*�
*�rc�F�[O2o[O2o[O2oUO	UO
[2UO	UO
[2UO	UO
[2P!rD)r
r�r�rXrYr�ru)rJrvr�r`s&   r�test_id_type�#InterpreterObjectTests.test_id_typefsh���$�$�&���*�*�,���$�$�&�����d�g�g�s�+����g�j�j�#�.����f�i�i��-r@c��[O2oUO[29^tt^2QUmPPP2P!)%fhP!9hr�)r
rXr]�AttributeErrorr�r_s& r�test_id_readonly�'InterpreterObjectTests.test_id_readonlyns7���$�$�&��
�
�
�~�
.�
.�!�F�I�/�
.�
.�
.�s�A�A	�A	c�N�[O2o[O2oUOQ29^tt^2UO	UO
[2PPP2UOQ29^tt^2UO	UO
[2PPP2UOQ29^tt^2UOQ[OQ02o[U2oUO	U[2PPP2UOQ29^tt^2P[[[[1FD[oUO[29^tt^2VRmPPP2UO[29^tt^2VQmPPP2J]	PPP2P!)%fhCKT9h)%fhCK&9h)%fhK�9h)%fhK�9h)%fhJ�9h)%fhP!9h)rv�from _interpreters�
from C-APIz
                import z� as interpreters
                interp = interpreters.get_current()
                print(repr(interp.whence))
                �readonly)r
r�rXr�rIr�r�r�r�r.r�r��WHENCE_STR_UNKNOWNr]r)rJrvr`r�r��values&     r�test_whence�"InterpreterObjectTests.test_whencess~���$�$�&���$�$�&��
�\�\�&�
!�
!����T�[�[�*<�=�"��\�\�.�
/�
/����V�]�]�,=�>�0��\�\�,�
'�
'��*�*�0�$�-�-�.�/�,��D�
�$�Z�F����V�_�5�(��\�\�*�
%�
%��"�"�!�����&�&�~�6�6�$)�M�7��&�&�~�6�6�"'�K�7�6��&�
%�"�
!�
!��0�
/�
/��(�
'��"7�6��6�6�6��&�
%�
%�s��!F1�!G�	AG�/9H�(G,
�/%H�G?
�H�1G	�:G	�G	�G	�G)	�"G)	�,G<�5G<�7H�?H�H�
	H�H$	�H$	c��[O2o[UO2o[U2oUO	V22P!rD)r
rX�hashr�rI)rJr`r�r�s&   r�
test_hashable�$InterpreterObjectTests.test_hashable�s4���$�$�&����	�	�?���f�������*r@c��[O2o[O2oUOV2UOV2P!rD)r
rXrIr�)rJr�rxs&  r�
test_equality�$InterpreterObjectTests.test_equality�s:���%�%�'���%�%�'������*����G�-r@c	�j�[O2o[[O]*2FDcoUOUQ59^tt^2[OV2o[OU2oUOVA2PPP2Je	P!)%fhJz9h)r�)�protocol)	r
rXrr�HIGHEST_PROTOCOLr�r�loadsrI)rJr`r�data�	unpickleds&    r�test_pickle�"InterpreterObjectTests.test_pickle�sw���$�$�&���f�5�5��9�:�H����x��0�0��|�|�F�5��"�L�L��.�	�� � ��3�1�0�;�0�0�0�s�>B!	�!B2
�*B2
c���[OQ2oQoUOU2vq4UOU2UO	QU2UOQU2P!)z-isaif True:
        from concurrent import interpreters
        interpreters.create()
        exit()sInterpreter.close()s	Traceback)rr�communicate�assertIsNoner[�assertNotIn)rJ�replr)�stdout�stderrs&    r�test_cleanup_in_repl�+InterpreterObjectTests.test_cleanup_in_repl�s\��
�)�)�$�/�����)�)�&�1������&�!��
�
�,�f�5�����v�.r@�ntz"signals don't work well on windowsc��]PHoQo[QV!OQ59^tt^2oUOUOO]2Q2UO
[O2UOO2UOO2oUOQU2UO2oUOU][O'12PPP2P!)%fhP!9h)ra!if True:
        from concurrent import interpreters
        from threading import Thread

        def test():
            import time
            print('a', flush=True, end='')
            time.sleep(10)

        interp = interpreters.create()
        interp.call_in_thread(test)
        �-c)r,�asKeyboardInterrupt)
�
subprocessr�PIPErIr+�read�send_signal�signal�SIGINTr,�flushr[�wait)rJr3�source�proc�error�retcodes&     r�0test_keyboard_interrupt_in_thread_running_interp�GInterpreterObjectTests.test_keyboard_interrupt_in_thread_running_interp�s���	�	���$����
?�
?�4����T�[�[�-�-�a�0�$�7����V�]�]�+��K�K�����K�K�$�$�&�E��M�M�.��6��i�i�k�G�
�M�M�'�A��
�
�~�#6�7�@�
?�
?�
?�s�CC5�5D	�>D	rO)r.r0r/rPr�r�r�r�rrr	r
rrrr$r�requires_subprocessrr-�unittest�skipIf�osr(r?rQrRrSs@rr�r�@s�����.�
/�
7�$�
0�)�.�"�
(�@+�.�4�
� � �"��/��#�/�
� � �"�
�_�_�R�W�W��_�&J�K�8�L�#�8r@r�c�v`�\sQsQsnQs\OQ2Q2sQsQs	Qs
QsQ	sQ
s
UsP!)�TestInterpreterIsRunning��c�p�[O2oUOUO22P!rD)r
r��
assertTrue�
is_runningr�s& rr��"TestInterpreterIsRunning.test_main�s#���$�$�&��������)�*r@�Fails on FreeBSDc�J�[O2oUOUO22[	U29^tt^2UOUO22PPP2UOUO22P!)%fhK19hrD)r
rX�assertFalserJrrIr_s& rr��,TestInterpreterIsRunning.test_subinterpreter�sl���$�$�&������*�*�,�-�
�f�
�
��O�O�F�-�-�/�0������*�*�,�-��
�s�	 B�B"	�B"	c��UO2vq[O2oUOQUQ02UO	UO22UO
[OU]2Q2P!)�4if True:
            import os
            os.write(z, b'x')
            �x)	�piper
rXr&rNrJrIrDr5)rJ�r�wr`s&   r�
test_finished�&TestInterpreterIsRunning.test_finished�sp���y�y�{����$�$�&�������S�
��	�	
����*�*�,�-��������A���-r@c��[O2o[U[QUOQ022oUOUO
2Q2P!)zJ
            import _interpreters
            if _interpreters.is_running(zZ):
                print(True)
            else:
                print(False)
            �True)r
rXrrr�rI�strip)rJr`rws&  r�test_from_subinterpreter�1TestInterpreterIsRunning.test_from_subinterpreter�sS���$�$�&���&�&�.)�)/����4
�*�#���	
�������f�-r@c���[O2oUO2UO[29^tt^2UO2PPP2P!)%fhP!9hrD)r
rXr�r]rrJr_s& r�test_already_destroyed�/TestInterpreterIsRunning.test_already_destroyed�sF���$�$�&������
�
�
�7�
8�
8�����9�
8�
8�
8���A�A0	�(A0	c��UO2vqUO2vq4QoQo[O2oUOQUQU8QUQU8Q0	2UO	UO22[OVE2UOQ2UO[OU]2U2P!)�D�F�qif True:
            import os
            import threading

            def task():
                v = os.read(�!, 1)
                assert v == �
                os.write(�, �R)
            t = threading.Thread(target=task)
            t.start()
            �t.join())
rSr
rXr&rNrJrD�writerIr5)rJ�r_interp�w_interp�r_thread�w_thread�DONE�FINISHEDr`s&       r�!test_with_only_background_threads�:TestInterpreterIsRunning.test_with_only_background_threadss���!�Y�Y�[���!�Y�Y�[��������$�$�&������
&�J�'�!�H�%�"��2�h�\�2
�
�
	�	
����*�*�,�-�
���� ����J���������1�-�x�8r@c�x`�[Q[OQ02oU1QkoROQ29^tt^2RO	29^tt^2oROV1P	Q5oPPP2UW2oRO
U2PPP2ROQ29^tt^2ROU2oUU2oROU2PPP2ROQ29^tt^2RO29^tt^2vqcUO2oROUP	Q59^tt^2UO2oPPP2UO2o	PPP2ROW2RO
W2ROW	2PPP2ROQ29^tt^2RO29^tt^2vqcUO2oROUP
Q59^tt^2UO2oPPP2UO2o	PPP2ROW2ROW2ROW	2PPP2ROQ29^tt^2RO29^tt^2vqjUO2oPPP2ROW2PPP2P!)%fhCK~9h)%fhCKq9h)%fhCK99h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKD9h)%fhCK@9h)%fhCK9h)%fhK�9h)%fhP!9h)	r�zt as interpreters
            interp = interpreters.get_current()
            print(interp.is_running())
            c�:�ROUP2[U2![c[[S22gh9h)�)r�r�rr�)r�rJs&�r�
parse_results�FTestInterpreterIsRunning.test_created_with_capi.<locals>.parse_results s@�������b�)�
,��D�z�!���
,���T�
�+�+�
,�s�
!�	A�A�running __main__ (from self)�rv�%running, but not __main__ (from self)�running __main__ (from other)�&running, but not __main__ (from other)�not running (from other))rr
r.r��interpreter_from_capi�
run_from_capirIr�rN�interpreter_obj_from_capirJ�running_from_capi)rJr)rvr�r��runningr`r��during�afterr>sf          rr��/TestInterpreterIsRunning.test_created_with_capis������ �)�)�*�+
����
	,��\�\�8�
9�
9��+�+�-�-���)�)�(��)�F��.�#�D�)�G��O�O�G�$�	:��\�\�A�
B�
B��*�*�6�2�D�#�D�)�G����W�%�C�
�\�\�9�
:�
:��/�/�1�1�5G�f��*�*�,���+�+�H�4�+�@�@�#�.�.�0�F�A��)�)�+��	2�

���V�$��O�O�F�#����U�#�;��\�\�B�
C�
C��/�/�1�1�5G�f��*�*�,���+�+�H�5�+�A�A�#�.�.�0�F�B��)�)�+��	2�

���V�$����V�$����U�#�D��\�\�4�
5�
5��/�/�1�1�[�f� �+�+�-��2����W�%�6�
5�=.�-�-��:�
9�
9��C�
B�
B��A�@�@��2�1�1��;�
:�
:��B�A�A��2�1�1��D�
C�
C��2�1��6�
5�
5�s
�K5�K!	�,!K5�.+L	�:M�.L1	�L
�L1	�*;M�N�.M-	�
M
�M-	�6;N�N(�+N	�>N(�!K2
�*K2
�,	K5�5L	�>L	�	L	�L	�L.�&L.�(	L1	�1M
�:M
�<	M�M	�M	�M*�"M*�$	M-	�-M>
�6M>
�8	N�N	�
N	�N%
�N%
� N(�(N9	�1N9	rO)r.r0r/rPr�rB�skipr�rVr[r^rqr�rQrRrSs@rrFrF�sF����+�
�]�]�%�&�.�'�.�.�	.� �9�2/&�/&r@rFc�`�\sQsQsnQsQsQsQsQsQs	Qs
\OQ	2Q
2s
QsQsQ
sQsQsUsP!)�TestInterpreterClose�Lc��[O2o[O2o[O2o[O2oUO[	[O
22VV4.2UO
2UO[	[O
22VU.2P!rD)r
r�rXrIr~r\r�)rJrvr�rxr�s&    r�
test_basic�TestInterpreterClose.test_basicNs����$�$�&���%�%�'���%�%�'���%�%�'������\�2�2�4�5���:�	<��
�
������\�2�2�4�5���1�	3r@c���[[O22o[2o[]2FD)o[O2oUOU2J+	UO
[[O22V*2SFDoUO2J	UO
[[O22U2P!r|)r~r
r\rrX�addrIr�)rJr�r�r>r`s&    r�test_all�TestInterpreterClose.test_allYs����\�*�*�,�-���%���q��A�!�(�(�*�F��K�K����	
����\�2�2�4�5�v�7G�H��F��L�L�N������\�2�2�4�5�v�>r@c�H``�[O2vnRO[29^tt^2RO	2PPP2UU1Qko[
OUQ5oUO2UO2P!)%fhKP9h)Nc�:�RO[29^tt^2RO2PPP2P!)%fhP!9hrD)r]r
r�)rvrJs��rrh�)TestInterpreterClose.test_main.<locals>.fis-����"�"�#3�4�4��
�
��5�4�4�4�s�;�A	�A	rj)	r
r\r]r
r�rlrnrorp)rJrhrqrvsf  @rr��TestInterpreterClose.test_maindse����%�%�'���
�
�
�/�
0�
0��J�J�L�1�	�
���A�&��	���	�	����1�
0�s�B�B!	�B!	c���[O2oUO2UO[29^tt^2UO2PPP2P!)%fhP!9hrD)r
rXr�r]rr_s& rr^�+TestInterpreterClose.test_already_destroyedqsC���$�$�&������
�
�
�7�
8�
8��L�L�N�9�
8�
8�
8�r`c�D�[O2vo[O2o[U[	QUO
Q022oUO
UO2Q2UO
[[O22V.2P!)z_
            from concurrent import interpreters
            interp = interpreters.Interpreter(z�)
            try:
                interp.close()
            except interpreters.InterpreterError:
                print('failed')
            �failed)	r
r\rXrrr�rIrZr~)rJrvr`rws&   r�test_from_current�&TestInterpreterClose.test_from_currentws����%�%�'����$�$�&���&�&�./�/5�y�y�k�:
�*�#���	
�������h�/�����\�2�2�4�5��~�Fr@c��[O2vo[O2o[O2oUO[	[O22VU.2UO[
QUOQ022UO[	[O22V.2P!)z`
            from concurrent import interpreters
            interp2 = interpreters.Interpreter(zr)
            interp2.close()
            interp3 = interpreters.create()
            interp3.close()
            )r
r\rXrIr~r&rr�)rJrvr�rxs&   r�test_from_sibling�&TestInterpreterClose.test_from_sibling�s����%�%�'����%�%�'���%�%�'������\�2�2�4�5���1�	3����V�!0�07�
�
�|�<
���	�	
����\�2�2�4�5���Gr@c�`�[O2nU1Qko[OUQ5oUO	2UO2P!)c�*:�RO2P!rD)r�)r`s�rrh�6TestInterpreterClose.test_from_other_thread.<locals>.f�s����L�L�Nr@rj)r
rXrlrnrorp)rJrhrqr`s&  @r�test_from_other_thread�+TestInterpreterClose.test_from_other_thread�s:����$�$�&��	�
���A�&��	���	�	���r@rLc	��[O2vo[O2o[U29^tt^2UO	[
29^tt^2UO
2PPP2UOUO22PPP2P!)%fhK99h)%fhP!9hrD)	r
r\rXrr]r
r�rIrJr�s&  r�test_still_running�'TestInterpreterClose.test_still_running�s{���%�%�'����$�$�&��
�f�
�
��"�"�#3�4�4�����5��O�O�F�-�-�/�0��
�4�4���
�
�s0�B4�B!	�0'B4�!B1
�*B1
�,B4�4C	�=C	c��UO2vqUO2vq4Qo[O2oUOQUQU8Q02UO	2UO[OU]2U2P!)rca�if True:
            import os
            import threading
            import time

            done = False

            def notify_fini():
                global done
                done = True
                t.join()
            threading._register_atexit(notify_fini)

            def task():
                while not done:
                    time.sleep(0.1)
                os.write(rgrh�rSr
rXr&r�rIrDr5)rJrkrlrmrnrpr`s&      r�test_subthreads_still_running�2TestInterpreterClose.test_subthreads_still_running�s��!�Y�Y�[���!�Y�Y�[������$�$�&������ #��2�h�\�2
�!�	�(	�����������1�-�x�8r@c
��[Q[OQ02oUOQ29^tt^2UO	29^tt^2oUO[Q29^tt^2UOV!P	Q5PPP2PPP2PPP2UOQ29^tt^2UO[Q29^tt^2UOU2PPP2PPP2UOQ29^tt^2UO29^tt^2vq2UOUP	Q59^tt^2UO[Q29^tt^2UO2PPP2UOUOU22PPP2PPP2PPP2UOQ29^tt^2UO29^tt^2vq2UOUP
Q59^tt^2UO[Q29^tt^2UO2PPP2UOUOU22PPP2PPP2PPP2UOQ	29^tt^2UO29^tt^2vq2UO[Q29^tt^2UO2PPP2UOUOU22PPP2PPP2P!)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKs9h)%fhCK9h)%fhCK9h)%fhCK�9h)%fhCK9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKG9h)%fhCK39h)%fhP!9h)
r�zh as interpreters
            interp = interpreters.get_current()
            interp.close()
            rxzInterpreterError.*unrecognizedryrzr{�unrecognizedr|r})rr
r.r�r~�assertRaisesRegexrrr�r�r�r
r�rI�
interp_exists)rJr)r�r`s&   rr��+TestInterpreterClose.test_created_with_capi�s)���� �)�)�*�+
�����\�\�8�
9�
9��+�+�-�-���+�+�O�,L�N�N��&�&�x�d�&�C�N�.�:��\�\�A�
B�
B��'�'��(H�J�J��'�'��/�J�C�
�\�\�9�
:�
:��/�/�1�1�5G�f��+�+�H�4�+�@�@��/�/�0@�.�Q�Q�����R��O�O��*�*�8�4�6�	A�2�;��\�\�B�
C�
C��/�/�1�1�5G�f��+�+�H�5�+�A�A��/�/�0@�.�Q�Q�����R��O�O��*�*�8�4�6�	B�2�D��\�\�4�
5�
5��/�/�1�1�5G�f��+�+�,<�n�M�M��L�L�N�N�����&�&�x�0�2�2�6�
5�?N�N�N��.�-�-��:�
9�
9��J�J�J��C�
B�
B��R�Q�Q��A�@�@��2�1�1��;�
:�
:�� R�Q�Q��B�A�A��2�1�1��D�
C�
C��N�M�M��2�1�1��6�
5�
5�s��L<�L(	�0L
�L(	�L<�5M$�M	�&M$�N4�(N 	�N
�%M8�6(N
�N 	�&N4�P�(O0	�O
�%O�6(O
�O0	�&P�Q�(!P,	�	P
�(P,	�Q�L%�L%�	L(	�(L9
�1L9
�3	L<�<M
	�M
	�M!
�M!
�	M$�$M5	�-M5	�8N	�N	�	N
�N�N�	N 	� N1
�)N1
�+	N4�4O	�=O	�O�O�	O
�O-�%O-�'	O0	�0P
�9P
�;	P�P	�
P	�P)�!P)�#	P,	�,P=
�5P=
�7	Q�Q	�	Q	c��UO2vqQo[O2oUOQUQU8Q02UO	2UO[OU]2U2P!)rcz�if True:
            import os
            import threading
            import time

            def task():
                time.sleep(1)
                os.write(rgz�)

            threads = (threading.Thread(target=task) for _ in range(3))
            for t in threads:
                t.start()
            r�)rJrkrlrpr`s&    r�test_remaining_threads�+TestInterpreterClose.test_remaining_threads�ss��!�Y�Y�[������$�$�&������#��2�h�\�2
��	�	�����������1�-�x�8r@c�$�Qo[QU2P!)aif True:
        import _interpreters
        import types
        interp = _interpreters.create(
            types.SimpleNamespace(
                use_main_obmalloc=False,
                allow_fork=False,
                allow_exec=False,
                allow_threads=True,
                allow_daemon_threads=True,
                check_multi_interp_extensions=True,
                gil='own',
            )
        )
        _interpreters.exec(interp, f"""if True:
            import threading
            import time

            def task():
                time.sleep(3)

            threads = (threading.Thread(target=task, daemon=True) for _ in range(3))
            for t in threads:
                t.start()
            """)
        _interpreters.destroy(interp)
        r1)r)rJ�codes& r�test_remaining_daemon_threads�2TestInterpreterClose.test_remaining_daemon_threadss��
��6	��t�$r@rO)r.r0r/rPr�r�r�r^r�r�r�rBr�r�r�r�r�r�rQrRrSs@rr�r�Lsb����	3�	?���G�
H���]�]�%�&�1�'�1�9�>-2�`9�6 %� %r@r�c�\`�\sQsQsnQsQsQsQsQsQs	Qs
\Q	2sQ
s
UsP!)�TestInterpreterPrepareMain�4c���[O2oUO[29^tt^2UO	2PPP2P!)%fhP!9hrD)r
rXr]r�prepare_mainr_s& r�
test_empty�%TestInterpreterPrepareMain.test_empty6s<���$�$�&��
�
�
�z�
*�
*����!�+�
*�
*�
*�s�A�A 	�A 	c���Q]*QQ-o[O2oUOU2[U[	Q22oUOUO
2Q2P!��spam�eggs�ham�+
            print(spam, eggs)
            �42 ham�r
rXr�rrrIrZ�rJ�valuesr`rws&   r�	test_dict�$TestInterpreterPrepareMain.test_dict;s\���"�f�e�,���$�$�&�����F�#��&�&�*�#���	
�������h�/r@c��Q]*QQ-o[UO22o[O2oUO	U2[U[
Q22oUOUO2Q2P!r�)	�tuple�itemsr
rXr�rrrIrZr�s&   r�
test_tuple�%TestInterpreterPrepareMain.test_tupleDsl���"�f�e�,���v�|�|�~�&���$�$�&�����F�#��&�&�*�#���	
�������h�/r@c���Q]*QQ-o[O2oUOQ-U@[U[	Q22oUOUO
2Q2P!)r�r�r�r�r�rOr�r�s&   r�test_kwargs�&TestInterpreterPrepareMain.test_kwargsNs_���"�f�e�,���$�$�&�����%�f�%��&�&�*�#���	
�������h�/r@c���Q]*QQ-o[O2oUOUQQ5[U[	Q22oUOUO
2Q2P!)r�r�r��bar)�fooz0
            print(spam, eggs, foo)
            z
42 ham barr�r�s&   r�test_dict_and_kwargs�/TestInterpreterPrepareMain.test_dict_and_kwargsWsa���"�f�e�,���$�$�&�����F���.��&�&�*�#���	
�������l�3r@c��[O2oUO[O29^tt^2UO	QQQQ-Q5PPP2UO[
29^tt^2UO
Q2PPP2UO[
29^tt^2UO
Q2PPP2P!)%fhK�9h)%fhK\9h)%fhP!9h)r�r�r�r��r�z
print(foo)zprint(spam))r
rXr]�NotShareableErrorr�rr&r_s& r�test_not_shareable�-TestInterpreterPrepareMain.test_not_shareable`s����$�$�&��
�
�
�|�=�=�
>�
>����f�f�e�U�%C��D�?��
�
��
/�
/��K�K��%�0�
�
�
��
/�
/��K�K�
�&�0�
/�
?�
>��0�
/��
/�
/�
/�s5�C
�:C �1C3�
C	�C	� C0	�)C0	�3D	�<D	c	�~�[O2oUOQP	-2UOU29^tt^2UO	[
Q29^tt^2UOQP
-2PPP2PPP2UO
Q2P!)%fhK+9h)%fhK69h)r�r��assert spam is True)r
rXr�r�r�r
r&r_s& r�test_running�'TestInterpreterPrepareMain.test_runningks����$�$�&�����V�T�N�+�
�\�\�&�
!�
!��'�'�(8�)�D�D��#�#�V�U�O�4�E�"�	���)�*�E�D��"�
!�s0�B,�"B	�6B,�B)
�"B)
�$B,�,B<	�5B<	c	��UO29^tt^2vqUO[Q29^tt^2UOQP	-2PPP2UO[Q29^tt^2UOUQ2PPP2PPP2P!)%fhKS9h)%fhK-9h)%fhP!9h)r�r��	NameError)r�r�r
r�rr)rJr`r�s&  rr��1TestInterpreterPrepareMain.test_created_with_capiss���
�
+�
+�
-�
-�1C�&��'�'�(8�.�I�I��#�#�V�T�N�3�J��'�'���E�E��"�"�8�V�4�F�.�
-�I�I��E�E��.�
-�
-�sL�!C�B	�&C�5B-	�C�B*
�#B*
�%C�-B=
�6B=
�8C�C	�	C	rO)r.r0r/rPr�r�r�r�r�r�r�rr�rQrRrSs@rr�r�4s<����"�
0�0�0�4�	'�+��5��5r@r�c�`�\sQsQsnQsQs\Q2sQs\	O2Q2s\OQ2Q2sQ	sQ
sQsQsQ
sQsUsP!)�TestInterpreterExec�|c�6�[O2o[Q2vq#U9^tt^2UOU2PPP2UO	2oUO2UOoUOUQ2P!)%fhKP9h)�print("it worked!", end="")�
it worked!)r
rXrr&�final�raise_if_failedr+rI)rJr`r)�resultsrws&    r�test_success� TestInterpreterExec.test_success~sk���$�$�&��*�+H�I���
�W��K�K�����-�-�/�����!��n�n������l�+�
�W�s�B�B	�B	c���[O2oUO[29^tt^2UO	Q2PPP2P!)%fhP!9h)zraise Exception)r
rXr]rr&r_s& r�test_failure� TestInterpreterExec.test_failure�s=���$�$�&��
�
�
��
/�
/��K�K�)�*�0�
/�
/�
/���A�A!	�A!	c�r�UO2oUOQUQQ5oUOQUQQ5oUOU2vqEPUmQUO22voUO
U[QUQUO2QUQ	UQ
UQ022UO
UP2P!)r�z�
            def ham():
                raise RuntimeError('uh-oh!')

            def eggs():
                ham()
            )r�z	script.pya%
            from concurrent import interpreters

            def script():
                import spam
                spam.eggs()

            interp = interpreters.create()
            try:
                interp.exec(script)
            finally:
                interp.close()
            c3�D�SF �DoQU7fJUw�	J	P!3h)z execrO)r��ls& rr��GTestInterpreterExec.test_display_preserved_exception.<locals>.<genexpr>�s��&9���&9��W��\�1�1�&9�s�	 � zC            Traceback (most recent call last):
              File "zn", line 10, in <module>
                interp.exec(script)
                ~~~~~~~~~~~^^^^^^^^
              z�
                raise ExecutionFailed(excinfo)
            concurrent.interpreters.ExecutionFailed: RuntimeError: uh-oh!

            Uncaught in the interpreter:

            Traceback (most recent call last):
              File "za", line 6, in script
                spam.eggs()
                ~~~~~~~~~^^
              File "zS", line 6, in eggs
                ham()
                ~~~^^
              File "zl", line 3, in ham
                raise RuntimeError('uh-oh!')
            RuntimeError: uh-oh!
            )	�temp_dir�make_module�make_script�assert_python_failure�maxDiffr�rIrrZ)rJ�tempdir�modfile�
scriptfiler+r,�interpmod_lines&      r� test_display_preserved_exception�4TestInterpreterExec.test_display_preserved_exception�s����-�-�/���"�"�6�7�:�"����%�%�k�7�B�%��
��3�3�J�?������J�f�&7�&7�&9�J��������-��L�!��#�#�%�&�'� �L�!��I���I�
�%)�"�	�,	
�����$r@c�``�[O2n[Q2vnoU9^tt^2UU1Qko[OUQ5oUO2UO
2PPP2UO2oUO2UOoUOUQ2P!)%fhKP9h)r�c�,:�ROR2P!rD)r&)r`r)s��rrh�-TestInterpreterExec.test_in_thread.<locals>.f�s������F�#r@rjr�)r
rXrrlrnrorpr�r�r+rI)rJr�rhrqrwr`r)s&    @@rrr�"TestInterpreterExec.test_in_thread�s�����$�$�&��*�+H�I����
�W�
$�� � ��*�A�
�G�G�I�
�F�F�H�
��-�-�/�����!��n�n������l�+��W�s�?B8�8C	�C	c	��[O2o]PH
oUOQQQ59^tt^2oUO	P2UO2Qo[
QUOQUQ02oUOU2UO]2UO2oUOVd2PPP2P!)%fhP!9h)rzw+�utf-8)�encodingzspam spam spam spam spamz�
                import os
                try:
                    os.fork()
                except RuntimeError:
                    with open('zE', 'w', encoding='utf-8') as out:
                        out.write('z')
                )r
rX�tempfile�NamedTemporaryFilerjr9rr(r&�seekr5rI)rJr`r�filer�r)�contents&      r�	test_fork�TestInterpreterExec.test_fork�s����$�$�&���
�
(�
(���
(�
@�
@�D��J�J�r�N��J�J�L�1�H��! �
!%�	�	�{�+$�$,�:�.�
��F�
�K�K����I�I�a�L��i�i�k�G����W�/�#A�
@�
@�
@�s�BC�C	�C	rLc	�&�[O2o[U29^tt^2UO[29^tt^2UOQ2PPP2PPP2P!)%fhK9h)%fhP!9h)z
print("spam"))r
rXrr]�RuntimeErrorr&r_s& r�test_already_running�(TestInterpreterExec.test_already_running�sX���$�$�&��
�f�
�
��"�"�<�0�0����O�,�1��
�0�0���
�
�s/�A?�A,	�A?�,A<
�5A<
�7A?�?B	�B	c���[O2oUO[29^tt^2UO	]
2PPP2P!)%fhP!9h)�
)r
rXr]r�r&r_s& r�test_bad_script�#TestInterpreterExec.test_bad_script�s;���$�$�&��
�
�
�y�
)�
)��K�K��O�*�
)�
)�
)�r�c�
�UO2vqQoQo[O2oUOQUQU8Q02[O
V$2UO
[OU]2U2P!)�RrbrQrg�)
            �rSr
rXr&rDrjrIr5)rJrTrU�RANror`s&     r�test_bytes_for_script�)TestInterpreterExec.test_bytes_for_script�su���y�y�{��������$�$�&�������S��3�'�"
��	�	������������A���,r@c�>�UO2vqUO2vq4QoQoQo[O2oUOQUQU8QUQU8QUQU8Q0
2UOQ	UQU8Q02[O
VF2UOQ
2UO
[OU]2U2UO
[OU]2U2UO
[OU]2U2P!)rrbrcrdrerfrgz[)
            t = threading.Thread(target=task)
            t.start()
            os.write(rzif True:
            os.write(rir)	rJrkrlrmrnrrorpr`s	&        r�*test_with_background_threads_still_running�>TestInterpreterExec.test_with_background_threads_still_runnings��!�Y�Y�[���!�Y�Y�[����������$�$�&������
&�J�'�!�H�%�"��2�h�\�2��Z�r�#��)
��	�	�����Z�r�#��)
��	�	���� ����J���������1�-�s�3��������1�-�s�3��������1�-�x�8r@c	��UO29^tt^2vqUO[Q29^tt^2UOQ2PPP2PPP2P!)%fhK9h)%fhP!9h)r��raise Exception("it worked!"))r�r�r
r&)rJr`r>s&  rr��*TestInterpreterExec.test_created_with_capi!sW��
�
+�
+�
-�
-��&��'�'�(8�.�I�I����;�<�J�.�
-�I�I��.�
-�
-�s.�!A2�A	�
A2�A/
�(A/
�*A2�2B	�;B	c�&�]PHoUO2vq#[O2oUO	QUQ02UO[OU]
2O2UO2UO2P!)rzcif True:
            import os
            comp = [str(i) for i in range(10)]
            os.write(z", ''.join(comp).encode())
        )�stringrSr
rXr&rIrDr5�decode�digitsr�)rJr$rkrlr`s&    r�test_list_comprehension�+TestInterpreterExec.test_list_comprehension&sx��	�!�Y�Y�[����$�$�&�������Z� 	��	
�
	
�������2�.�5�5�7����G����r@)r�)r.r0r/rPr�r�rr�rrr�
requires_forkrrBr�rrrrr�r'rQrRrSs@rr�r�|s�����	,�+�
�1%��1%�f,� 
����0��0�.�]�]�%�&�-�'�-��

-�9�>=�

�
r@r�c��Q!)r��r�NrOrOr@r�call_func_return_shareabler,?s���r@c�
�Q!)c��U!rDrO��xs&r�<lambda>�1call_func_return_stateless_func.<locals>.<lambda>Ds��ar@rOrOr@r�call_func_return_stateless_funcr3Cs���r@c��,QN!)r��r��r}rOrOr@r�call_func_return_pickleabler7Gs���r@c�`�]*nU1Qk!)�*c�
:�R!rDrOr/s�rr1�/call_func_return_unpickleable.<locals>.<lambda>Ms���Ar@rOr/s@r�call_func_return_unpickleabler<Ks���
�A��r@c�`�U1QkoU!)c�
:�R!rDrO�rs�r�call_func_closure�0get_call_func_closure.<locals>.call_func_closureQs����r@rO)rr@sf r�get_call_func_closurerBPs�����r@c�6�[VU2oV![U21!rD)r&r�)r)�nsr�s&& r�call_func_exec_wrapperrEVs��
�v�2�
�C��B�r�F�?�r@c�Z`�\sQsQsn\Q2s\Q2sQsQs	Qs
QsQsUs
P!)	�Spami[c��P!rDrOrOr@r�noop�	Spam.noop]s��r@c��UU2!rDrO)�clsr�s&*r�from_values�Spam.from_valuesas���6�{�r@c��VmP!rDr?)rJrs&&r�__init__�
Spam.__init__es���
r@c� �UOV1!rDr?�rJ�args�kwargss&*,r�__call__�
Spam.__call__h����
�
�D�)�)r@c�n�[U[2%f[!UOUO6H!rD)r6rG�NotImplementedr)rJ�others&&r�__eq__�Spam.__eq__ks(���%��&�&�!�!��z�z�U�[�[�(�(r@c� �UOV1!rDr?rSs&*,r�run�Spam.runprXr@r?)r.r0r/rP�staticmethodrI�classmethodrMrPrVr\r_rQrRrSs@rrGrG[sD�����
��
������*�)�
*�*r@rG�excc��UdUgUP6Xc[Q2gUQ6XcU%f	U%c
[V412gU!UQ6XcVU1!UQ6Xc(UeU%f	U%c[VU12g[!UQ6XcAUeU%f	U%c[VU12g[O2O
!UQ6Xc(U%f	U%c
[V412g[
U2!UQ6Xc(U%f	U%c
[V412g[U2!UQ6Xc4U%f	U%c
[V412gQ	Q
[2oUU2![U[2%f[U2g[U2g)Nz
missing op�ident�
full-ident�globalsr��closure�custom�custom-innerc��\sQsQsQsP!)�call_func_complex.<locals>.Eggsi�rO�r.r0r/rPrQrOr@r�Eggsrl����r@rn)rrr.r
r�r�rBrGr6r9r��NotImplementedError)�oprrcrTrUrns"&$*, r�call_func_complexrrtsE��
���	�	�R�x���&�&�	�w���6��T�N�+�+���	�|�	��V�$�$�	�y�������U�&�1�2�2���	�z�	������U�&�1�2�2��'�'�)�,�,�,�	�y���6��T�N�+�+�$�U�+�+�	�x���6��T�N�+�+��E�{��	�~�	��6��T�N�+�+�	�4�	��E�{��
��C�
 �
 ���m��!�"�%�%r@c�`�\sQsQsn\O
Q2sQsQsQs	Qs
QsQsQ	s
Q
sQsQsQ
sQsQsQsQsQsQsQsQsQsQsUsP!)�TestInterpreterCalli�c#� �UO[29^tt^2oUw�PPP2WOOoUO	UO
OUO2P!)%fhKX9h3hrD)r]r�	exception�excinforIr2r.)rJr��cm�uncaughts&&  r�assert_fails� TestInterpreterCall.assert_fails�sY���
�
�
��
/�
/�2��H�0��<�<�'�'��������/�/��1B�1B�C�0�
/�s"�B
�A7�AB
�7B	�B	�B
c�B�UO[O2!rD)rzr
r�rs&r�assert_fails_not_shareable�.TestInterpreterCall.assert_fails_not_shareable�s��� � ��!?�!?�@�@r@c���V6XcP!UOUOUO2UOUOUO2UOUOUO2UOUOUO2UOUO
UO
2UOUOUO2UOUOUO2UO[OU2[OU22UOUOUO2P!rD)rI�co_name�co_flags�	co_consts�co_varnames�co_cellvars�co_freevars�co_namesr�get_code_var_counts�co_code)rJ�code1�code2s&&&r�assert_code_equal�%TestInterpreterCall.assert_code_equal�s���>���������
�
�6����������8�������%�/�/�:�����*�*�E�,=�,=�>�����*�*�E�,=�,=�>�����*�*�E�,=�,=�>����������8�����1�1�%�8��1�1�%�8�	
�	
�������
�
�6r@c�P�V6XcP!UO[U2[U22UOUOUO2UOUOUO2UOUO
UO
2UOUOUO2UOUOUO2UO[OU2[OU22P!rD)r�r2rIr.�__defaults__�__kwdefaults__�__closure__r��__code__rr�)rJ�func1�func2s&&&r�assert_funcs_equal�&TestInterpreterCall.assert_funcs_equal�s����>���
�
�d�5�k�4��;�/����������8�����+�+�U�-?�-?�@�����-�-�u�/C�/C�D�����*�*�E�,=�,=�>����u�~�~�u�~�~�>�����1�1�%�8��1�1�%�8�	
r@c��V6XcP!UO[U2[U22UOUOUO2P!rD)r�r2rIrT)rJ�exc1�exc2s&&&r�assert_exceptions_equal�+TestInterpreterCall.assert_exceptions_equal�s:���<���
�
�d�4�j�$�t�*�-�������D�I�I�.r@c	�L�[O2o[oUOQ29^tt^2UO	U2oUOU2PPP2[oUOQ29^tt^2UO	U2oUOUQ2PPP2[oQoUOQ29^tt^2UO	U2oUOV42PPP2[oUOQ29^tt^2UO	U2oUOU,QN2PPP2[oUOQ29^tt^2UO[O29^tt^2UO	U2PPP2PPP2P!)%fhCKa9h)%fhCK*9h)%fhK�9h)%fhK�9h)%fhKh9h)%fhP!9h)zno args, no returnzno args, returns shareablec��U!rDrOr/s&rr1�:TestInterpreterCall.test_stateless_funcs.<locals>.<lambda>�s��ar@zno args, returns stateless funczno args, returns pickleablezno args, returns unpickleabler+r5)r
rX�call_func_noopr��callr(r,rIr3r�r7r<r]r�)rJr`�funcr�r�s&    r�test_stateless_funcs�(TestInterpreterCall.test_stateless_funcs�s���$�$�&����
�\�\�.�
/�
/��+�+�d�#�C����c�"�0�*��
�\�\�6�
7�
7��+�+�d�#�C����S�)�,�8�/����
�\�\�;�
<�
<��+�+�d�#�C��#�#�C�2�=�+��
�\�\�7�
8�
8��+�+�d�#�C����S�)�,�9�-��
�\�\�9�
:�
:��"�"�<�#A�#A�B�B����D�!�C�;�
:�+0�
/�
/��
8�
7�
7��=�
<��
9�
8��C�B��;�
:�
:�sw�#F1�$G�#G�&G,�%(H�
G?	�H�1G	�:G	�G	�G	�G)	�"G)	�,G<	�5G<	�?H
�H
�
H�H#	�H#	c��[O2oP]
QQQ[Q21FDZoUOQU8029^tt^2UO	[
OU2oUOV22PPP2J\	[
OFDZoUOQU8029^tt^2UO	[
OU2oUOV22PPP2J\	[
OFDqoU[
O7cJUOQU8029^tt^2UO	[
OU2oUOV22PPP2Js	[[[2]Q*,QNQ]Q]-[O]*Q	5[[ ["[$[#Q
2[%Q2[&[(O*,[
O,NQ[
O,O/22NFD�oUOQ
U8029^tt^2UO	[
OU2o[!U2[Ic!UO1[!U2[2L9[3U[42%cUO7V22LUOV22PPP2J�	[O8-2,Q[
O:2NFDyoUOQU8029^tt^2UO=[O>29^tt^2UO	[
OU2PPP2PPP2J{	P!)%fhCJw9h)%fhCJ9h)%fhCJ�9h)%fhCJ�9h)%fhKr9h)%fhJ�9h)N�spam!sspam!z
shareable zstateless func zstateful func ���a�br/�uh-oh!�mymodulec3�n�SF �D&vqU[O7fJUUw�	J(	P!3hrD)�defs�CLASSES_WITHOUT_EQUALITY)r��cr�s&  rr��FTestInterpreterCall.test_stateless_func_returns_arg.<locals>.<genexpr>:s.�� 8��� 8����$�7�7�7��a��e�e� 8�s�5�5zpickleable c3�`�SF �DoU[O7fJUw�	J!	P!3hrD)r��STATELESS_FUNCTIONS)r�rhs& rr�r�Is&��.���.�A��$�2�2�2��a�.�s�.�.z
unpickleable )r�r6r�r5) r
rX�
memoryviewr�r�r��spam_returns_argrIr�r��
TOP_FUNCTIONS�EllipsisrZr�r7r8r2r�ModuleNotFoundErrorr��sys�exit�TOP_CLASSESr�r�r6�
BaseExceptionr��MappingProxyType�NESTED_FUNCTIONSr]r�)rJr`�argr�s&   r�test_stateless_func_returns_arg�3TestInterpreterCall.test_stateless_func_returns_args���$�$�&��
������x� �

�C����
�3�'�2�3�3��k�k�$�"7�"7��=��� � ��*�4�3�
��+�+�C������w�7�8�8��k�k�$�"7�"7��=���'�'��1�9�8�,�
�%�%�C��d�.�.�.������s�g�6�7�7��k�k�$�"7�"7��=���'�'��1�8�7�&�
���H�
�t�G��
�!�S�!���!�!�B�'������h���
�+���H�H�%
�(�
�
�)
�*9�� 0� 0� 6� 6� 8�9�+
�C�0����C�7�3�4�4��k�k�$�"7�"7��=����9��&��M�M�$�s�)�V�4���]�3�3��0�0��:��$�$�S�.�5�4�1
�F
�"�"�2�&�
�4��.�.�4�
�C�
���
�c�W�5�6�6��&�&�|�'E�'E�F�F��K�K�� 5� 5�s�;�G�7�6�
�i4�3�3��9�8�8��8�7�7��:5�4�4��$G�F��7�6�6�s��	2N	�82N#	�>2N8	�3O
	�<5O
	�2#O
	�/(O5	�!O"
�8O5	�N 
�N 
�#N5
�,N5
�8O

�O

�
O
�O
�"O2�+O2�-O5	�5P
�>P
c
���[O2o]]]]]]QQ]Q]-1o[OoUO	U]]]]Q]]]]Q5
oUOVB2P!)r��?�g�h��erhr�r�)r�)r
rXr��spam_full_argsr�rI)rJr`r�r�r�s&    r�test_full_args�"TestInterpreterCall.test_full_argsRsj���$�$�&���q�!�Q��1�f�s�A�s�A�.>�?���"�"���k�k�$��1�a��C�1��Q�!�k�D������'r@c��[O2oPQQQQQQ	Q]Q]	-1oUO[O]]	Q5oUOV22P!)
r�r�r�)r�r�r����������i����rO)r
rXr�r��spam_full_args_with_defaultsrI)rJr`r�r�s&   r�test_full_defaults�&TestInterpreterCall.test_full_defaultsYsW���$�$�&����B��B��B��a��a�0@�A���k�k�$�;�;�q�A�k�F������'r@c�l�[O2o[Q2o-oQ]Q]Q]1-oUO[V#2oUvqgoUQUOU2UO
U-2UO
Vt2UOU[U22UOU[U22P!)zH
            a = 7
            b = 2
            c = a ** b
            r�r�r�r;)	r
rXrr�rEr(rIr�r�)	rJr`r)rDr�r�r�resns�resids	&        r�test_modified_arg�%TestInterpreterCall.test_modified_arg`s����$�$�&������
����C��C��,���k�k�0�&�=�����E��.�!����#������R� �����)����E�2�b�6�*����E�2�e�9�-r@c	�`�[O29^tt^2nU1QkoU1QkoUOQ29^tt^2UQ2oUOUQ2PPP2UQQ2UOQ29^tt^2UQ2oUOUQ2PPP2UQQ	2UOQ
29^tt^2UQ2oUOUQ2PPP2PPP2P!)%fhK�9h)%fhKr9h)%fhK@9h)%fhP!9h)c�L:�[ORU[U22P!rD)rr�r)r(r�r�s&&�r�new_mod�@TestInterpreterCall.test_func_in___main___valid.<locals>.new_modvs����)�)�'�4����Fr@c�:�Qo[QR8Q02[U2*o[ORV2o[OU2oUOOQ2O
2!)�myscriptz?
                import sys
                sys.path.insert(0, z)

                r)rrr�rrwr%rZ)r�r(�filenamer�r�s&   �rr_�<TestInterpreterCall.test_func_in___main___valid.<locals>.runyst���!���#$�$+�;�/����d�|�	$��
)�4�4�W�d�I��#�4�4�X�>���w�w�~�~�g�.�4�4�6�6r@zno indirectiona
                    from concurrent import interpreters

                    def spam():
                        # This a global var...
                        return __name__

                    if __name__ == '__main__':
                        interp = interpreters.create()
                        res = interp.call(spam)
                        print(res)
                    �<fake __main__>�mymodze
                def run(interp, func):
                    return interp.call(func)
                zindirect as func, direct interpa�
                    from concurrent import interpreters
                    import mymod

                    def spam():
                        # This a global var...
                        return __name__

                    if __name__ == '__main__':
                        interp = interpreters.create()
                        res = mymod.run(interp, spam)
                        print(res)
                    z�
                from concurrent import interpreters
                def run(func):
                    interp = interpreters.create()
                    return interp.call(func)
                z!indirect as func, indirect interpa/
                    import mymod

                    def spam():
                        # This a global var...
                        return __name__

                    if __name__ == '__main__':
                        res = mymod.run(spam)
                        print(res)
                    )rr�r�rI)rJr�r_r�r�s&   @r�test_func_in___main___valid�/TestInterpreterCall.test_func_in___main___validrs#����
�
�
!�
!�W�
G�	
7����.�/�/�� ���� � ��'8�9�0� 
�G�"�
����?�@�@�� ���� � ��'8�9�A�"
�G�"�
����A�B�B��
 �
��� � ��'8�9�C�w"�
!� 0�/��(A�@��.C�B��w"�
!�
!�sk�&D6�C=	�!*D6�D	�&*D6�D#	�+D6�=D

�D

�D6�D 
�D 
�D6�#D3
�,D3
�.D6�6E	�?E	c��[O2o[OQQ2Q0o[	QUQ02oUOQ29^tt^2[
V#29^tt^2oUO[O29^tt^2UO[OU2PPP2PPP2PPP2UOQ29^tt^2[
V#P	Q59^tt^2oUO[O29^tt^2UO[OU2PPP2PPP2PPP2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhK[9h)%fhKf9h)%fhP!9h)�.r>�
_spam_okayz
            def zW():
                # This a global var...
                return __name__
            zpickleable, added dynamicallyzlying about __main__)r!)r
rXr.�replacerr�r,r]r�r�r�r�)rJr`�funcnamer)r�s&    r�test_func_in___main___invalid�1TestInterpreterCall.test_func_in___main___invalid�s>���$�$�&���&�&�s�C�0�1��<�����
�
�����\�\�9�
:�
:�$�X�6�6�#��&�&�|�'E�'E�F�F��K�K�� 5� 5�s�;�G�7�;�
�\�\�0�
1�
1�$�X�d�C�C�s��&�&�|�'E�'E�F�F��K�K�� 5� 5�s�;�G�D�2�
1�G�F��7�6��;�
:��G�F��D�C��2�
1�
1�s��F�,(E2	�!E
�5E2	�=F�&F>�<(F+	�$!F
�F+	�
F>�E/�(E/�*E2	�2F
�;F
�=F�F	�F	�F(�!F(�#F+	�+F;
�4F;
�6F>�>G	�G	c
�2�[Q2o[O29^tt^2o[OUQU2o[O
U2oPPP2WOOQ2O2o[U2vqgUvq�Uvo
q�o
oUOUU
QWUU
P	P	,2UOU
P2UOU
Q2UOV�2Uvq�Uvoq�oUOUUQPUPPP,2U	voooo
oUOU	UQUUU
P	P,2UOU
P2UOU
Q2UOUU2UOUU2P!)%fhCK59h)aR
            eggs = True

            def spam(*, explicit=False):
                if explicit:
                    import __main__
                    ns = __main__.__dict__
                else:
                    # For now we have to have a LOAD_GLOBAL in the
                    # function in order for globals() to actually return
                    # spam.__globals__.  Maybe it doesn't go through pickle?
                    # XXX We will fix this later.
                    spam
                    ns = globals()

                func = ns.get('spam')
                return [
                    id(ns),
                    ns.get('__name__'),
                    ns.get('__file__'),
                    id(func),
                    None if func is None else repr(func),
                    ns.get('eggs'),
                    ns.get('ham'),
                ]

            if __name__ == "__main__":
                from concurrent import interpreters
                interp = interpreters.create()

                ham = True
                print([
                    [
                        spam(explicit=True),
                        spam(),
                    ],
                    [
                        interp.call(spam, explicit=True),
                        interp.call(spam),
                    ],
                ])
           �	my-scriptrr$z^<function spam at 0x.*>$r�)rrr�rr�rrwr%rZr�rI�assertIsNot�assertRegexr�)rJr�r�r�r�r+�local�remotervr#�nsidr>�funcidr��nsid1�funcid1�nsid2�funcid2s&                 r�test_func_in___main___hidden�0TestInterpreterCall.test_func_in___main___hidden�s��� �)�)��T�
�
�
!�
!�W�$�0�0��+�t�L�H��0�0��:�C�"�������(�.�.�0���V��
�� ���)-�&��a��D�!�Q������������ 
�	�	
����t�$�����:�;�����)�!���(,�%��q�!�a��A������������ 
�	�,5�(��q�!�W�d�A�q������������%
�	�	
����t�$�����:�;����E�5�)����G�W�-�_"�
!�
!�s�/F�F	�F	c	��[Q2o[O29^tt^2o[OUQU2o[O
U2oPPP2WOOQ2O2o[U2vqgq�UOU	QP
QP
QP
-2UOU]2UOU]2UOU,QN2P!)%fhK�9h)a�
            count = 0

            def inc(x=1):
                global count
                count += x

            def get_count():
                return count

            if __name__ == "__main__":
                counts = []
                results = [count, counts]

                from concurrent import interpreters
                interp = interpreters.create()

                val = interp.call(get_count)
                counts.append(val)

                interp.call(inc)
                val = interp.call(get_count)
                counts.append(val)

                interp.call(inc, 3)
                val = interp.call(get_count)
                counts.append(val)

                results.append(count)

                modified = {name: interp.call(eval, f'{name!r} in vars()')
                            for name in ('count', 'inc', 'get_count')}
                results.append(modified)

                print(results)
           r�r�count�inc�	get_count)rr��)rrr�rr�rrwr%rZr�rI)
rJr�r�r�r�r+r��countsr��modifieds
&         r�"test_func_in___main___uses_globals�6TestInterpreterCall.test_func_in___main___uses_globals=s���0�#�#��H�
�
�
!�
!�W�$�0�0��+�t�L�H��0�0��:�C�"�������(�.�.�0��*.�v�,�'��������U��5���$
�	�
	
�����#������"������+�"�
!�s�/C*�*C:	�3C:	c	��[O2oUO[29^tt^2UO	[
2PPP2UO
[29^tt^2UO	[Q[Q2Q5PPP2P!)%fhKY9h)%fhP!9h)N�???r�)rc)	r
rXr]rr��call_func_failurerzrrrr_s& r�test_raises�TestInterpreterCall.test_raises�s{���$�$�&��
�
�
��
/�
/��K�K�)�*�0��
�
�z�
*�
*��K�K�)�5�j��6H�K�I�+�
*�0�
/��+�
*�
*�s#�B�/"B.�B+	�$B+	�.B?	�7B?	c�@�[O2o[[Q	-P1[Q
-Q1[
Q	-Q1[Q	-,QN1[OQ	-P1[OQ	-[Q	21[OQ-[Q21[Q
-[Q21[]e2Q	-]eQ	-11[Q2OQ	-QQ	-11[Q-Q1[Q-QQ	-11[QQQ-QQQQ-11[Q-[1[Q-UO1[Q-[Q21,2FD]vovq4qVUOQU]*029^tt^2UOU,UN3-U@oUO!Vv2PPP2J_	P!)%fhJt9h)N�spamspamspamr��u'r�r��!!!r��success case #rO)rr+r5)r��rer��rfr��rfr�r�)r��rg�r��rir�)r
rX�	enumerater��call_func_identr,r7rGrIrMr_rrr.r�r�r�rI)rJr`r��callablerTrUr�r�s&       r�test_call_valid�#TestInterpreterCall.test_call_valid�s����$�$�&��5>�
�R��T�*�
�/��^�D�
'��R��;�
(�"�b�)�<�
�Y�Y��B��%�
�
�
�r�2�t�B�x�0�
�
�
�y�"�d�9�o�>�
�8�R��e��-�
�#�Y��B��b�"�
�.�
�%�[�_�_�b�"�u�b�"�o�6�
� 1�2�v�>�
� 6��V�R��<L�M�
� =�����h����
0�
2�
��b�(�;�
�
�r�6�9�9�=�
� 3�R��g��G�#@
�6�1�A�1���&����q��s�e�4�5�5��k�k�(�<�T�<�V�<��� � ��/�6�5�'6�&6�5�5�s�)F	�F
�F
c
���[O2o[oUOU29^tt^2UO	[O
29^tt^2UO
U]*2PPP2PPP2[]*2oUOU29^tt^2UO	[O
29^tt^2UO
U2PPP2PPP2[oQoUOUQUQ029^tt^2UO	[O
29^tt^2UO
V#QQ5PPP2PPP2QoUOUQUQ029^tt^2UO	[O
29^tt^2UO
V#Q2PPP2PPP2P!)%fhCKh9h)%fhCKt9h)%fhCK"9h)%fhCK.9h)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)r9rh� (�)z~~~r?rjzeggs!)r
rXrBr�r]r�r�rr)rJr`r�rqs&   r�test_call_invalid�%TestInterpreterCall.test_call_invalid�s����$�$�&��$��
�\�\�$�
�
��"�"�<�#A�#A�B�B����D�"�%�C� �%�R�(��
�\�\�$�
�
��"�"�<�#A�#A�B�B����D�!�C� �!��
��
�\�\�T�F�"�R�D��*�
+�
+��"�"�<�#A�#A�B�B����D�E��2�C�,���
�\�\�T�F�"�R�D��*�
+�
+��"�"�<�#A�#A�B�B����D�g�.�C�,�
+�C�B�B�� �
�
��C�B�B�� �
�
��C�B��,�
+��C�B��,�
+�
+�s��(G$�G	�1G$�%(H�
G8	�H�(H3�>H 	�H3�(I�+I	�>I�G!
�G!
�	G$�$G5	�-G5	�8H	
�H	
�	H�H	�H	� H0
�)H0
�+H3�3I	�<I	�I
�I
�I�I*	�"I*	c��[O2o[Q1,QN1[Q1]1[Q1P11FDRvq#UO	[U229^tt^2UOUoUOVC2PPP2JT	[[[,o[[[[[[[[-O2FD�vqgUO	[U229^tt^2Ve7cCUO[O 29^tt^2UO
U2PPP2L4UO
U2oUO#VG2UO%QU2PPP2J�	P!)%fhCJd9h)%fhK39h)%fhJ�9h)z	[1, 2, 3]zsum([1, 2, 3])z...r;r5)r
rXr�r&r�r9r�rIrg�localsr%�dict�dir�listr�r]r�rYr[)rJr`r�r�r��result_not_pickleabler��expectedtypes&       r�test_callable_requires_frame�0TestInterpreterCall.test_callable_requires_frame�sj���$�$�&���K�
 ��
��$�
%��
��E�]��
�
�N�D����c�$�i�(�(��k�k�4�(��� � ��/�)�(�
�
���!
��
�T��D��$���	#
�
�%�'�#��D����c�$�i�(�(��0��*�*�<�+I�+I�J�J����D�)�K�J�!�+�+�d�+�C��)�)�#�<��M�M�.�#�6�)�(�
#�)�(�(��"K�J��)�(�(�sH�#F		�>F1	�'F1	�,F
�>=F1	�	F
�F
�F.�'F.�)F1	�1G
�:G
c
��]QHGo[O2oUO	[
2oUO
U,Q
N2STt-tFD!pDQ6wfJVBO	[U2aJ#	ooUO
UQQQPQPQPQU-2UO[29^tt^2UO	[Q	21PPP2UO	[Q
U02UO]*Q5UQ	,*oUO	[
2oUO
V62UO	[Q	2oUO
U]*2UO	[Q
UQ02P!ttoh)%fhK�9h)r)�BuiltinImporterr;�__doc__�
__loader__r.�__package__�__spec__r$r�zassert dir() == r�z, dir())r;r#r$r.r%r&)�_frozen_importlibr"r
rXr�rrIr�r]rr&r�)rJr"r`�namesr(r�r�rs&       r�test_globals_from_builtins�.TestInterpreterCall.test_globals_from_builtins�s_��	6��$�$�&�����C� ������!
�	�$�?�#�d�~�'=�0�$���D�$�/�/�#�	�?������
��t����4��/�"
�	��
�
��
/�
/��K�K��f�%�&�0�	���D�,�U�G�4�5�	�����$��F�8�#�����C� ������)����D�&�)�������#����D�,�X�J�g�>�?��1?�0�
/�s�	
E,�E,�-E1�1F	�:F	c���QoQo[O2oUOUQ2oUOUQ2UOUQ2oUO	U2UOQ2UOUQ2oUO
U2UOUQ]*2UOUQ2oUOU]*2UOQ2P!)c�"�U[2U$P!rDr)r(rs&&r�
set_global�HTestInterpreterCall.test_globals_from_stateless_func.<locals>.set_globals
��#�G�I�d�Or@c�6�[2OU2!rD)rg�get�r(s&r�
get_global�HTestInterpreterCall.test_globals_from_stateless_func.<locals>.get_globals���9�=�=��&�&r@r.r$r�zspam = Truezassert spam == 42, repr(spam))r
rXr�rIr(r&rI)rJr-r2r`�modnamer�s&     r� test_globals_from_stateless_func�4TestInterpreterCall.test_globals_from_stateless_funcs���	$�	'��$�$�&���+�+�j�*�5������*�-��k�k�*�f�-�����#�����M�"��k�k�*�f�-����������J���+��k�k�*�f�-������b�!����3�4r@c���[O2o[[Q-1[Q-1[
Q-1[OQ-1[OQ-1[
]e2Q-1[
Q2OQ-1[OQ-1[Q-1[Q	-1[Q
QQ-1[Q-1[Q-1[Q
-1,2FD�vovq4oUOQU]*029^tt^2UO29^tt^2oUOU,UN3-U@oUO2PPP2UOWO 2PPP2J�	[["Q-1[#]*2Q-1,2FD�vovq4oUOQU]*029^tt^2UO29^tt^2oUOU,UN3-U@oUO2PPP2UO%WO 2PPP2J�	UO29^tt^2oUO[&2oUO2PPP2UO%WO 2P!)%fhCKX9h)%fhCJ�9h)%fhK�9h)%fhCJM9h)%fhK~9h)r�rr�rrzinvalid case #rOr5rr	r
rrr
)r9)r
rXrr�r,r7rGrMr_rIrrr��captured_thread_exception�call_in_threadrpr(�caughtrB�assertIsNotNoner)rJr`r�rrTrU�ctxrqs&       r�test_call_in_thread�'TestInterpreterCall.test_call_in_thread,su���$�$�&��+4�
�R��$�
'��R�0�
(�"�b�1�
�
�
�r�2�&�
�
�
�y�"�-�
�#�Y��B��
�%�[�_�_�b�"�%�
�Y�Y��B��
� 1�2�6�
� 6��;�
� =����O�
��b�1�
�
�r�2�
� 3�R�8�6
�,�'�A�'��� ����q��s�e�4�5�5��3�3�5�5���-�-�h�H��H��H�A��F�F�H�6��!�!�#�*�*�-�	6�5�!,�,,5�
"�E�2�.�
"�2�
&��B�/�6
�,�'�A�'�������q��s�e�4�5�5��3�3�5�5���-�-�h�H��H��H�A��F�F�H�6��$�$�S�Z�Z�0�	6�5�	,��
+�
+�
-�
-���%�%�&7�8�A�
�F�F�H�.�	
���S�Z�Z�(�%6�5�5��6�5�5��6�5��6�5�5��.�
-�sr�3J	�(J
�4#J	�0J?	�	(J,
�1#J?	�8&K�J�J�	J	�J)
� J)
�,J<�5J<�7J?	�?K
�K
�K$	�K$	rO)r.r0r/rP�
contextlib�contextmanagerrzr}r�r�r�r�r�r�r�r�r�r�r�r�rrrrr)r5r=rQrRrSs@rrtrt�s�����@���D��D�A�7� 
�/�"�:H<�T(�(�.�$J:�X<�(i.�VH,�TJ�0�4/�0!7�F+@�Z5�6&)�&)r@rtc�.`�\sQsQsnQsQsQsUsP!)�TestIsShareableiUc	���,QNoSFDLoUOU29^tt^2[OU2oUOU2PPP2JN	P!)%fhJc9h)N)
N�spamr�ri����TFgY@rO)r�)r�r�T)r�r
�is_shareablerI)rJ�
shareablesr�	shareables&   r�test_default_shareables�'TestIsShareable.test_default_shareablesWsR��
�
��C����c�"�"�(�5�5�c�:�	����	�*�#�"��"�"�"�s�(A	�A,
�$A,
c�|�QQ2oQQ[2o[Q[[[2[	2UUQ2UQ2,	oSFDSoUO[
U229^tt^2UO[OU22PPP2JU	P!)%fhJj9h)c�.`�\sQsQsnQsQsQsUsP!)�2TestIsShareable.test_not_shareable.<locals>.Cheeseilc��VmP!rDr1)rJr(s&&rrP�;TestIsShareable.test_not_shareable.<locals>.Cheese.__init__ms�� �	r@c��UO!rDr1rs&r�__str__�:TestIsShareable.test_not_shareable.<locals>.Cheese.__str__os���y�y� r@r1)r.r0r/rPrPrPrQrRrSs@r�CheeserLls����
!�
!�
!r@rRc��\sQsQsQsP!)�4TestIsShareable.test_not_shareable.<locals>.SubBytesirrOrmrOr@r�SubBytesrTrror@rU.�WensleydalerD)
�bytesrZr2r�rr�r�rNr
rE)rJrRrU�not_shareablesrs&    rr��"TestIsShareable.test_not_shareableks���	!�	!�	2�u�	2�
����������}�%���!�
��"�C����d�3�i�(�(�� � � �-�-�c�2�4�)�(�"�(�(�(�s�6&B*	�*B;
�3B;
rO)r.r0r/rPrHr�rQrRrSs@rrBrBUs����+�(4�4r@rBc�`�\sQsQsnQsQsQsQsQs\	Q2s
Qs\	Q	2sQ
s
QsQsQ
s\	Q2sQsUsP!)�
LowLevelTestsi�c�`�[OQ2oUOQ29^tt^2[O2oUOV!2UO	V!2PPP2UOQ29^tt^2[OQ2oUOV12UO	V12[OQ2oUOVC2UO	VC2PPP2QFDaoUOQU8Q029^tt^2[OU2oUOV!2UO	V!2PPP2Jc	Q[
OP
P
P
P	P
P	QQ5Q[
OP	P	P	P	P	[[2QQ5Q	[
OP
P
P
P
P
P
QQ5-o,QNoUO2FCD�vq�UOQ
UQ029^tt^2S	o
[OU2oUOV:2UO	V:2[OU2oUOVC2UO	VC2PPP2UOQUQ029^tt^2S	o
[U	2o[OU1-U@oUOV*2PPP2UOQUQ029^tt^2[U	2O2TT
t-tFDvq�V�%(aJ	ooo
SFDZoU	OU6XcJV�Q
$[
OQ-U@o
[OU1-U@oUOV*2J\	PPP2[U	2O2FD�vooUQ
6XcST
t,tFD
p�U6wfJU
MJ	oo
LU%(,oSFD�oUOUQUQU8QU8Q029^tt^2UU-o[
OQ-[[U	21-U@@o
[OU1-U@oUOV*2PPP2J�	J�	CJ�	UOQ29^tt^2UO[29^tt^2[OP	Q5PPP2PPP2[UQ	*2O2FD�vooUQ
6XcJ]PQQP[21FDloUOQUQU8Q029^tt^2UO[ 29^tt^2[OQ-UU-@PPP2PPP2Jn	J�	P	]QP[21FDfoUOQU8Q029^tt^2UO[ 29^tt^2[OUQ5PPP2PPP2Jh	QFDfoUOQU8Q029^tt^2UO[29^tt^2[OUQ5PPP2PPP2Jh	P!)%fhCK9h)%fhCK�9h)%fhCJ�9h)%fhCKD9h)%fhCK�9htto
oh)%fhCK]9htto
h)%fhCJ*9h)%fhCKP9h)%fhCK\9h)%fhCK�9h)%fhCJD9h)%fhCKv9h)%fhCJ�9h)%fhCK29h)%fhCJ�9h)�isolatedzno arg�defaultz	default (r�own)�use_main_obmalloc�
allow_fork�
allow_exec�
allow_threads�allow_daemon_threads�check_multi_interp_extensions�gil�legacy�shared�emptyzsupported (znoop override (zoverride all (rfr�rz -> zextra overrider�r�g�?zbad override (�=zbad override (gil=)rf)rur^)r^rhr_rO)rur�)r	�
new_configr��assert_ns_equalr�r7r8�boolrr�r%rfrr]rr�r�)rJr^�config�config1�config2r��	supported�
gil_supportedr(�vanillar��	overrides�kr�rf�field�oldr��valrs&                   r�test_new_config�LowLevelTests.test_new_config�sE�� �*�*�:�6��
�\�\�(�
#�
#�"�-�-�/�F�� � ��1����V�-�$�
�\�\�)�
$�
$�#�.�.�y�9�G�� � ��2����W�.�#�.�.�y�9�G�� � ��2����W�.�%�#�C����	�#���2�3�3�&�1�1�#�6���$�$�V�5�� � ��1�4�3�#�
��-�-�"'� � �"�%*�.2���
�e�+�+�"&���"�%)�.2�?�.C���
�U�*�*�"'� � �#�%*�.3���'
�	�:5�
�&�_�_�.�.�M�D�����D�6��3�4�4�"��'�2�2�4�8���$�$�W�7�� � ��3�'�2�2�4�8���$�$�W�6�� � ��2�5������v�Q�7�8�8�"�� ��M�	�&�1�1�$�D�)�D���$�$�V�6�	9�����t�f�A�6�7�7�26�w�-�2E�2E�2G�H�2G�$�!�Q��X�2G�	�H�(�C��{�{�c�)� �'*�e�$�$�4�4�A�y�A�H�*�5�5�d�H�i�H�F��(�(��:�
)�8�#�7�m�1�1�3�
��s��E�>�)6�C��A�s�(�a�a��F�C�F�"%�g�Y�F�!�C������a��w�b���t�C�7�!�&L�M�M�%*�C�L�	�#(�#8�#8�$�"�4��=�>�I�>�$��"/�!9�!9�$�!L�)�!L���,�,�V�>�
N�M�"�4�9/�T�\�\�*�
+�
+��"�"�:�.�.��(�(�d�(�3�/�,�
!��7�!3�4�:�:�<�L�E�5���~���R���d�F�H�=���\�\�N�5�'��5�)�1�"E�F�F��*�*�9�5�5�%�0�0�B�E�5�>�B�6�G�F�>�	=��A�s�D�&�(�3�E���� 2�5�)�1�=�>�>��&�&�y�1�1�!�,�,��,�7�2�?�>�4�"�E���� 2�5�)�1�=�>�>��&�&�z�2�2�!�,�,��,�7�3�?�>�"�a$�
#�
#��
%�
$�
$��4�3�3��J5�4�4��9�8�8��I�8�7�7��D�N�M�M��/�.�.��,�
+�
+��6�5�5��G�F�F��2�1�1��?�>�>��
3�2�2��?�>�>�se�7Y4�A/Z�#8Z	�A1Z1	�7[	�7[	�[�'[	�A
[	�=
[3�[3�
A[8�\!�/\
	�\!�;]	
�\5�3]	
�<]2	�]
�1]2	�)^	�^
�^	�4Z	�=Z	�Z	�Z	�Z.
�%Z.
�1[
�:[
�[
�[
�[	�[0
�([0
�8\
�\
�
\
�\
�	\!�!\2	�*\2	�5]�>]�	]	
�	]�]�]/�']/�)	]2	�2^
�;^
�^�^�	^	�^-
�$^-
c��[O2vqUOU]2UOU[O2UO[O	U2[O2P!r#)r	r�rI�WHENCE_RUNTIMEr�)rJr�r�s&  r�
test_get_main�LowLevelTests.test_get_mains^��(�1�1�3�������1�%������!=�!=�>����� � ��*��(�(�	*r@c���UOQ29^tt^2[O2uq[O2vq4UO	V12UO	U[O
2PPP2QoQoUOQ29^tt^2[O
2oUOVu2oUU2vq4UO	V72UO	U[O2PPP2UOQ29^tt^2]o	[O2FDuq�[V�2o	J	U	]*oUOU2oUU2vq4UO	V;2UO	U[O2PPP2P!)%fhCK;9h)%fhK�9h)%fhP!9h)rvz�
            import _interpreters
            interpid, whence = _interpreters.get_current()
            print((interpid, whence))
            c�$�[U2vqV1!rD)r�)r�r�r�s&  r�parse_stdout�4LowLevelTests.test_get_current.<locals>.parse_stdout s��#�D�z��H��#�#r@rr)
r�r	r�r�rIr|rX�run_and_capture�
WHENCE_STDLIBr\�maxr��WHENCE_CAPI)rJrvr>r�r�r)r��origr��lastr�r�s&           r�test_get_current�LowLevelTests.test_get_currentst��
�\�\�&�
!�
!�$�-�-�/�H�D�,�8�8�:��H����X�,����V�]�%A�%A�B�	"�
��
	$��\�\�.�
/�
/� �'�'�)�D��'�'��5�D�+�D�1��H����X�,����V�]�%@�%@�A�0��\�\�,�
'�
'��D�'�0�0�2����4�}��3��a�x�H��*�*�6�2�D�+�D�1��H����X�0����V�]�%>�%>�?�(�
'�-"�
!�
!��0�
/��(�
'�
'�s8�AF*�A!F>� BG�*F;	�3F;	�>G	�G	�G"	�G"	c�p�[O2uq[O2o[O2o[O2oU[O1U[O1U[O1U[O1,oUOQ29^tt^2[O
2oUOVv2PPP2UOQ29^tt^2UOUQ2o[U2oUOVv2PPP2UOQ29^tt^2U]*o	U	]*o
UU	[O1U
[O1,*oUU
[O1,*oUOQ2o[U2o
[O
2oUOV�2UOV�2PPP2P!)%fhCK.9h)%fhK�9h)%fhP!9h)rvzvia interp from _interpretersz{
                import _interpreters
                print(
                    _interpreters.list_all())
                zvia interp from C-APIz�
                import _interpreters
                _interpreters.create()
                print(
                    _interpreters.list_all())
                )r	r�rXr|r�r�r\rIr�r�r�r�)rJr�r>r�r�r�r�r�r�r�r�r��	expected3r��res3s&              r�
test_list_all�LowLevelTests.test_list_all5s���"�+�+�-�
��!�(�(�*�	�!�(�(�*�	�!�(�(�*�	�
�]�1�1�2�
�
�3�3�4�
�
�3�3�4�
�
�3�3�4�	
���\�\�&�
!�
!��(�(�*�C����S�+�"��\�\�9�
:�
:��'�'�	�8��D��t�*�C����S�+�;��\�\�1�
2�
2�!�A�
�I�!�A�
�I� ��M�5�5�6��M�7�7�8�$��I�!��M�7�7�8�$��I��*�*�0��D���:�D� �)�)�+�D����T�-����T�-�'3�
2�"�
!�
!��;�
:��3�
2�
2�s7�2&G=�9/H�	B*H$�=H	�H	�H!	�H!	�$H5	�-H5	c	�	�[OQ2o[OQ2oSoUOQ29^tt^2[O2o[O	U2oUOVS2PPP2UOQ29^tt^2[OP2o[O	U2oUOVS2PPP2UOQ29^tt^2UO
[29^tt^2[OQ2PPP2PPP2PUQUQUQU-O2FDfvqgUOQU8029^tt^2[OU2o[O	U2oUOVW2PPP2Jh	UOQ29^tt^2[OQ2oP	Um	[[2UmQ	Um
[OU2o[O	U2oUOVX2PPP2UOQ
29^tt^2[O2oU;
UO
[29^tt^2[OU2PPP2PPP2UOQ29^tt^2[O2oP	UmUO
[29^tt^2[OU2PPP2PPP2UOQ29^tt^2[O2oUO![O#U2[O$2PPP2P!)%fhCK89h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCJ�9h)%fhCK�9h)%fhCKu9h)%fhCK�9h)%fhCK%9h)%fhCK19h)%fhP!9h)
r]rgzno argszconfig: Nonezconfig: 'empty'rir^z	str arg: rirhzmissing fieldszextra fieldsr�)r	rkr�rX�
get_configrlr]r
r�r`rmrrerfrr�rIr�r�)	rJr]rgr^r�rnr�r�r�s	&        r�test_create�LowLevelTests.test_createdsE�� �+�+�J�7���)�)�(�3����
�\�\�)�
$�
$�$�+�+�-�H�"�-�-�h�7�F�� � ��1�%�
�\�\�.�
)�
)�$�+�+�D�1�H�"�-�-�h�7�F�� � ��1�*�
�\�\�-�
.�
.��"�"�#3�4�4��$�$�W�-�5�/�
���w����f�	
�
�%�'��M�C����	�#��1�2�2�(�/�/��4��&�1�1�(�;���$�$�V�6�3�2�
��\�\�(�
#�
#� �+�+�G�4�D�%)�D�"�15�o�1F�D�.��D�H�$�+�+�D�1�H�"�-�-�h�7�F�� � ��.�$��\�\�*�
+�
+� �+�+�-�D����"�"�:�.�.��$�$�T�*�/�,��\�\�.�
)�
)� �+�+�-�D��D�I��"�"�:�.�.��$�$�T�*�/�*��\�\�(�
#�
#�$�+�+�-�H�����$�$�X�.��+�+�
-�$�
#�_%�
$�
$��
*�
)�
)��5�4�4��/�
.�
.��3�2�2��
$�
#�
#��/�.�.��,�
+�
+��/�.�.��*�
)�
)��$�
#�
#�s��;N1�#<O�O-�O	�4O-�?<P	� A3P�44P>�(P*	�>P>�'9Q&� Q	�6Q&�AQ:�1O	�:O	�O	�O	�O*
�"O*
�$	O-�-O>	�6O>	�P
�
P
�P'	�P'	�*P;
�3P;
�5	P>�>Q	�Q	�Q#
�Q#
�	Q&�&Q7	�/Q7	�:R	�R	c	�Z�UOQ29^tt^2[O2o[O2TTt,tFDuq#UMJ	ooo[O	U2[O2TTt,tFDuq#UMJ	oooUOV2UO
V2UOUOU22PPP2UOQ29^tt^2[O2uqUO[29^tt^2[O	U2PPP2PPP2UOQ29^tt^2[O2oUO[Q29^tt^2[O	UP	Q5PPP2UOUOU22[O	U2UOUOU22PPP2UOQ29^tt^2[O2oUOUOU22[O UP	Q5UOUOU22PPP2P!ttoohttooh)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKG9h)%fhK�9h)%fhP!9h)rrvrr���restrictzbasic C-API)�basic)r�r	rXr\�destroyr[r)rNr�r�r]r
r�create_interpreterr�rI�destroy_interpreter)rJr�r�r>r�r�s&     r�test_destroy�LowLevelTests.test_destroy�sG��
�\�\�.�
/�
/�$�+�+�-�H�'4�'=�'=�'?�@�'?�V�R�b�'?�F�@��!�!�(�+�&3�&<�&<�&>�?�&>�F�B�R�&>�E�?��M�M�(�+����X�-�����"�"�8�,�
.�0��\�\�&�
!�
!�(�1�1�3�L�H��"�"�#3�4�4��%�%�h�/�5�"��\�\�,�
'�
'�(�;�;�=�H��'�'�(8�.�I�I��%�%�h��%�>�J��O�O��"�"�8�,�
.��!�!�(�+�����"�"�8�,�
.�(��\�\�-�
(�
(�(�;�;�=�H��O�O��"�"�8�,�
.��1�1�(�$�G�����"�"�8�,�
.�)�
(��3A��?�	0�
/�
/��5�4�4��"�
!�
!��J�I�I��(�
'��)�
(�
(�s��+J6�J*
�.J6�J0
�AJ6�63K�)K
	�?K�(4L�K2	�4AL�2A.L�*J6�6K	�?K	�
K
�K
�	K�K/	�'K/	�2L
�;L
�=	L�L	�L	�L*	�"L*	c�N�UOQ29^tt^2[OQ2oQUm[%cP
Um[O
2uq#[OU2oUOVA2PPP2UOQ29^tt^2[OQ2o[OQ2o[OU2oUOVA2PPP2UOQ29^tt^2[OQ2o[OQ2o[OU2oUOVA2PPP2UOQ29^tt^2[OQ2oUOU29^tt^2oUO[Q29^tt^2[OUP	Q5PPP2[OU2oPPP2UOWU2PPP2P!)%fhCK�9h)%fhCKW9h)%fhK�9h)%fhK�9h)%fhKz9h)%fhP!9h)rvrgr_r]rr�r�)
r�r	rkrfrrer�r�rlrXr~r�r
)rJr�r�r>rnr�s&     r�test_get_config�LowLevelTests.test_get_config�s����\�\�&�
!�
!�$�/�/��9�H� �H�L���9>��6�(�1�1�3�L�H�"�-�-�h�7�F�� � ��2�"��\�\�*�
%�
%�$�/�/�
�;�H�$�+�+�J�7�H�"�-�-�h�7�F�� � ��2�	&��\�\�(�
#�
#�$�/�/��9�H�$�+�+�H�5�H�"�-�-�h�7�F�� � ��2�	$��\�\�,�
'�
'� �+�+�J�7�D��+�+�D�1�1�X��+�+�,<�n�M�M�!�,�,�X��,�E�N�&�1�1�(�;��2�
� � ���.�
(�
'�+"�
!�
!��&�
%�
%��$�
#��N�M��2�1��(�
'�
'�s��(H2�AH2�'AI�AI�/J�:J	�I-
�1J	�J�2I	�;I	�I	�I	�I*	�#I*	�-I=�6I=�8J	�J
�	J
�J�J$	�J$	c���UOQ29^tt^2[O2uq[OU2oUO	U[O
2PPP2UOQ29^tt^2[O
2o[OU2oUO	U[O2PPP2[OQ[OQ[OQ[OQ-O2FDxvqEUOQUQUQ029^tt^2UOUQ	59^tt^2o[OU2oPPP2UO	WU2PPP2Jz	UOQ
29^tt^2UO[Q2P	Q5o[!U2oUO	U[O2PPP2UOQ
29^tt^2UO[Q2P
Q5o[!U2oUO	U[O2PPP2P!)%fhCK9h)%fhCK�9h)%fhCK,9h)%fhCJ�9h)%fhK�9h)%fhP!9h)rv�stdlibz	not readyrrrzfrom C-API (z: r)r�zfrom C-API, runningz�
                import _interpreters
                interpid, *_ = _interpreters.get_current()
                print(_interpreters.whence(interpid))
                )rnzfrom legacy C-API, running)r�r	r�r�rIr|rXr��WHENCE_UNKNOWN�WHENCE_LEGACY_CAPIr��	WHENCE_XIr�r~r�rr�)rJr�r>r�r�r(r�s&      rr�LowLevelTests.test_whence�sK��
�\�\�&�
!�
!�(�1�1�3�L�H�"�)�)�(�3�F����V�]�%A�%A�B�"�
�\�\�(�
#�
#�$�+�+�-�H�"�)�)�(�3�F����V�]�%@�%@�A�$�
�(�(�+��,�,�n��%�%�w��#�#�%>�	
�
�%�'��J�D�����T�F�"�T�F�!�<�=�=��/�/�t�/�<�<��*�1�1�(�;�F�=�� � ���.�>�=�
��\�\�/�
0�
0��*�*�6�7�,�
�+��D��$�Z�F����V�]�%>�%>�?�1��\�\�6�
7�
7���*�*�6�7�,�
�+��D��$�Z�F����V�]�%E�%E�F�8�
7�?"�
!�
!��
$�
#�
#��=�<�<��>�=�=��
1�
0��8�
7�
7�s{�AI;�A
J�J7	�*J#
�J7	�?AK�(A	K�;J	�J	�J 	�J 	�#J4�,J4�.	J7	�7K	
�K	
�K	�K	�K0	�(K0	c��Qo[O2oUOV!2oUOUO	2Q2P!)zx
            import contextvars
            print(getattr(contextvars.Token, "MISSING", "'doesn't exist'"))
            z<Token.MISSING>)r	rXr�rIrZ)rJr)r�r�s&   r�test_contextvars_missing�&LowLevelTests.test_contextvars_missing	s@��
��
�#�#�%���#�#�D�1���������'8�9r@c�~`�U1QkoROQ29^tt^2[O2oROU29^tt^2[O	U2oROU2PPP2PPP2ROQ29^tt^2[O2o[O	U2oRO
U2PPP2ROQ29^tt^2[O2uq$UUP	2PPP2ROQ29^tt^2RO29^tt^2oROUP	Q59^tt^2UUP	2PPP2PPP2PPP2ROQ29^tt^2RO29^tt^2oROUP
Q59^tt^2UUP
2PPP2PPP2PPP2ROQ29^tt^2RO29^tt^2oUUP
2PPP2PPP2P!)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK{9h)%fhCK/9h)%fhCK;9h)%fhCKG9h)%fhK�9h)%fhCK9h)%fhCK9h)%fhK�9h)%fhP!9h)c�:�RO[Q29^tt^2[OUP	Q5PPP2[OU2oRO	V!2P!)%fhK89h)r�r�)r�r
r	rJr�)r�r�r�rJs&& �r�check�,LowLevelTests.test_is_running.<locals>.check	sV����'�'�(8�.�I�I��(�(��D�(�A�J�#�.�.�x�8�G��M�M�'�,�J�I�s�A)�)A9	�2A9	zfrom _interpreters (running)z from _interpreters (not running)rvzfrom C-API (running __main__)ryz&from C-API (running, but not __main__)zfrom C-API (not running))
r�r	rXr�rJrIrNr�r~r�)rJr�r�r�r>sf    r�test_is_running�LowLevelTests.test_is_running	s>���	-��\�\�8�
9�
9�$�+�+�-�H����h�'�'�'�2�2�8�<������(�(�:��\�\�<�
=�
=�$�+�+�-�H�#�.�.�x�8�G����W�%�>�
�\�\�&�
!�
!�(�1�1�3�L�H��(�D�!�"��\�\�9�
:�
:��+�+�-�-���+�+�H�4�+�@�@��(�D�)�A�.�;�
�\�\�B�
C�
C��+�+�-�-���+�+�H�5�+�A�A��(�E�*�B�.�D�
�\�\�4�
5�
5��+�+�-�-���h��&�.�6�
5�/(�'�'��:�
9�
9��>�
=�
=��
"�
!�
!��A�@�@��.�-�-��;�
:�
:��B�A��.�-�-��D�
C�
C��.�-��6�
5�
5�s�.I%�'I	�7I%� ;I9�<J
�<K	�J5	�1
J!
�;J5	�K	�,L�K0	�!
K
�+K0	�3L�L+�5
L	�?L+�I"
�I"
�	I%�%I6	�.I6	�9J
	�J
	�
J	�J	�!J2�*J2�,	J5	�5K
�>K
�	K	�	K	�K	�K-�&K-�(K0	�0L
�9L
�;	L�L	�
L	�L(
�!L(
�#L+�+L<	�4L<	c��UOQ29^tt^2[O2o[Q2vq#U9^tt^2[O	V2oPPP2UO2oUO
2UOoUOUQ2PPP2UOQ29^tt^2[O2o[Q2vq#U9^tt^2[O	V2oUO2oPPP2[[QWOUOQ5oUOWP2UOVF2PPP2UOQ29^tt^2UO29^tt^2oUO[ Q29^tt^2[O	UQ	P	Q
5PPP2[O	UQ	2oPPP2UO#WP2UOUO$Q2PPP2P!)%fhCK�9h)%fhCK�9h)%fhCKS9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)z
run scriptr�r��uncaught exceptionzg
                raise Exception('uh-oh!')
                print("it worked!", end="")
                r��r4r5rr�r!r�)r�r	rXrr&r�r�r+rIr?rr4r5rlr~r�r
r�r3)rJr�r)r�rcrwr�s&      r�	test_exec�LowLevelTests.test_exec>	s��
�\�\�,�
'�
'�$�+�+�-�H�.�/L�M�O�F���#�(�(��:����m�m�o�G��#�#�%��.�.�C����S�,�/�(��\�\�.�
/�
/�$�+�+�-�H�.�0��O�F���#�(�(��:���n�n�&���%��8��-�-��>�>�	�H�
���S�"�%�� � ��/�!0�$�\�\�,�
'�
'��+�+�-�-���+�+�,<�n�M�M�!�&�&�x�1P�04�'�6�N�$�(�(��3R�S��	.�

���S�$�'����S�W�W�l�3�(�
'�3����(�
'�
'�� ����
0�
/�
/��(N�M��.�-��(�
'�
'�s��,I�H8	�AI�,I4�0&I 	�AI4�	J.�"J	�J
�J	�86J.�8I	
�I	
�	I�I	�I	� I1
�)I1
�+	I4�4J	�=J	�J�J�J	�J+
�$J+
�&J.�.J?	�7J?	c
��[O2oUOQ29^tt^2[Oo[OV2vq4UO
U2UO
U2PPP2UOQ29^tt^2[Oo[OVQ
-2vq4UO
U2UO
U2PPP2UOQ29^tt^2[Oo[OV2vq4UO
U2UOUP	2PPP2UOQ29^tt^2]]]]]]QQ]	Q]-1o[OoQo[]]]	]Q5o[OVVg2vq4UO
U2UOV52PPP2UOQ29^tt^2[Oo[OV2vq4[[QUOUO Q	5oUO
U2UOVE2PPP2P!)%fhCK	9h)%fhCK�9h)%fhCKX9h)%fhK�9h)%fhP!9h)
zno args, return Nonezempty args, return Nonezno args, return non-Nonezfull args, return non-Noner�r�r�r�r�r�rO)��)r�r6r}r�r�r�)r	rXr�r��spam_minimalr�r(�script_with_returnr�r�rrI�spam_raisesr?rr4r5)rJr�r�r�rcr�rTrUs&       r�	test_call�LowLevelTests.test_calld	s5�� �'�'�)���\�\�0�
1�
1��$�$�D�$�)�)�(�9�H�C����c�"����c�"�	2��\�\�3�
4�
4��$�$�D�$�)�)�(�"�b�A�H�C����c�"����c�"�	5��\�\�4�
5�
5��*�*�D�$�)�)�(�9�H�C����c�"��M�M�#�t�$�	6��\�\�6�
7�
7��1�a��A�q�&�3��3��2B�C�H��&�&�D�%�D��A��a�1�-�F�$�)�)�(�$�G�H�C����c�"����S�+�8��\�\�.�
/�
/��#�#�D�$�)�)�(�9�H�C�$��7��-�-��>�>�	�H�
���c�"����S�+�0�
/�72�
1�
1��5�
4�
4��6�
5�
5��8�
7��0�
/�
/�s^�A
I9�AJ
�AJ!�3A*J5�>A1K�9J
	�J
	�
J	�J	�!J2	�*J2	�5K	�>K	�K	�K	c��UOQ29^tt^2[O2o[OUQ2o[OUQ2oUO	UO
OQ2UO	UO
OQ2[OU[Q]*Q52[OUQ2o[OUQ2o[OUQ2oUOUP2UOUP2UO	UO
OQ2UO[29^tt^2[OUQ]-2PPP2PPP2UOQ	29^tt^2UO29^tt^2oUO[Q
29^tt^2[OUQP	-P	Q5PPP2[OUQP	-2[O UQ
2oPPP2UO	W]2PPP2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhKe9h)%fhP!9h)rzassert spam == 'eggs'zassert ham == 42r�r�)r�r�zassert spam == 42�AssertionError�rr�r�r�r�)r�r	rXr&rIr2r.�set___main___attrsrr�r]rr~r�r
r�exec_interpreter)rJr��before1�before2�after1�after2�after3�rcs&       r�test_set___main___attrs�%LowLevelTests.test_set___main___attrs�	s��
�\�\�.�
/�
/�$�+�+�-�H�#�(�(��3L�M�G�#�(�(��3E�F�G����W�\�\�2�2�K�@����W�\�\�2�2�K�@��,�,�X�t���8�
�#�'�'��2K�L�F�"�'�'��2D�E�F�"�'�'��2E�F�F��M�M�&�$�'��M�M�&�$�'����V�[�[�1�1�3C�D��"�"�:�.�.��0�0��F�A�;�G�/�%0�,�\�\�,�
'�
'��+�+�-�-���+�+�,<�n�M�M�!�4�4�X���~�>B�5�D�N��0�0��F�D�>�J�&�7�7��)���.�
���R��#�(�
'�	/�.��%0�
/��0N�M��.�-��(�
'�
'�s~�EI5�2I"	�I5�4J.�
J	�,J
�7J	�>J.�"I2
�+I2
�-I5�5J	�>J	�J�J�J	�J+
�$J+
�&J.�.J?	�7J?	rO)r.r0r/rPryr}r�r�r�rr�r�rr�r�r�r�r�rQrRrSs@rr[r[�s�����x8�t*�@�B-.�^8-�t�".��".�H/�B�)G��)G�V:�"'�H$4�L,,�\�!$��!$r@r[r$)NNNrD)Nr?rDrr7r��textwraprrlr7rB�testr�test.supportrrr�test.support.script_helperrr�
import_moduler	�
concurrentr
rr�test._crossinterp_definitions�_crossinterp_definitionsr��concurrent.interpretersr
rr�utilsrrrrrrrr��WHENCE_STR_LEGACY_CAPIr��
WHENCE_STR_XIr�r r@r,r?rBrVr�r�r�r�rFr�r�r�r�r�r�rr�rr,r3r7r<rBrErGrrrtrBr[r.rvrOr@r�<module>r�s����	�
�
�
������"�&�&�E��+�+�O�<�
�#�(�,�,�������#��'����)�
�*������#��#��#��<(�(�(�$<S�(�<S�~$�8�$�":2�h�:2�zB*�8�B*�JS8�X�S8�ls&�x�s&�le%�8�e%�PE5��E5�Pw�(�w�|�"�"���'�'���$�$������
��
*�*�2$&�D�$&�Nw
)�(�w
)�t14�h�14�hk$�H�k$�\�z���M�M�O�r@

Youez - 2016 - github.com/yon3zu
LinuXploit