
    <e                     `   d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZmZ 	 d dlZn# e$ r dZY nw xY w	 d dlZn# e$ r dZY nw xY w ej        d	          Z d dl!Z! e"ed
          Z#dZ$d Z%d Z& G d d          Z' G d dej(                  Z) G d dej(                  Z* G d dej(                  Z+ G d dej(                  Z, G d dej(                  Z- G d dej(                  Z. ej/                     G d dej(                              Z0 G d de0          Z1 ej2         ej3                    d           G d  d!e0                      Z4 ej2        e#d"           G d# d$e0                      Z5 ej6        edu d%           G d& d'ej(                              Z7 G d( d)ej(                  Z8d*Z9 G d+ d,ej(                  Z:e;d-k    r ej<                     dS dS ).    )OrderedDictN)support)MISSING_C_DOCSTRINGS)import_helper)threading_helper)warnings_helper)assert_python_failureassert_python_ok	_testcapigettotalrefcountc                 V    |                      dd                              dd          S )Nzutf-8replace )decoder   )errs    //usr/lib/python3.11/test/test_capi/test_misc.pydecode_stderrr   .   s&    ::gy))11$;;;    c                     | S )zsome doc selfs    r   testfunctionr   2   s    Kr   c                   b    e Zd Ze                    e          Ze                    e          ZdS )InstanceMethodN)__name__
__module____qualname__r   instancemethodidr   r   r   r   r   r   7   s4        		!	!"	%	%B++L99LLLr   r   c                      e Zd Zd Z ej                    d             Zd Zd Zd Z	d Z
 ej        ed          d             Z ej        ed          d	             Z ej        ed
          d             Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z ej         ee d          d          d             Z!d Z" ej#        d          d             Z$ ej#        d          d             Z%d Z&d  Z'd! Z(d" Z)d# Z*d$ Z+d% Z,d& Z-d' Z.d( Z/d) Z0d* Z1d+ Z2d, Z3d=d.Z4 ej                    d/             Z5d0 Z6d1 Z7d2 Z8d3 Z9d4 Z:d5 Z;d6 Z<d7 Z=d8 Z>d9 Z?d: Z@d; ZAd<S )>CAPITestc                 B   t                      }|                     t          |          |                                           |                     |                                |u            |                     |j        j        t          j                   |                     t           j        j        t          j                   dt           j        _        |                     t          j        d           |                     t          t          |j        dd           d S )Ntest	attribute)
r   assertEqualr!   
assertTruer   __doc__r&   assertRaisesAttributeErrorsetattrr   insts     r   test_instancemethodzCAPITest.test_instancemethod=   s    D47799---))++t3444*2L4HIII4<l>RSSS06#-/888.'43DkSYZZZZZr   c                    t          j                    5  t          j        t          j        ddgt          j        t          j                  }d d d            n# 1 swxY w Y   |                                \  }}|                     |d           | 	                    |
                                                    d          |           d S )N-cz4import _testcapi;_testcapi.crash_no_current_thread())stdoutstderrr   s   Fatal Python error: PyThreadState_Get: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL))r   SuppressCrashReport
subprocessPopensys
executablePIPEcommunicater'   r(   rstrip
startswith)r   poutr   s       r    test_no_FatalError_infinite_loopz)CAPITest.test_no_FatalError_infinite_loopH   s   (** 	9 	9 #.$#H"I )3(2	9 9 9A	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 ]]__
cc"""

//FG G 	 	 	 	 	s   9AA Ac                 P    |                      t          t          j                   d S N)r*   
ValueErrorr   !make_memoryview_from_NULL_pointerr   s    r   !test_memoryview_from_NULL_pointerz*CAPITest.test_memoryview_from_NULL_pointer[   s!    *i&QRRRRRr   c                 V   t          d          }t          d          }	 |# t           $ r}t          j                    }t
                              |          }t          j                    }t
                              |          }t          j                    }|                     ||           |                     ||           |                     ||           |                     ||           |                     ||           |                     ||           Y d }~d S d }~ww xY w)N5TEST)rB   	TypeErrorfailr7   	exceptionr   set_exceptionr'   )	r   raised_exceptionnew_exceorig_sys_exceptionorig_exceptionnew_sys_exceptionnew_exceptionreset_sys_exceptions	            r   test_exceptionzCAPITest.test_exception^   s)   %c??F##	."" 	? 	? 	?!$&44W==N #%33NCCM"%-//^Q///^-=>>>/@@@0.AAA]G444.>>>>>>>>>	?s   " 
D(C1D##D(c                    t          d          }t          d          }	 |# t           $ r}|j        }t	          j                    }t                              |j        |d           }t	          j                    }t          j        | }t	          j                    }	| 	                    |d         |           | 
                    ||j        ||f           | 
                    ||           | 
                    |	|           | 
                    ||j        |d f           | 
                    ||           Y d }~d S d }~ww xY w)NrF   rG   F   )rB   rH   r(   __traceback__r7   exc_infor   set_exc_info	__class__r'   assertSequenceEqual)
r   rL   rM   rN   tborig_sys_exc_infoorig_exc_infonew_sys_exc_infonew_exc_inforeset_sys_exc_infos
             r   test_exc_infozCAPITest.test_exc_infot   sQ   %c??F##	#"" 	E 	E 	EB #%2273DgtTTM"|~~$1=AL!$]1-q111$$]5E5OQace4fggg$$%6FFF$$%7GGG$$\G4EwPT3UVVV$$%5|DDDDDDDDD	Es   " ED	D<<Ec           	      6   |                      t                    5 }t                              t          d           d d d            n# 1 swxY w Y   |                     |j        j        d           |                      t                    5 }t                              t          t          ddd                     d d d            n# 1 swxY w Y   |j        j        d         }|                     |t                     |                     |j        d           |                      t                    5 }t                              t          t          d                     d d d            n# 1 swxY w Y   |                     |j        j        d	            G d
 dt                    } G d dt          |          }|                      t                    5 }t                              | |                       d d d            d S # 1 swxY w Y   d S )N*   rd   rV         r   rV   rf   rg      )ri   c                       e Zd Zd ZdS )&CAPITest.test_set_object.<locals>.Metac                     ddz   d S )NrV   r   r   )clssubs     r   __subclasscheck__z8CAPITest.test_set_object.<locals>.Meta.__subclasscheck__   s    !r   N)r   r   r   ro   r   r   r   Metark      s#            r   rp   c                       e Zd ZdS )(CAPITest.test_set_object.<locals>.BrokenNr   r   r   r   r   r   Brokenrr              Dr   rt   )	metaclass)r*   rB   r   exc_set_objectr'   rJ   argsrH   assertIsInstancePermissionErrorOSErrortype	ExceptionZeroDivisionError)r   rN   wrappedrp   rt   s        r   test_set_objectzCAPITest.test_set_object   s   z** 	5a$$Z444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5)5111 z** 	Ca$$Z1Qq1A1ABBB	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C+"1%gy111y111 // 	C1$$Wob.A.ABBB	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C)5111	 	 	 	 	4 	 	 		 	 	 	 	Y$ 	 	 	 	 011 	7Q$$VVVXX666	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7sG   !AAA0C		CC6.E00E47E4$HHHz(_posixsubprocess required for this test.c                     G d dt                     }|                     t          d          5  t          j        d |            ddddd	d
ddddddddddddddd           d d d            n# 1 swxY w Y    G d dt                     }|                     t          t          j        d |            ddddd	d
ddddddddddddddd           d S )Nc                       e Zd Zd ZdS )1CAPITest.test_seq_bytes_to_charp_array.<locals>.Zc                     dS NrV   r   r   s    r   __len__z9CAPITest.test_seq_bytes_to_charp_array.<locals>.Z.__len__       qr   Nr   r   r   r   r   r   r   Zr      #            r   r   indexingrV   TrV   rf               	   
                  F            c                       e Zd Zd Zd ZdS )r   c                     t           j        S rA   )r7   maxsizer   s    r   r   z9CAPITest.test_seq_bytes_to_charp_array.<locals>.Z.__len__   s
    {"r   c                     dS )N   xr   )r   is     r   __getitem__z=CAPITest.test_seq_bytes_to_charp_array.<locals>.Z.__getitem__       tr   N)r   r   r   r   r   r   r   r   r   z1CAPITest.test_seq_bytes_to_charp_array.<locals>.Z   s2        # # #    r   )objectassertRaisesRegexrH   _posixsubprocess	fork_execr*   MemoryErrorr   r   s     r   test_seq_bytes_to_charp_arrayz&CAPITest.test_seq_bytes_to_charp_array   s   	 	 	 	 	 	 	 	 ##Iz:: 	k 	k&AACCVAa!AbBr"T$rRWXZ[]^`acdik k k	k 	k 	k 	k 	k 	k 	k 	k 	k 	k 	k 	k 	k 	k 	k	 	 	 	 	 	 	 	
 	+'7'AAACCVAa!AbBr"T$rRWXZ[]^`acdi	k 	k 	k 	k 	ks   3A..A25A2c                      G d dt                     }|                     t          t          j         |            dgdddddd	d
