+
    Bi                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RItR tRR^RR/R lltR t ! R R	]	4      t
] P                  R
 4       t] P                  R]R3R l4       t] P                  R 4       tRR lt] P                  R 4       tR tR# )    Nc                    \         P                  ! 4       ;_uu_ 4        \         P                  ! R\        R7       \        P
                  ! V 4      uuRRR4       #   + '       g   i     R# ; i)z3Import *name* while suppressing DeprecationWarning.ignorecategoryN)warningscatch_warningssimplefilterDeprecationWarning	importlibimport_module)names   &3/usr/lib/python3.14/test/support/warnings_helper.pyimport_deprecatedr   	   s?    		 	 	"	"h1CD&&t, 
#	"	"	"s   2AA,	 linenooffsetc          
      H   ^ RI Hp \        P                  ! RR7      ;_uu_ 4       p\        P                  ! R\
        4       \        VRR4       RRR4       V P                  \        X4      ^V4       Vw  pV P                  VP                  \
        4       V'       d&   V P                  \        VP                  4      V4       V P                  VP                  R4       V P                  VP                   4       Ve   V P                  VP                   V4       \        P                  ! RR7      ;_uu_ 4       p\        P                  ! R\
        4       V! WVW4R	7       RRR4       V P                  V. 4       R#   + '       g   i     EL7; i  + '       g   i     L8; i)
r   )check_syntax_errorTrecordalwaysz
<testcase>execNerror)r   r   )test.supportr   r   r   r	   SyntaxWarningcompileassertEquallenassertIsSubclassr   assertRegexstrmessagefilenameassertIsNotNoner   )testcase	statementerrtextr   r   r   warnswarns   &&&$$   r   check_syntax_warningr*      s*    0		 	 	-	-h6	<0 
. UQ.EDdmm];S.85T[[)T[[&1
 
	 	 	-	-g}58"(	9 
.
 #- 
.	-	-" 
.	-s   )E=:'F=F	F!	c                   a  V 3R lpV# )zDecorator to suppress warnings.

Use of context managers to hide warnings make diffs
more noisy and tools like 'git blame' less useful.
c                 J   <a  \         P                  ! S 4      VV 3R  l4       pV# )c                    < \         P                  ! 4       ;_uu_ 4        \         P                  ! R SR7       S! V .VO5/ VB uuRRR4       #   + '       g   i     R# ; i)r   r   N)r   r   r	   )selfargskwargsr   tests   &*,r   wrapper3ignore_warnings.<locals>.decorator.<locals>.wrapper4   sC    ((**%%hBD24262 +***s   $AA	)	functoolswraps)r1   r2   r   s   f r   	decorator"ignore_warnings.<locals>.decorator3   s%    			3 
	3      )r   r6   s   d r   ignore_warningsr:   -   s     r8   c                   F   a  ] tR t^=t o RtR tR t]R 4       tR t	Rt
V tR# )WarningsRecorderznConvenience wrapper for the warnings list returned on
entry to the warnings.catch_warnings() context manager.
c                     Wn         ^ V n        R# )r   N	_warnings_last)r.   warnings_lists   &&r   __init__WarningsRecorder.__init__A   s    &
r8   c                    \        V P                  4      V P                  8  d   \        V P                  R,          V4      # V\        P
                  P                  9   d   R# \        V : RV: 24      h)   Nz has no attribute )r   r?   r@   getattrr   WarningMessage_WARNING_DETAILSAttributeError)r.   attrs   &&r   __getattr__WarningsRecorder.__getattr__E   sT    t~~+4>>"-t44X,,===tDEEr8   c                4    V P                   V P                  R  # Nr>   r.   s   &r   r   WarningsRecorder.warningsL   s    ~~djjk**r8   c                :    \        V P                  4      V n        R # rO   )r   r?   r@   rP   s   &r   resetWarningsRecorder.resetP   s    (
r8   )r@   r?   N)__name__
__module____qualname____firstlineno____doc__rB   rL   propertyr   rS   __static_attributes____classdictcell__)__classdict__s   @r   r<   r<   =   s3     F + +) )r8   r<   c                 h    VP                  R4      pV '       g   R\        33p Vf   Rp\        W4      # )at  Context manager to silence warnings.