dddddddddddddd           d S )Nc                       e Zd Zd ZdS )-CAPITest.test_subprocess_fork_exec.<locals>.Zc                     dS r   r   r   s    r   r   z5CAPITest.test_subprocess_fork_exec.<locals>.Z.__len__   r   r   Nr   r   r   r   r   r      r   r   r      1Tr   r   r   r   r   r   r   r   r   r   r   r   Fr   r   r   r   )r   r*   rH   r   r   r   s     r   test_subprocess_fork_execz"CAPITest.test_subprocess_fork_exec   s    	 	 	 	 	 	 	 	
 	)%5%?!##tfT&1Qq2bBr$tTVW\]_`bcefhin	p 	p 	p 	p 	pr   z6Signature information for builtins requires docstringsc                    |                      t          j        j        d            |                      t          j        j        d            |                      t          j        j        d            |                      t          j        j        d            |                      t          j        j        d           |                      t          j        j        d            |                      t          j        j        d           |                      t          j        j        d            |                      t          j        j        d           |                      t          j        j        d            |                      t          j	        j        d           |                      t          j	        j        d           |                      t          j
        j        d            |                      t          j
        j        d           |                      t          j        j        d           |                      t          j        j        d           d S )Nz This docstring has no signature.z[docstring_with_invalid_signature($module, /, boo)

This docstring has an invalid signature.zedocstring_with_invalid_signature2($module, /, boo)

--

This docstring also has an invalid signature.z%This docstring has a valid signature.z($module, /, sig)z>
This docstring has a valid signature and some extra newlines.z($module, /, parameter))r'   r   no_docstringr)   __text_signature__docstring_emptydocstring_no_signature docstring_with_invalid_signature!docstring_with_invalid_signature2docstring_with_signature#docstring_with_signature_but_no_doc+docstring_with_signature_and_extra_newlinesr   s    r    test_docstring_signature_parsingz)CAPITest.test_docstring_signature_parsing   s    	/7>>>/BDIII2:DAAA2EtLLL9A.	0 	0 	09LdSSSCK7	 	 	
 	CVX\]]]DL<	 	 	 	DWY]^^^;C3	5 	5 	5;NPcdddFNPTUUUFY	! 	! 	! 	NVM	O 	O 	ONa%	' 	' 	' 	' 	'r   c                    t           j        } |            } |            }|                     ||z  d||f           |                     |dz  d|df           |                     d|z  dd|f           |}||z  }|                     |d||f           |}|dz  }|                     |d|df           d}||z  }|                     |dd|f           d S )Nmatmulrd   imatmul)r   
matmulTyper'   )r   Mm1m2os        r   &test_c_type_with_matrix_multiplicationz/CAPITest.test_c_type_with_matrix_multiplication   s
    QSSQSSb8R"4555b8R"4555b8R"4555	RYB/000	RYB/000	RXr2./////r   c                     t                                           }|                     |                    d          d           |                     |                    dd          d           d S )NrV   )rV   Nrf   )rf   rf   )r   ipowTyper'   __ipow__)r   r   s     r   test_c_type_with_ipowzCAPITest.test_c_type_with_ipow   s_       A	222Aq))622222r   c                    t           rOt          j        d          }t          d|          \  }}}t	          |          }|                     |d           d S |                     t                    5 }t          	                                 d d d            n# 1 swxY w Y   |                     t          |j                  d           d S )Nz
                import _testcapi
                from test import support

                with support.SuppressCrashReport():
                    _testcapi.return_null_without_error()
            r1   a#  Fatal Python error: _Py_CheckFunctionResult: a function returned NULL without setting an exception\nPython runtime state: initialized\nSystemError: <built-in function return_null_without_error> returned NULL without setting an exception\n\nCurrent thread.*:\n  File .*", line 6 in <module>\nzFreturn_null_without_error.* returned NULL without setting an exception)Py_DEBUGtextwrapdedentr	   r   assertRegexr*   SystemErrorr   return_null_without_errorstrrJ   r   codercr>   r   cms         r   test_return_null_without_errorz'CAPITest.test_return_null_without_error  s#     	K? $  D 1t<<LBS$$CS45 5 5 5 5 "";// 62335556 6 6 6 6 6 6 6 6 6 6 6 6 6 6S..JK K K K K   1BBBc                    t           rOt          j        d          }t          d|          \  }}}t	          |          }|                     |d           d S |                     t                    5 }t          	                                 d d d            n# 1 swxY w Y   |                     t          |j                  d           d S )Nz
                import _testcapi
                from test import support

                with support.SuppressCrashReport():
                    _testcapi.return_result_with_error()
            r1   aq  Fatal Python error: _Py_CheckFunctionResult: a function returned a result with an exception set\nPython runtime state: initialized\nValueError\n\nThe above exception was the direct cause of the following exception:\n\nSystemError: <built-in function return_result_with_error> returned a result with an exception set\n\nCurrent thread.*:\n  File .*, line 6 in <module>\nzBreturn_result_with_error.* returned a result with an exception set)r   r   r   r	   r   r   r*   r   r   return_result_with_errorr   rJ   r   s         r   test_return_result_with_errorz&CAPITest.test_return_result_with_error#  s!    	H? $  D 1t<<LBS$$CS78 8 8 8 8  "";// 52224445 5 5 5 5 5 5 5 5 5 5 5 5 5 5S..GH H H H Hr   c                     t          j        d          }t          d|          \  }}}t          |          }d|vr|                     |d           d S |                     d|           d S )Nz
            import _testcapi
            from test import support

            with support.SuppressCrashReport():
                _testcapi.getitem_with_error({1: 2}, 1)
        r1   zSystemError: a  Fatal Python error: _Py_CheckSlotResult: Slot __getitem__ of type dict succeeded with an exception set\nPython runtime state: initialized\nValueError: bug\n\nCurrent thread .* \(most recent call first\):\n  File .*, line 6 in <module>\n\nExtension modules: _testcapi \(total: 1\)\nz'returned a result with an exception set)r   r   r	   r   r   assertInr   r   r   r>   r   s        r   test_getitem_with_errorz CAPITest.test_getitem_with_errorE  s          -T488CC  #%%S	C
D 
D 
D 
D 
D MMCSIIIIIr   c                 8    t                                            d S rA   )r   test_buildvalue_Nr   s    r   r   zCAPITest.test_buildvalue_Nc  s    ##%%%%%r   c                 j   d}t          d|          \  }}}|                                }t          |d          D ]w\  }}|                     d|           |                    d          ^ }}	t          |	          }	|                     |	|dz             |                     |	|dz  dz
             xd S )Na*  if 1:
            import _testcapi

            class C(): pass

            # The first loop tests both functions and that remove_mem_hooks()
            # can be called twice in a row. The second loop checks a call to
            # set_nomemory() after a call to remove_mem_hooks(). The third
            # loop checks the start and stop arguments of set_nomemory().
            for outer_cnt in range(1, 4):
                start = 10 * outer_cnt
                for j in range(100):
                    if j == 0:
                        if outer_cnt != 3:
                            _testcapi.set_nomemory(start)
                        else:
                            _testcapi.set_nomemory(start, start + 1)
                    try:
                        C()
                    except MemoryError as e:
                        if outer_cnt != 3:
                            _testcapi.remove_mem_hooks()
                        print('MemoryError', outer_cnt, j)
                        _testcapi.remove_mem_hooks()
                        break
        r1   rV   s   MemoryError    r   rf   )r
   
splitlines	enumerater   splitintassertLessEqualassertGreaterEqual)
r   r   r   r>   r   linesr   line_counts
             r   test_set_nomemoryzCAPITest.test_set_nomemoryf  s    4 (d33C   ** 	2 	2GAtMM.#...

4((IQJJE  !,,,##E1Q3q51111	2 	2r   c           
          G d dt                     } G d dt                     }dddd}i t                       |             |            |t          |           ||           ||          fD ]}|                     t                              |          t          |                                                     |                     t                              |          t          |                                                     |                     t          	                    |          t          |
                                                     d S )	Nc                   2     e Zd Z fdZ fdZ fdZ xZS )9CAPITest.test_mapping_keys_values_items.<locals>.Mapping1c                 ^    t          t                                                                S rA   )listsuperkeysr   rZ   s    r   r   z>CAPITest.test_mapping_keys_values_items.<locals>.Mapping1.keys  s    EGGLLNN+++r   c                 ^    t          t                                                                S rA   )r   r   valuesr   s    r   r   z@CAPITest.test_mapping_keys_values_items.<locals>.Mapping1.values  s    EGGNN,,---r   c                 ^    t          t                                                                S rA   )r   r   itemsr   s    r   r   z?CAPITest.test_mapping_keys_values_items.<locals>.Mapping1.items  s    EGGMMOO,,,r   r   r   r   r   r   r   __classcell__rZ   s   @r   Mapping1r     sj        , , , , ,. . . . .- - - - - - - - -r   r   c                   2     e Zd Z fdZ fdZ fdZ xZS )9CAPITest.test_mapping_keys_values_items.<locals>.Mapping2c                 ^    t          t                                                                S rA   )tupler   r   r   s    r   r   z>CAPITest.test_mapping_keys_values_items.<locals>.Mapping2.keys  s    UWW\\^^,,,r   c                 ^    t          t                                                                S rA   )r   r   r   r   s    r   r   z@CAPITest.test_mapping_keys_values_items.<locals>.Mapping2.values  s    UWW^^--...r   c                 ^    t          t                                                                S rA   )r   r   r   r   s    r   r   z?CAPITest.test_mapping_keys_values_items.<locals>.Mapping2.items  s    UWW]]__---r   r   r   s   @r   Mapping2r     sj        - - - - -/ / / / /. . . . . . . . .r   r  rV   rf   rg   )foobarspam)dictr   assertListEqualr   get_mapping_keysr   r   get_mapping_valuesr   get_mapping_itemsr   )r   r   r  dict_objmappings        r   test_mapping_keys_values_itemsz'CAPITest.test_mapping_keys_values_items  s|   	- 	- 	- 	- 	-t 	- 	- 	-	. 	. 	. 	. 	.t 	. 	. 	. Q22KMM88::xxzz +h"7"7 **HHX,>,>@ 	8 	8G   !;!;G!D!D!%gllnn!5!57 7 7  !=!=g!F!F!%gnn&6&6!7!79 9 9  !<!<W!E!E!%gmmoo!6!68 8 8 8	8 	8r   c                    |                      t          t          j        d            |                      t          t          j        d            |                      t          t          j        d             G d d          } |            }|                      t          t          j        |           |                      t          t          j        |           |                      t          t          j        |           d S )Nc                        e Zd Zd Zd Zd ZdS )CCAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMappingc                     d S rA   r   r   s    r   r   zHCAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMapping.keys  r   r   c                     d S rA   r   r   s    r   r   zJCAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMapping.values  r   r   c                     d S rA   r   r   s    r   r   zICAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMapping.items  r   r   N)r   r   r   r   r   r   r   r   r   
BadMappingr    sA                r   r  )r*   r+   r   r	  r
  r  rH   )r   r  bad_mappings      r   &test_mapping_keys_values_items_bad_argz/CAPITest.test_mapping_keys_values_items_bad_arg  s    .)*DdKKK.)*FMMM.)*EtLLL	 	 	 	 	 	 	 	 !jll)Y%?MMM)Y%A;OOO)Y%@+NNNNNr   c                    ddi}|                      t                              |d                     |                     t                              |d                      G d dt                    } |ddi          }|                      t                              |d                     |                     t                              |d                     d S )NarV   bc                       e Zd ZdS ).CAPITest.test_mapping_has_key.<locals>.SubDictNrs   r   r   r   SubDictr    ru   r   r  )r(   r   mapping_has_keyassertFalser  )r   dctr  dct2s       r   test_mapping_has_keyzCAPITest.test_mapping_has_key  s    Ah	11#s;;<<<223<<===	 	 	 	 	d 	 	 	 wQx  	11$<<===224==>>>>>r   c                    g d}|                                 }t                              |ddddg           ddg|dd<   |                     ||           |                     |g d            G d d          } |            }t                              |d	d
d           |                     |j        t          d	d
                     |                     |j        d           d}|                     t                    5  t                              |ddd           d d d            n# 1 swxY w Y   |                     |d           d}|                     t                    5  t                              |ddd           d d d            n# 1 swxY w Y   |                     |d           |                     t                    5  t                              d ddd           d d d            n# 1 swxY w Y   dddd}|                     t                    5  t                              |ddd           d d d            n# 1 swxY w Y   |                     |dddd           d S )NrV   rf   rg      r   rV   rg   r   r   )rV   r   r   r%  r   c                       e Zd Zd ZdS )0CAPITest.test_sequence_set_slice.<locals>.Customc                 "    || _         || _        d S rA   )indexvalue)r   r)  r*  s      r   __setitem__z<CAPITest.test_sequence_set_slice.<locals>.Custom.__setitem__  s    "
"


r   N)r   r   r   r+  r   r   r   Customr'    s#        # # # # #r   r,  r   r   abcrV   rf   rg   r%  )r   r   abcdxyr  r  crh   )	copyr   sequence_set_slicer'   r)  slicer*  r*   rH   r   data	data_copyr,  r1  bad_seq1bad_seq2r  s           r   test_sequence_set_slicez CAPITest.test_sequence_set_slice  s   IIKK	$$T1a!Q888Q	!A#y)))///	# 	# 	# 	# 	# 	# 	# 	#
 FHH$$Q1e444%1++...%(((  y)) 	A 	A((1a@@@	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A 	A<000y)) 	? 	?((1a>>>	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	?6*** y)) 	; 	;((q!T:::	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; cc**y)) 	> 	>((!Q===	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	>ccc":":;;;;;sH   D--D14D1*FFFG99G= G=$IIIc                    g d}|                                 }t                              |dd           |dd= |                     ||           |                     |g d            G d d          } |            }t                              |dd           |                     |j        t          dd                     d	}|                     t                    5  t                              |dd           d d d            n# 1 swxY w Y   |                     |d	           d
}|                     t                    5  t                              |dd           d d d            n# 1 swxY w Y   |                     |d
           |                     t                    5  t                              d dd           d d d            n# 1 swxY w Y   dddd}|                     t                    5  t                              |dd           d d d            n# 1 swxY w Y   |                     |dddd           d S )Nr$  rV   rg   )rV   r%  r   c                       e Zd Zd ZdS )0CAPITest.test_sequence_del_slice.<locals>.Customc                     || _         d S rA   )r)  )r   r)  s     r   __delitem__z<CAPITest.test_sequence_del_slice.<locals>.Custom.__delitem__  s    "