Accept 2-tuples as positional arguments:
    ("message regexp", WarningCategory)

Optional argument:
 - if 'quiet' is True, it does not fail if a filter catches nothing
    (default True without argument,
     default False if some filters are defined)

Without argument, it defaults to:
    check_warnings(("", Warning), quiet=True)
quietr   T)getWarning_filterwarnings)filtersr0   r_   s   *, r   check_warningsrd   T   s6     JJwE="=E7**r8   Fc              #    "   ^ RI Hp \        P                  ! RR7      ;_uu_ 4       p\        P                  ! RVVR7       Rx  V'       d   V! 4        RRR4       V P                  X. 4       R#   + '       g   i     L$; i5i)a  Context manager to check that no warnings are emitted.

This context manager enables a given warning within its scope
and checks that no warnings are emitted even with that warning
enabled.

If force_gc is True, a garbage collection is attempted before checking
for warnings. This may help to catch warnings emitted when objects
are deleted, such as ResourceWarning.

Other keyword arguments are passed to warnings.filterwarnings().
)
gc_collectTr   r   )r"   r   N)r   rf   r   r   filterwarningsr   )r%   r"   r   force_gcrf   r(   s   &&&&  r   check_no_warningsri   l   s_      (		 	 	-	-(/)1	3 	L 
. # 
.	-s   &B-A1B1B	<Bc              #     "   \        V \        RR7      ;_uu_ 4        Rx  RRR4       R#   + '       g   i     R# ; i5i)a  Context manager to check that no ResourceWarning is emitted.

Usage:

    with check_no_resource_warning(self):
        f = open(...)
        ...
        del f

You must remove the object which may emit ResourceWarning before
the end of the context manager.
T)r   rh   N)ri   ResourceWarning)r%   s   &r   check_no_resource_warningrl      s(      
8o	M	M 
N	M	M	Ms   A ,
A =		A c              #    "   \         P                  ! ^4      pVP                  P                  R4      pV'       d   VP	                  4        \         P
                  R,          pVP                  RR7      ;_uu_ 4       pVP                  R4       \        V4      x  RRR4       \        X4      p. pV  F  w  rRp
VR,           Fw  pVP                  p\        P                  ! V\        V4      \        P                  4      '       g   KF  \        VP                   V	4      '       g   Kd  Rp
VP#                  V4       Ky  	  V
'       d   K  V'       d   K  VP%                  WP&                  34       K  	  V'       d   \)        R	V^ ,          ,          4      hV'       d   \)        R
V^ ,          ,          4      hR#   + '       g   i     EL#; i5i)zCatch the warnings, then check if all the expected
warnings have been raised and re-raise unexpected warnings.
If 'quiet' is True, only re-raise the unexpected warnings.
__warningregistry__r   Tr   r   NFNNNzunhandled warning %sz)filter (%r, %s) did not catch any warning)sys	_getframe	f_globalsr`   clearmodulesr   r	   r<   listr"   rematchr!   I
issubclass	__class__removeappendrU   AssertionError)rc   r_   frameregistrywmodwreraisemissingmsgcatseenwarnings   &&          r   rb   rb      s[     MM!E""#89H ;;z"D			D		)	)Q(#q!! 
*
 1gGGAiiGc'lBDD117,,c22q!  tEENNC./  3gaj@AAH$QZ( ) 	) + 
*	)	)sC   A;G
=F6A(G
	G
'G
G
'G
: G
G
6G		G
c               #      "   \         P                  R ,          p  Rx  V \         P                  R &   R#   T \         P                  R &   i ; i5i)ro   N)r   rc   )old_filterss    r   save_restore_warnings_filtersr      s=     ""1%K*)ks   A4 AA		Ac                  @    \         P                  ! R \        ^ R7       R# )zThis is used in test_support test to ensure support.ignore_deprecations_from() works as expected. You should not be seeing this.)
stacklevelN)r   r)   r
   r9   r8   r   _warn_about_deprecationr      s    MM	* 	r8   )r   )F)
contextlibr4   r   rv   rp   r   r   r*   r:   objectr<   contextmanagerrd   ra   ri   rl   rb   r   r   r9   r8   r   <module>r      s       	 
 -$#$$-1$: )v ). + +. (*Wu $ $0  "%)P * *r8   