r   N)r   r   r   r?  r   r   r   r,  r=    s#        # # # # #r   r,  r   r   r.  r/  r  r  r1  rh   )r2  r   sequence_del_slicer'   r)  r4  r*   rH   r5  s           r   test_sequence_del_slicez CAPITest.test_sequence_del_slice  sM   IIKK	$$T1a000acNy)))yyy)))	# 	# 	# 	# 	# 	# 	# 	# FHH$$Q1---%1++...  y)) 	9 	9((1a888	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9<000y)) 	9 	9((1a888	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	96*** y)) 	5 	5((q!444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 cc**y)) 	8 	8((!Q777	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8ccc":":;;;;;sH    D		DDE//E36E3*GGG>H''H+.H+negative_refcountz need _testcapi.negative_refcountc                     t          j        d          }t          d|          \  }}}|                     |d           d S )Nz
            import _testcapi
            from test import support

            with support.SuppressCrashReport():
                _testcapi.negative_refcount()
        r1   s`   _testcapimodule\.c:[0-9]+: _Py_NegativeRefcount: Assertion failed: object has negative ref count)r   r   r	   r   r   s        r   test_negative_refcountzCAPITest.test_negative_refcount  sZ    
      -T488C;	< 	< 	< 	< 	<r   c                 R    ddl m} d }t          d          D ]} ||f          }d S )Nr   MyList  )r   rG  range)r   rG  Lr   s       r   test_trashcan_subclasszCAPITest.test_trashcan_subclass$  sK     	%$$$$$t 	 	AtAA	 	r   cpuc                 :    |                      t                     d S rA   )do_test_trashcan_python_classr   r   s    r   test_trashcan_python_class1z$CAPITest.test_trashcan_python_class1,  s    **400000r   c                 <    ddl m} |                     |           d S )Nr   rF  )r   rG  rN  )r   rG  s     r   test_trashcan_python_class2z$CAPITest.test_trashcan_python_class20  s.    $$$$$$**622222r   c                      G d d|          }dD ]e}d }t          d          D ]} ||f          }||_        |r|f}|                     |j        d           ~|                     |j        d           fd S )Nc                   ,     e Zd ZdZ fdZ fdZ xZS )6CAPITest.do_test_trashcan_python_class.<locals>.PyListr   c                 T    xj         dz  c_          t                      j        |  d S r   )numr   __init__)r   rx   rZ   s     r   rW  z?CAPITest.do_test_trashcan_python_class.<locals>.PyList.__init__=  s-    "  $''''r   c                 (    xj         dz  c_         d S r   )rV  r   s    r   __del__z>CAPITest.do_test_trashcan_python_class.<locals>.PyList.__del__@  s    "r   )r   r   r   rV  rW  rY  r   r   s   @r   PyListrT  9  sX         C( ( ( ( (# # # # # # # # #r   rZ  )r   rV   i   r   )rI  attrassertGreaterrV  r'   )r   baserZ  parityrJ  r   s         r   rN  z&CAPITest.do_test_trashcan_python_class5  s    	# 	# 	# 	# 	#T 	# 	# 	#  	, 	,FA 5\\  FA4LL Dvz1---VZ++++	, 	,r   c                     |                      t          j        j        d           |                      t          j        j        d           d S )Nsomedocz(arg1, arg2))r'   r   HeapDocCTyper)   r   r   s    r   &test_heap_ctype_doc_and_text_signaturez/CAPITest.test_heap_ctype_doc_and_text_signatureQ  s@    /7CCC/BNSSSSSr   c                 P    |                      t          j        j        d            d S rA   )r'   r   NullTpDocTyper)   r   s    r   test_null_type_doczCAPITest.test_null_type_docU  s$    08$?????r   c                 6    G d dt           j                  } |            }t          j        |          }|                     |j        d           |                     |j        d           ~|                     |dz
  t          j        |                     d S )Nc                        e Zd Z fdZ xZS )`CAPITest.test_subclass_of_heap_gc_ctype_with_tpdealloc_decrefs_once.<locals>.HeapGcCTypeSubclassc                 V    d| _         t                                                       d S Nr   value2r   rW  r   s    r   rW  ziCAPITest.test_subclass_of_heap_gc_ctype_with_tpdealloc_decrefs_once.<locals>.HeapGcCTypeSubclass.__init__Z  &       """""r   r   r   r   rW  r   r   s   @r   HeapGcCTypeSubclassrh  Y  8        # # # # # # # # #r   ro  r   r   rV   )r   HeapGcCTyper7   getrefcountr'   r*  rl  )r   ro  subclass_instancetype_refcnts       r   :test_subclass_of_heap_gc_ctype_with_tpdealloc_decrefs_oncezCCAPITest.test_subclass_of_heap_gc_ctype_with_tpdealloc_decrefs_onceX  s    	# 	# 	# 	# 	#)"7 	# 	# 	#
 0/11o&9:: 	*0"555*12666 q#/:M*N*NOOOOOr   c                     G d dt           j                   G fdd                       }t          j                  }t          j                  }|                     |j        d           |                     |j        d           ~t          r|                     |j                   n|                     |dz
  j                   |                     |dz   j                   |                     |dz
  t          j                             |                     |t          j                             d S )Nc                        e Zd Z fdZ xZS )dCAPITest.test_subclass_of_heap_gc_ctype_with_del_modifying_dunder_class_only_decrefs_once.<locals>.Ac                 V    d| _         t                                                       d S rj  rk  r   s    r   rW  zmCAPITest.test_subclass_of_heap_gc_ctype_with_del_modifying_dunder_class_only_decrefs_once.<locals>.A.__init__k  rm  r   rn  r   s   @r   Arx  j  rp  r   rz  c                   ,     e Zd Z fdZfdZ xZS )dCAPITest.test_subclass_of_heap_gc_ctype_with_del_modifying_dunder_class_only_decrefs_once.<locals>.Bc                 H    t                                                       d S rA   )r   rW  r   s    r   rW  zmCAPITest.test_subclass_of_heap_gc_ctype_with_del_modifying_dunder_class_only_decrefs_once.<locals>.B.__init__p  s      """""r   c                 z    | _         t          j                  _        t          j                  _        d S rA   )rZ   r7   rr  refcnt_in_del)r   rz  Bs    r   rY  zlCAPITest.test_subclass_of_heap_gc_ctype_with_del_modifying_dunder_class_only_decrefs_once.<locals>.B.__del__s  s0    !""%/!"4"4"%/!"4"4r   )r   r   r   rW  rY  r   )rZ   rz  r  s   @r   r  r|  o  sW        # # # # #5 5 5 5 5 5 5 5 5 5r   r  r   r   rV   )	r   rq  r7   rr  r'   r*  rl  r   r  )r   rs  rt  new_type_refcntrz  r  s       @@r   Ptest_subclass_of_heap_gc_ctype_with_del_modifying_dunder_class_only_decrefs_oncezYCAPITest.test_subclass_of_heap_gc_ctype_with_del_modifying_dunder_class_only_decrefs_oncei  s}   	# 	# 	# 	# 	#	% 	# 	# 	#
	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 ACCoa((/!,, 	*0"555*12666  	? [!/::::[1_ao>>>1,ao>>> 	q#/!*<*<=== 	#/!*<*<=====r   c                 ^   t                                           }d|_        |                     |j        d           |                     |j        |j                   |                     |j        ddi           t                                           }|                     i |j                   d S Nrd   r  )r   HeapCTypeWithDictr  r'   dictobj__dict__r-   s     r   test_heaptype_with_dictz CAPITest.test_heaptype_with_dict  s    **,,2&&&t}555r{333**,,T]+++++r   c                 ^   t                                           }d|_        |                     |j        d           |                     |j        |j                   |                     |j        ddi           t                                           }|                     i |j                   d S r  )r   HeapCTypeWithNegativeDictr  r'   r  r  r-   s     r    test_heaptype_with_negative_dictz)CAPITest.test_heaptype_with_negative_dict  s    22442&&&t}555r{3332244T]+++++r   c                     t                                           }t          j        |          }|                      |            |           |                     |j        |           d S rA   )r   HeapCTypeWithWeakrefweakrefrefr'   weakreflist)r   r.   r  s      r   test_heaptype_with_weakrefz#CAPITest.test_heaptype_with_weakref  s]    --//k$%%%)3/////r   c                     t                                           }t          |          }|                     |d           d S )Ns   1234)r   HeapCTypeWithBufferbytesr'   )r   r.   r  s      r   test_heaptype_with_bufferz"CAPITest.test_heaptype_with_buffer  s:    ,,..$KKG$$$$$r   c                 L   t                                           }t          j        t           j                  }|                     |j        d           |                     |j        d           ~|                     |dz
  t          j        t           j                             d S Nr   r   rV   )r   HeapCTypeSubclassr7   rr  r'   r*  rl  )r   rs  rt  s      r   9test_c_subclass_of_heap_ctype_with_tpdealloc_decrefs_oncezBCAPITest.test_c_subclass_of_heap_ctype_with_tpdealloc_decrefs_once  s    %7799oi&ABB 	*0"555*12666 q#/):U*V*VWWWWWr   c                    t                                           }t          j        t           j                  }t          j        t           j                  }|                     |j        d           |                     |j        d           ~t          r&|                     |t           j        j	                   n(|                     |dz
  t           j        j	                   |                     |dz   t           j        j	                   |                     |dz
  t          j        t           j                             |                     |t          j        t           j                             d S r  )
r   HeapCTypeSubclassWithFinalizerr7   rr  r  r'   r*  rl  r   r  )r   rs  rt  r  s       r   Otest_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_oncezXCAPITest.test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once  s4   %DDFFoi&NOO/)*EFF 	*0"555*12666   	f [)*R*`aaaa[1_i.V.deee1,i.I.WXXX 	q#/):b*c*cddd 	#/):U*V*VWWWWWr   c                     t                                           }|                     |j        d           d|_        |                     |j        d           |`|                     |j        d           d S )Nr   r   r   )r   HeapCTypeSetattrr'   pvaluer*  )r   objs     r   test_heaptype_with_setattroz$CAPITest.test_heaptype_with_setattro  sm    ((**R(((	R(((IQ'''''r   c                     G d dt           j        t           j                  } G d dt           j        t           j                  }t           j        t           j        t           j        t           j        fD ]d}t           j        t           j        t           j        t           j        fD ]}||ur G d d||          } G d d||          } G d	 d
||          }ed S )Nc                       e Zd ZdS )MCAPITest.test_multiple_inheritance_ctypes_with_weakref_or_dict.<locals>.Both1Nrs   r   r   r   Both1r    ru   r   r  c                       e Zd ZdS )MCAPITest.test_multiple_inheritance_ctypes_with_weakref_or_dict.<locals>.Both2Nrs   r   r   r   Both2r    ru   r   r  c                       e Zd ZdS )ICAPITest.test_multiple_inheritance_ctypes_with_weakref_or_dict.<locals>.SNrs   r   r   r   Sr    s        r   r  c                       e Zd ZdS )JCAPITest.test_multiple_inheritance_ctypes_with_weakref_or_dict.<locals>.B1Nrs   r   r   r   B1r            r   r  c                       e Zd ZdS )JCAPITest.test_multiple_inheritance_ctypes_with_weakref_or_dict.<locals>.B2Nrs   r   r   r   B2r    r  r   r  )r   r  r  HeapCTypeWithDict2HeapCTypeWithWeakref2)r   r  r  rm   cls2r  r  r  s           r   5test_multiple_inheritance_ctypes_with_weakref_or_dictz>CAPITest.test_multiple_inheritance_ctypes_with_weakref_or_dict  sU   	 	 	 	 	I2I4O 	 	 		 	 	 	 	I/1O 	 	 	 /1M*I,KM 
	 
	C"4i6R.	0OQ  d??    C       UC       UC    
	 
	r   c                    ddl m} |                      |dd          d           |                      |dd          d           |                      |dd          d	           |                      |dd
          d           |                      |dd          d           |                      |dd          d           |                      |dd          d           |                      |dd
          d           |                     t          |dd           |                     t          |d	d           |                     t
          |dd           d S )Nr   )pynumber_tobase{   rf   	0b1111011r   0o173r   123   0x7biz
-0b1111011z-0o173z-123z-0x7bg     ^@)r   r  r'   r*   rH   r   )r   r  s     r   test_pynumber_tobasezCAPITest.test_pynumber_tobase  sx   ------a00+>>>a00':::b115999b116:::q11<@@@q118<<<r22F;;;r22G<<<)_eR@@@)_eR@@@+Q?????r   r   c                    t          j                    5  t          dd|          \  }}}d d d            n# 1 swxY w Y   t          |          }|                     d|           t          j        d|t
          j                  }|s|                     d|           t          |
                    d                                                              d                    }t          |
                    d                    }	|D ]}
|                     |
|           |D ]}
|                     |
|           |                     t!          |          |	           d S )	Nz-sSIr1   z.Fatal Python error: test_fatal_error: MESSAGE
z,^Extension modules:(.*) \(total: ([0-9]+)\)$z$Cannot find 'Extension modules:' in rV   z, rf   )r   r4   r	   r   r   research	MULTILINErI   setgroupstripr   r   assertNotInr'   len)r   r   expectednot_expectedr   r>   r   matchmodulestotalnames              r   check_fatal_errorzCAPITest.check_fatal_error   s   (** 	E 	E0tDDLBS	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E C  G	 	 	 	Ir|- - 	FIIDSDDEEEekk!nn**,,2248899EKKNN## 	) 	)DMM$((((  	, 	,DT7++++Wu-----s   6::c                     d}d}d}|                      |||           d}d}t          j        d          }|                      ||           d S )N)r   )r7   z8import _testcapi, sys; _testcapi.fatal_error(b"MESSAGE")z
            import _testcapi, sys
            sys.stdlib_module_names = frozenset({"_testcapi"})
            _testcapi.fatal_error(b"MESSAGE")
        )r  r   r   )r   r  r  r   s       r   test_fatal_errorzCAPITest.test_fatal_error  sk     "ItX|<<< %    
 	tX.....r   c                 d    t                                           }|                     |d           d S Nz<NULL>)r   pyobject_repr_from_nullr'   r   ss     r   test_pyobject_repr_from_nullz%CAPITest.test_pyobject_repr_from_null(  s/    --//H%%%%%r   c                 d    t                                           }|                     |d           d S r  )r   pyobject_str_from_nullr'   r  s     r   test_pyobject_str_from_nullz$CAPITest.test_pyobject_str_from_null,  s/    ,,..H%%%%%r   c                 d    t                                           }|                     |d           d S )Ns   <NULL>)r   pyobject_bytes_from_nullr'   r  s     r   test_pyobject_bytes_from_nullz&CAPITest.test_pyobject_bytes_from_null0  s/    ..00I&&&&&r   c                     t           j        }d} ||          }t          |dd          }|                     |j        |j                   d S )Ns%   # -*- coding: latin1 -*-
print('¤')
z<string>exec)r   Py_CompileStringcompiler'   	co_consts)r   _compiler   resultr  s        r   test_Py_CompileStringzCAPITest.test_Py_CompileString4  sO    -?$4V44)8+=>>>>>r   c                    t          j        d          }g }t          t          d          r|                    d           t
          j        dk    r|                    d           |D ]X}|                     |          5  |                     t          |j	        |                     d d d            n# 1 swxY w Y   Yd S )Nctypesget_native_idPyThread_get_thread_native_idntPy_FrozenMain)r  )
r   import_modulehasattr_threadappendosr  subTestr(   	pythonapi)r   r  namesr  s       r   test_export_symbolszCAPITest.test_export_symbols<  s    ,X66 7O,, 	:LL8999 7d??LL))) 	A 	AD4(( A A(8$ ? ?@@@A A A A A A A A A A A A A A A	A 	As    )B55B9	<B9	c                     d } G d d          }|                      t                              |          d           |                      t                              |j                  d           |                      t                               |            j                  d           |                      t                              t                    d           |                      t                              |          d           d S )Nc                      d S rA   r   r   r   r   function_examplez:CAPITest.test_eval_get_func_name.<locals>.function_exampleT        r   c                       e Zd Zd ZdS )+CAPITest.test_eval_get_func_name.<locals>.Ac                     d S rA   r   r   s    r   method_examplez:CAPITest.test_eval_get_func_name.<locals>.A.method_exampleW  r  r   Nr   r   r   r  r   r   r   rz  r  V          )))))r   rz  r  r  sumr|   )r'   r   eval_get_func_namer  r  r   r  rz  s      r   test_eval_get_func_namez CAPITest.test_eval_get_func_nameS  s   ###	* 	* 	* 	* 	* 	* 	* 	* 	556FGG+	- 	- 	-55a6FGG)	+ 	+ 	+55aacc6HII)	+ 	+ 	+55c::EBBB55a88&AAAAAr   c                     d } G d d          }|                      t                              |          d           |                      t                              |j                  d           |                      t                               |            j                  d           |                      t                              t                    d           |                      t                              |          d           d S )Nc                      d S rA   r   r   r   r   r  z:CAPITest.test_eval_get_func_desc.<locals>.function_examplec  r  r   c                       e Zd Zd ZdS )+CAPITest.test_eval_get_func_desc.<locals>.Ac                     d S rA   r   r   s    r   r  z:CAPITest.test_eval_get_func_desc.<locals>.A.method_examplef  r  r   Nr  r   r   r   rz  r  e  r  r   rz  z()z object)r'   r   eval_get_func_descr  r  r  s      r   test_eval_get_func_descz CAPITest.test_eval_get_func_descb  s   ###	* 	* 	* 	* 	* 	* 	* 	* 	556FGG	 	 	55a6FGG	 	 	55aacc6HII	 	 	55c::DAAA55a88)DDDDDr   c                 N   dd l }d }t                              |          }|                     ||j                   |                     ||j                   |                     t                    5  t                              d            d d d            d S # 1 swxY w Y   d S )Nr   c                      d S rA   r   r   r   r   somez-CAPITest.test_function_get_code.<locals>.somet      Dr   )	typesr   function_get_codery   CodeTyper'   __code__r*   r   )r   r  r  r   s       r   test_function_get_codezCAPITest.test_function_get_codeq  s    	 	 	 **400dEN333t}---{++ 	. 	.''---	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	.s   2BB!Bc                 F   d }t                               |          }|                     |t                     |                     ||j                   |                     t                    5  t                               d            d d d            d S # 1 swxY w Y   d S )Nc                      d S rA   r   r   r   r   r  z0CAPITest.test_function_get_globals.<locals>.some  r  r   )r   function_get_globalsry   r  r'   __globals__r*   r   )r   r  globals_s      r   test_function_get_globalsz"CAPITest.test_function_get_globals~  s    	 	 	 11$77h---4#3444{++ 	1 	1**4000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1   .BBBc                 F   d }t                               |          }|                     |t                     |                     ||j                   |                     t                    5  t                               d            d d d            d S # 1 swxY w Y   d S )Nc                      d S rA   r   r   r   r   r  z/CAPITest.test_function_get_module.<locals>.some  r  r   )r   function_get_modulery   r   r'   r   r*   r   )r   r  modules      r   test_function_get_modulez!CAPITest.test_function_get_module  s    	 	 	 ..t44fc***111{++ 	0 	0))$///	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0r  c                    t           j        }|                      |d          t          j                   t          j        t          dd          5  |                      |d                                          d           d d d            n# 1 swxY w Y   |                      |d          t                     |                      |d          t                     d S )Ns   stdout   🐍rd   s   nonexisting   )
r   sys_getobjectassertIsr7   r2   r   	swap_attrr'   encoder+   )r   	getobjects     r   test_sys_getobjectzCAPITest.test_sys_getobject  s   +	ii	**CJ777sL"55 	C 	CYY|':':'<'<==rBBB	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	ii//@@@ii((.99999s   2BBBc                    t           j        }dg}dg}	 |                      |d|          d           |                     t          j        |           |                      |d|          d           |                     t          j        |           |                      |dt                    d           |                     t          t          d                     |                      |dt                    d           t          j
        t                    5  t          `d d d            n# 1 swxY w Y   n=# t          j
        t                    5  t          `d d d            w # 1 swxY w Y   w xY w	 |                      |d                                |          d           |                     t          t          d          |           |                      |d                                t                    d           |                     t          t          d                     t          j
        t                    5  t          t          d           d d d            n# 1 swxY w Y   nK# t          j
        t                    5  t          t          d           d d d            w # 1 swxY w Y   w xY w|                     t                     5   |d|           d d d            d S # 1 swxY w Y   d S )Nr*  rl  s   newattrr   newattrr   r!  )r   sys_setobjectr'   r#  r7   r)  NULLr  r  
contextlibsuppressr+   r%  getattrdelattrr*   UnicodeDecodeError)r   	setobjectr*  rl  s       r   test_sys_setobjectzCAPITest.test_sys_setobject  s   +		
	 YYz5991===MM#+u---YYz6::A>>>MM#+v...YYz488!<<<WS)44555YYz488!<<<$^44    K                             $^44    K                               	+YY|':':'<'<eDDaHHHMM'#|44e<<<YY|':':'<'<dCCQGGGWS,77888$^44 + +\***+ + + + + + + + + + + + + + +$^44 + +\***+ + + + + + + + + + + + + + + + 122 	& 	&Igu%%%	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	&s   C2D? D33D7:D7?E9E-!E9-E11E94E15E9=B:I> I22I69I6>KJ:.K:J>>KJ>K#K==LLN)r   )Br   r   r   r/   r   requires_subprocessr?   rD   rT   rb   r   unittest
skipUnlessr   r   r   skipIfr   r   r   r   r   r   r   r   r   r  r  r"  r:  rA  r  r   rD  rK  requires_resourcerO  rQ  rN  rb  re  ru  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r'  r2  r   r   r   r#   r#   ;   sf       	[ 	[ 	[ !W ""  #"$S S S. . .,# # #.7 7 78 X)+UVVk k WVk" X)+UVVp p WVp X_)MO O'' ''O O''R0 0 0"3 3 3K K K: H  H  HDJ J J<& & &"2 "2 "2H8 8 86O O O"
? 
? 
?'< '< '<R%< %< %<N X,?@@;= =< <= =<    Wu%%1 1 &%1 Wu%%3 3 &%3, , ,8T T T@ @ @P P P"&> &> &>P, , ,, , ,0 0 0% % %

X 
X 
XX X X6( ( (  &@ @ @. . . .* !W ""/ / #"/$& & && & &' ' '? ? ?A A A.B B BE E E. . .	1 	1 	1	0 	0 	0: : :& & & & &r   r#   c                   X    e Zd Zd ZddZ ej                    d             Zd Zd Z	dS )TestPendingCallsc                     fd}t          |          D ]G}t          j        t          j                    dz             	 t                              |          rnHd S )Nc                  2                          d            d S rA   )r  )ls   r   callbackz6TestPendingCalls.pendingcalls_submit.<locals>.callback  s     HHTNNNNNr   g{Gz?)rI  timesleeprandomr   _pending_threadfunc)r   r<  nr=  r   s    `   r   pendingcalls_submitz$TestPendingCalls.pendingcalls_submit  s~    	 	 	 	 	
 q 	 	AJv}t+,,,00:: 	 	r   Nc                     d}t          |          |k    rx	 t	          d          D ]}||z  }|r|j                                        sG|dz  }|                     |dk     d|t          |          fz             t          |          |k    xd S )Nr   Fz(%i)rH  rV   i'  z(timeout waiting for %i callbacks, got %i)r  r   verboseprintrI  eventis_setr(   )r   r<  rB  contextr   r   r  s          r   pendingcalls_waitz"TestPendingCalls.pendingcalls_wait  s    !ffkk)4[[  aC w}3355 QJEOOEEM:As1vv;FH H H !ffkk	$ 	$r   c                     d}g } G d dt                     } |            g _        d_        |j        z  _        d_        t          j                    _        t          j                    _	         fdt          j                  D             }t          j        |          5                       j        |           d d d            d S # 1 swxY w Y   d S )N    c                       e Zd ZdS )8TestPendingCalls.test_pendingcalls_threaded.<locals>.fooNrs   r   r   r   r  rN    s          r   r  rf   r   c                 H    g | ]}t          j        j        f           S ))targetrx   )	threadingThreadpendingcalls_thread).0r   rI  r   s     r   
<listcomp>z?TestPendingCalls.test_pendingcalls_threaded.<locals>.<listcomp>  sE     5 5 5 #4+C*15 5 5 5 5 5r   )r   r<  rB  nThreads	nFinishedrQ  LocklockEventrG  rI  r   start_threadsrJ  )r   rB  threadsr  rI  s   `   @r   test_pendingcalls_threadedz+TestPendingCalls.test_pendingcalls_threaded  s@    &#%%			> ~''!))5 5 5 5 5!'"2335 5 5 +G44 	: 	:""79a999	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	:s   -CCCc                    	 |                      |j        |j                   |j        5  |xj        dz  c_        |j        }	 d d d            n# 1 swxY w Y   ||j        k    r|j	        
                                 d S d S # |j        5  |xj        dz  c_        |j        }	 d d d            n# 1 swxY w Y   ||j        k    r|j	        
                                 w w xY wr   )rC  r<  rB  rY  rW  r   rE  rF  rV  rG  r  )r   rI  rW  s      r   rS  z$TestPendingCalls.pendingcalls_thread  s   		$$$WY	::: ; ;!!Q&!!#-	;; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
 G,,,!!##### -,  ; ;!!Q&!!#-	;; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
 G,,,!!#### -s@    B AAAC	B."C.B22C5B26)Cc                 f    g }d}|                      ||           |                     ||           d S )N@   )rC  rJ  )r   r<  rB  s      r   test_pendingcalls_non_threadedz/TestPendingCalls.test_pendingcalls_non_threaded  s@    
   A&&&q!$$$$$r   rA   )
r   r   r   rC  rJ  r   requires_working_threadingr]  rS  ra  r   r   r   r9  r9    s}          $ $ $ $& 1022: : 32:(
$ 
$ 
$% % % % %r   r9  c                       e Zd Z ej         eed          d          d             Z ej         eed          d          d             Zd Z	 ej
        edu d          d             ZdS )	SubinterpreterTestpipezrequires os.pipe()c                    dd l }t          j                    \  }}d                    |          }t	          |d          5 }t          j        |          }|                     |d           |                     t          j
        |          t          t          j                             |                     t          j
        |          t          |                     d d d            d S # 1 swxY w Y   d S )Nr   zif 1:
            import sys, builtins, pickle
            with open({:d}, "wb") as f:
                pickle.dump(id(sys.modules), f)
                pickle.dump(id(builtins), f)
            rb)builtinsr  re  formatopenr   run_in_subinterpr'   assertNotEqualpickleloadr!   r7   r  )r   rh  rwr   frets          r   test_subinterpsz"SubinterpreterTest.test_subinterps  s   wyy1
 q		 	 !T]] 	>a*400CS!$$$A3;@@@A8===		> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	>s    BC,,C03C0c                 X   t          j                    \  }}d                    |          }t          |d          5 }t	          j        |          }|                     |d           |                     t          j        |          ddd           d d d            d S # 1 swxY w Y   d S )Naa  if 1:
            import pickle
            with open({:d}, "wb") as f:

                @(lambda x:x)  # Py 3.9
                def noop(x): return x

                a = (b := f'1{{2}}3') + noop('x')  # Py 3.8 (:=) / 3.6 (f'')

                async def foo(arg): return await arg  # Py 3.5

                pickle.dump(dict(a=a, b=b), f)
            rg  r   123xr  )r  r  )	r  re  ri  rj  r   rk  r'   rm  rn  )r   ro  rp  r   rq  rr  s         r   (test_subinterps_recent_language_featuresz;SubinterpreterTest.test_subinterps_recent_language_features  s    wyy1 q		 	 !T]] 	Ha*400CS!$$$V[^^6-F-FGGG	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	Hs   ABB#&B#c                     ddl }t          j        d           |                     t	          |j        d                     dS )z
        Exceptions saved in global module state get shared between
        individual module instances. This test checks whether or not
        a change in one interpreter's module gets reflected into the
        other ones.
        r   Nz1import binascii; binascii.Error.foobar = 'foobar'foobar)binasciir   rk  r  r  Error)r   ry  s     r   test_mutate_exceptionz(SubinterpreterTest.test_mutate_exception5  sE     	 !TUUU::;;;;;r   N$test requires _testmultiphase modulec                    t          j                    \  }}|                     t           j        |           |                     t           j        |           t	          j        d| d          }t          |           t          j        |d          }t          j	        |          }| 
                    |d           t          j        |d          }| 
                    ||           dS )z
        bpo-44050: Extension module state should be shared between interpreters
        when it doesn't support sub-interpreters.
        a  
            import importlib.machinery
            import importlib.util
            import os

            fullname = '_test_module_state_shared'
            origin = importlib.util.find_spec('_testmultiphase').origin
            loader = importlib.machinery.ExtensionFileLoader(fullname, origin)
            spec = importlib.util.spec_from_loader(fullname, loader)
            module = importlib.util.module_from_spec(spec)
            attr_id = str(id(module.Error)).encode()

            os.write(z, attr_id)
            d   r   N)r  re  
addCleanupcloser   r   r  readr   rk  r'   )r   ro  rp  scriptmain_attr_idrr  subinterp_attr_ids          r   "test_module_state_shared_in_globalz5SubinterpreterTest.test_module_state_shared_in_globalB  s     wyy1!$$$!$$$ " " " "   	Vwq#&v..a   GAsOO'899999r   )r   r   r   r4  r5  r  r  rs  rv  r{  r6  _testmultiphaser  r   r   r   rd  rd    s        XV,,.BCC> > DC> XV,,.BCCH H DCH*< < < X__,.TUU: : VU: : :r   rd  c                       e Zd Zej         ej                    d                         Zej         ej                    d                         ZdS )TestThreadStatec                       fd} |             t          j        |          }|                                 |                                 d S )Nc                      g fd} t                               |            | x}}t          j        d                                                   t          j                              dd           d S )Nc                  T                          t          j                               d S rA   )r  rQ  	get_ident)identss   r   r=  zCTestThreadState.test_thread_state.<locals>.target.<locals>.callbackl  s$    i13344444r   rV   rg   z/Couldn't find main thread correctly in the list)r   _test_thread_stater>  r?  r'   r   rQ  r  )r=  r  r  r  r   s      @r   rP  z1TestThreadState.test_thread_state.<locals>.targeti  s    F5 5 5 5 5 ((222AJqMMMV\\)*=*?*?@@!NP P P P Pr   )rP  )rQ  rR  startjoin)r   rP  ts   `  r   test_thread_statez!TestThreadState.test_thread_statee  s_    	P 	P 	P 	P 	P 	F+++					r   c                     t          j        d          }t          ddd|          }|                     d|j                   d S )Nz
            import _testcapi

            def callback():
                print('callback called')

            _testcapi._test_thread_state(callback)
            z-Xtracemallocr1   s   callback called)r   r   r
   r   r>   )r   r   rr  s      r    test_gilstate_ensure_no_deadlockz0TestThreadState.test_gilstate_ensure_no_deadlock{  sL          t]D$??(#'22222r   N)r   r   r   r   reap_threadsrb  r  r  r   r   r   r  r  c  s~        "0022  32 #"( "00223 3 32 #"3 3 3r   r  c                       e Zd Z e                                d  ee          D                         ej        e	          d             Z
d ZdS )Test_testcapic              #      K   | ]E}|                     d           |                    d          ,|t          t          |          fV  FdS )test__codeN)r<   endswithr.  r   rT  r  s     r   	<genexpr>zTest_testcapi.<genexpr>  st       P Pw//P8<g8N8NPT79d334 P P P P P Pr   )categoryc                 8    t                                            d S rA   )r   test_widecharr   s    r   r  zTest_testcapi.test_widechar  s    !!!!!r   c                 Z    |                      t          j        t          j                   d S rA   )r'   r   
Py_Versionr7   
hexversionr   s    r   test_version_api_dataz#Test_testcapi.test_version_api_data  s#    -s~>>>>>r   N)r   r   r   localsupdatedirr   r   ignore_warningsDeprecationWarningr  r  r   r   r   r  r    s        
FHHOO P P #IP P P P P P
 %_$.@AAA" " BA"? ? ? ? ?r   r  c                   n    e Zd Z e                                d  ee          D                        dS )Test_testinternalcapic              #   n   K   | ]0}|                     d           |t          t          |          fV  1dS )r  N)r<   r.  _testinternalcapir  s     r   r  zTest_testinternalcapi.<genexpr>  sW       1 1w//1T7#4d;;< 1 1 1 1 1 1r   N)r   r   r   r  r  r  r  r   r   r   r  r    sW        
FHHOO 1 1 #$5 6 61 1 1 1 1 1 1 1r   r  c                   X    e Zd ZdZdZd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd ZdS )PyMemDebugTestsdebugz(?:0x)?[0-9a-fA-F]+c                     t          j                    5  t          d|| j        d          }d d d            n# 1 swxY w Y   |j        }|                    dd          S )Nr1   
junk:falsePYTHONMALLOCMALLOC_CONFasciir   )r   r4   r	   r  r   r   )r   r   r>   r3   s       r   checkzPyMemDebugTests.check  s    (** 	 	'd!. )  C	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 }}Wi000s   9= =c                     |                      d          }d}|                    | j                  }t          j        |t          j                  }|                     ||           d S )Nz3import _testcapi; _testcapi.pymem_buffer_overflow()a6  Debug memory block at address p={ptr}: API 'm'\n    16 bytes originally requested\n    The [0-9] pad bytes at p-[0-9] are FORBIDDENBYTE, as expected.\n    The [0-9] pad bytes at tail={ptr} are not all FORBIDDENBYTE \(0x[0-9a-f]{{2}}\):\n        at tail\+0: 0x78 \*\*\* OUCH\n        at tail\+1: 0xfd\n        at tail\+2: 0xfd\n        .*\n(    The block was made by call #[0-9]+ to debug malloc/realloc.\n)?    Data at p: cd cd cd .*\n\nEnable tracemalloc to get the memory block allocation traceback\n\nFatal Python error: _PyMem_DebugRawFree: bad trailing pad byteptr)flags)r  ri  	PTR_REGEXr  r  DOTALLr   r   r>   regexs      r   test_buffer_overflowz$PyMemDebugTests.test_buffer_overflow  se    jjNOOS 00
5	222e$$$$$r   c                     |                      d          }d}|                    | j                  }|                     ||           d S )Nz.import _testcapi; _testcapi.pymem_api_misuse()a  Debug memory block at address p={ptr}: API 'm'\n    16 bytes originally requested\n    The [0-9] pad bytes at p-[0-9] are FORBIDDENBYTE, as expected.\n    The [0-9] pad bytes at tail={ptr} are FORBIDDENBYTE, as expected.\n(    The block was made by call #[0-9]+ to debug malloc/realloc.\n)?    Data at p: cd cd cd .*\n\nEnable tracemalloc to get the memory block allocation traceback\n\nFatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API 'm', verified using API 'r'\nr  )r  ri  r  r   r  s      r   test_api_misusezPyMemDebugTests.test_api_misuse  sO    jjIJJ	w 00e$$$$$r   c                 `    |                      |          }d}|                     ||           d S )Nz^Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called without holding the GIL)r  r   )r   r   r>   r  s       r   check_malloc_without_gilz(PyMemDebugTests.check_malloc_without_gil  s5    jjMh$$$$$r   c                 4    d}|                      |           d S )Nz6import _testcapi; _testcapi.pymem_malloc_without_gil()r  r   r   s     r   test_pymem_malloc_without_gilz-PyMemDebugTests.test_pymem_malloc_without_gil  s$     H%%d+++++r   c                 4    d}|                      |           d S )Nz9import _testcapi; _testcapi.pyobject_malloc_without_gil()r  r  s     r    test_pyobject_malloc_without_gilz0PyMemDebugTests.test_pyobject_malloc_without_gil  s$     K%%d+++++r   c                 f    t          j        d| d          }t          d|| j        d           d S )Nz
            import gc, os, sys, _testcapi
            # Disable the GC to avoid crash on GC collection
            gc.disable()
            try:
                _testcapi.z()
                # Exit immediately to avoid a crash while deallocating
                # the invalid object
                os._exit(0)
            except _testcapi.error:
                os._exit(1)
        r1   r  r  )r   r   r
   r  )r   	func_namer   s      r   check_pyobject_is_freedz'PyMemDebugTests.check_pyobject_is_freed  s]      
 %        	$*$	
 	
 	
 	
 	
 	
r   c                 0    |                      d           d S )Ncheck_pyobject_null_is_freedr  r   s    r   test_pyobject_null_is_freedz+PyMemDebugTests.test_pyobject_null_is_freed  s    $$%CDDDDDr   c                 0    |                      d           d S )N%check_pyobject_uninitialized_is_freedr  r   s    r   $test_pyobject_uninitialized_is_freedz4PyMemDebugTests.test_pyobject_uninitialized_is_freed  s    $$%LMMMMMr   c                 0    |                      d           d S )N'check_pyobject_forbidden_bytes_is_freedr  r   s    r   &test_pyobject_forbidden_bytes_is_freedz6PyMemDebugTests.test_pyobject_forbidden_bytes_is_freed  s    $$%NOOOOOr   c                 0    |                      d           d S )Ncheck_pyobject_freed_is_freedr  r   s    r   test_pyobject_freed_is_freedz,PyMemDebugTests.test_pyobject_freed_is_freed  s    $$%DEEEEEr   N)r   r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r   r  r    s        L&I
1 
1 
1% % %(% % %% % %, , ,, , ,
 
 
&E E EN N NP P PF F F F Fr   r  c                       e Zd ZdZdS )PyMemMallocDebugTestsmalloc_debugNr   r   r   r  r   r   r   r  r    s        !LLLr   r  zneed pymallocc                       e Zd ZdZdS )PyMemPymallocDebugTestspymalloc_debugNr  r   r   r   r  r  
  s        #LLLr   r  zneed Py_DEBUGc                       e Zd ZdZdS )PyMemDefaultTestsr   Nr  r   r   r   r  r    s         LLLr   r  r|  c                   6    e Zd ZdZd Zd Zd Zd Zd Zd Z	dS )	Test_ModuleStateAccessz%Test access to module start (PEP 573)c                 H   d}t           j                            d          j        }t           j                            ||          }t           j                            ||          }t           j                            |          }|                    |           || _	        d S )N!_testmultiphase_meth_state_accessr  )
	importlibutil	find_specorigin	machineryExtensionFileLoaderspec_from_loadermodule_from_specexec_moduler  )r   fullnamer  loaderspecr  s         r   setUpzTest_ModuleStateAccess.setUp  s    6))*;<<C$886JJ~..x@@00666"""r   c                      G d d| j         j                  } |            }|                     |                                | j                    dS )z#PyType_GetModule for defining_classc                       e Zd ZdS )QTest_ModuleStateAccess.test_subclass_get_module.<locals>.StateAccessType_SubclassNrs   r   r   r   StateAccessType_Subclassr  (  ru   r   r  Nr  StateAccessTyper#  get_defining_moduler   r  instances      r   test_subclass_get_modulez/Test_ModuleStateAccess.test_subclass_get_module&  si    	 	 	 	 	t{'B 	 	 	 ,+--h2244dkBBBBBr   c                      G d d| j         j                  } |            }|                     |                                | j                    d S )Nc                        e Zd Z fdZ xZS )\Test_ModuleStateAccess.test_subclass_get_module_with_super.<locals>.StateAccessType_Subclassc                 D    t                                                      S rA   )r   r  r   s    r   r  zpTest_ModuleStateAccess.test_subclass_get_module_with_super.<locals>.StateAccessType_Subclass.get_defining_module0  s    ww22444r   )r   r   r   r  r   r   s   @r   r  r  /  s8        5 5 5 5 5 5 5 5 5r   r  r  r  s      r   #test_subclass_get_module_with_superz:Test_ModuleStateAccess.test_subclass_get_module_with_super.  si    	5 	5 	5 	5 	5t{'B 	5 	5 	5 ,+--h2244dkBBBBBr   c                 h   | j                                         }| j                                         }|j        |j        d}|                                D ]Z\  }}|                     |          5  |                     |                                |                                           |                     |                                d            |             |                     |                                |                                           |                     |                                d            |d           |                     |                                |                                           |                     |                                d            |dd           |                     |                                |                                           |                     |                                d           |                     t                    5   |d	           d
d
d
           n# 1 swxY w Y   |                     t                    5   |ddd           d
d
d
           n# 1 swxY w Y   d
d
d
           n# 1 swxY w Y   \d
S )zChecks methods defined with and without argument clinic

        This tests a no-arg method (get_count) and a method with
        both a positional and keyword argument.
        )clinicnoclinicr   rV   rg   r%  T)twice)thriceNrf   )
r  r  increment_count_clinicincrement_count_noclinicr   r  r'   	get_countr*   rH   )r   r  r  methodsr  increment_counts         r   test_state_accessz(Test_ModuleStateAccess.test_state_access6  s    K''))K'')) .2
 

 &-]]__ 	- 	-!D/d## - -  >>>  222!!!  >>>  222"""  >>>  222$////  >>>  222&&y11 . .#O1----. . . . . . . . . . . . . . . &&y11 - -#OAq!,,,- - - - - - - - - - - - - - -'- - - - - - - - - - - - - - -	- 	-s[   1GJ%6IJ%IJ%IJ%4JJ%JJ%JJ%%J)	,J)	c                     | j                                         }|                     t                    5  |                                 d d d            d S # 1 swxY w Y   d S rA   )r  r  r*   rH   getmodulebydef_bad_def)r   r  s     r   test_get_module_bad_defz.Test_ModuleStateAccess.test_get_module_bad_def\  s     ;..00y)) 	. 	.++---	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	.s   AAAc                      G d dt           | j        j                  }|                      |                                            | j                   d S )Nc                       e Zd ZdS )FTest_ModuleStateAccess.test_get_module_static_in_mro.<locals>.SubclassNrs   r   r   r   Subclassr  h  ru   r   r  )BaseExceptionr  r  r#  r  )r   r  s     r   test_get_module_static_in_mroz4Test_ModuleStateAccess.test_get_module_static_in_mrod  sa    	 	 	 	 	}dk&A 	 	 	hhjj4466DDDDDr   N)
r   r   r   r)   r  r  r  r  r  r  r   r   r   r  r    s        //  C C CC C C$- $- $-L. . .E E E E Er   r  c                   ,    e Zd Zd Zd Zd Zd Zd ZdS )Test_FrameAPIc                 (    t          j                    S rA   r7   	_getframer   s    r   getframezTest_FrameAPI.getframeo  s    }r   c              #   4   K   t          j                    V  d S rA   r  r   s    r   getgenframezTest_FrameAPI.getgenframer  s      moor   c                    |                                  }|                     |j        t                              |                     |                     |j        t                              |                     |                     |j        t          	                    |                     |                     |j
        t                              |                     d S rA   )r  r'   f_localsr   frame_getlocalsr#  	f_globalsframe_getglobals
f_builtinsframe_getbuiltinsf_lastiframe_getlasti)r   frames     r   test_frame_gettersz Test_FrameAPI.test_frame_gettersu  s    )B)B5)I)IJJJeoy'A'A%'H'HIIIe&	(C(CE(J(JKKK	(@(@(G(GHHHHHr   c                     |                                  }t          |          }|                     |t                              |                     d S rA   )r!  nextr#  r   frame_getgenerator)r   genr+  s      r   test_frame_get_generatorz&Test_FrameAPI.test_frame_get_generator|  sF      S		c977>>?????r   c                     d }t                               |j        t                      t	                                }|                     |j                   dS )zzTest that accessing `f_back` does not cause a segmentation fault on
        a frame created with `PyFrame_New` (GH-99110).c                      d S rA   r   r   r   r   dummyz1Test_FrameAPI.test_frame_fback_api.<locals>.dummy  r  r   N)r   	frame_newr  globalsr  assertIsNonef_back)r   r4  r+  s      r   test_frame_fback_apiz"Test_FrameAPI.test_frame_fback_api  sP    	 	 	 ##ENGIIvxxHH%,'''''r   N)r   r   r   r  r!  r,  r1  r9  r   r   r   r  r  m  se            I I I@ @ @
( ( ( ( (r   r  r~  c                        e Zd Zd Zd Zd ZdS )Test_Pep523APIc                    g }t           }|t           z   }	 t          |          D ]&}||k    rt          j        |            |             '	 t          j                     n# t          j                     w xY w|t           z  }|                     t          |          t          |                     t          ||d          D ]\  }}	|                     ||	           d S )NT)strict)"SUFFICIENT_TO_DEOPT_AND_SPECIALIZErI  r  set_eval_frame_recordset_eval_frame_defaultr'   r  zip)
r   funcr  actual_callsr  r   r   expected_callsr  actuals
             r   do_testzTest_Pep523API.do_test  s    2::	75\\  ::%;LIII
 4666646666!CC^,,c,.?.?@@@ #NL N N N 	/ 	/HfXv....	/ 	/s   6A   A5c                 `     G d d          fd}ddg}|                      ||           d S )Nc                       e Zd Zd ZdS )4Test_Pep523API.test_inlined_binary_subscr.<locals>.Cc                     d S rA   r   )r   others     r   r   z@Test_Pep523API.test_inlined_binary_subscr.<locals>.C.__getitem__  r   r   N)r   r   r   r   r   r   r   CrI    s#            r   rL  c                  (                  d          d S Nrd   r   )rL  s   r   rB  z7Test_Pep523API.test_inlined_binary_subscr.<locals>.func  s    ACCGGGGr   rB  r   rF  )r   rB  r  rL  s      @r   test_inlined_binary_subscrz)Test_Pep523API.test_inlined_binary_subscr  sh    	 	 	 	 	 	 	 		 	 	 	 	'T5!!!!!r   c                 N    ddfd}g d}|                      ||           d S )Nrd   c                     d S rA   r   )xs    r   innerz/Test_Pep523API.test_inlined_call.<locals>.inner  r  r   c                  2                     d           d S rN  r   )rT  s   r   rB  z.Test_Pep523API.test_inlined_call.<locals>.func  s    EGGGE"IIIIIr   )rB  rT  rT  re   rO  )r   rB  r  rT  s      @r   test_inlined_callz Test_Pep523API.test_inlined_call  sW    	 	 	 		 	 	 	 	 +**T5!!!!!r   N)r   r   r   rF  rP  rV  r   r   r   r;  r;    sA        / / / " " "" " " " "r   r;  __main__)=collectionsr   r  r,  importlib.machineryr  importlib.utilr  rm  r@  r  r5   r7   r   rQ  r>  r4  r  r%   r   test.supportr   r   r   r   test.support.script_helperr	   r
   r   ImportErrorr  r  r   r  r  r   r+  r   r   r   TestCaser#   r9  rd  r  r  r  r3  r  r  r5  with_pymallocr  r  r6  r  r  r>  r;  r   mainr   r   r   <module>ra     s@   $ # # # # #              				   				     



               - - - - - - & & & & & & ) ) ) ) ) ) ( ( ( ( ( ( N N N N N N N N      OOO (M'44	     73*++ < < <  
: : : : : : : :~& ~& ~& ~& ~&x  ~& ~& ~&DM% M% M% M% M%x( M% M% M%`S: S: S: S: S:* S: S: S:l%3 %3 %3 %3 %3h' %3 %3 %3P? ? ? ? ?H% ? ? ?1 1 1 1 1H- 1 1 1 cF cF cF cF cFh' cF cF cFL" " " " "O " " " *W*,,o>>$ $ $ $ $o $ $ ?>$ X//       0/
 D(*PQQTE TE TE TE TEX. TE TE RQTEn( ( ( ( (H% ( ( (> &) """ "" "" "" ""X& "" "" ""J zHMOOOOO s$   *A/ /A98A9=B BB