+
    i2                        ^ RI Ht ^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIt]P                  P                  R4      t]P                  P                  R4      ;'       g    ]t]P                  P                  R4      t];'       g    ]t]P                  P                  R4      t];'       g    ]P                  P                  R4      t]P                  P                  R	4      t]P                  P                  R
4      tR tR t ! R R]4      t]! ]R4      '       d    ! R R]4      t]! 4       ]n        ]tMR t ! R R]4      t ! R R]4      tR tR# )    )print_functionN)wrapsGITHUB_ACTIONSTRAVISAPPVEYORGREENLET_MANYLINUXGREENLET_SKIP_LEAKCHECKS GREENLET_SKIP_FAILING_LEAKCHECKS GREENLET_ONLY_FAILING_LEAKCHECKSc                    RV n         V # )a  
Ignore the given object during leakchecks.

Can be applied to a method, in which case the method will run, but
will not be subject to leak checks.

If applied to a class, the entire class will be skipped during leakchecks. This
is intended to be used for classes that are very slow and cause problems such as
test timeouts; typically it will be used for classes that are subclasses of a base
class and specify variants of behaviour (such as pool sizes).
T)ignore_leakcheckfuncs   &rC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO\maestro-backend\venv\Lib\site-packages\greenlet/tests/leakcheck.pyignores_leakcheckr   L   s     !DK    c                d    RV n         \        '       d   \        P                  ! R4      ! V 4      p V # )z*
Mark that the function is known to leak.
TzSkipping known failures)fails_leakcheckSKIP_FAILING_LEAKCHECKSunittestskipr   s   &r   r   r   [   s+      D}}67=Kr   c                       ] tR t^dtRtR# )LeakCheckError N)__name__
__module____qualname____firstlineno____static_attributes__r   r   r   r   r   d   s    r   r   
getobjectsc                   ,   a  ] tR t^kt o R tR tRtV tR# )_MockGCc                .    \         P                  ! ^ 4      # )r   )sysr    selfs   &r   get_objects_MockGC.get_objectsl   s    >>!$$r   c                "    \        \        V4      # N)getattrgc)r&   names   &&r   __getattr___MockGC.__getattr__n   s    2t$$r   r   N)r   r   r   r   r'   r.   r   __classdictcell____classdict__s   @r   r"   r"   k   s     	%	% 	%r   r"   c                    V # )z
Decorator for a function that is known to fail when running
strict (``sys.getobjects()``) leakchecks.

This type of leakcheck finds all objects, even those, such as
strings, which are not tracked by the garbage collector.
r   r   s   &r   fails_strict_leakcheckr4   s   s	     r   c                   ,   a  ] tR t^}t o R tR tRtV tR# )!ignores_types_in_strict_leakcheckc                    Wn         R # r*   types)r&   r9   s   &&r   __init__*ignores_types_in_strict_leakcheck.__init__~   s    
r   c                (    V P                   Vn        V# r*   )r9   leakcheck_ignore_types)r&   r   s   &&r   __call__*ignores_types_in_strict_leakcheck.__call__   s    &*jj#r   r8   N)r   r   r   r   r:   r>   r   r0   r1   s   @r   r6   r6   }   s      r   r6   c                   X   a  ] tR t^t o RtRtR tR tR tR t	R t
R tR tR tR	tV tR
# )_RefCountCheckerc                V    Wn         W n        . V n        / V n        RV n        R V n        R# )FNr   )testcasefunctiondeltas
peak_statsignored_typesneeds_setUp)r&   rC   rD   s   &&&r   r:   _RefCountChecker.__init__   s,       !r   c                   WJ d   R # \        V4      pV\        V P                  4      8X  d1    V P                  P                  V4      pV\
        Jd   V'       d   R # V P                  P                  4        F  pWJ g   K
   R # 	  W P                  9   g,   W P                  9   g   VP                  V P                  9   d   R # R#   \         d"    T P                  P	                  T4      ^ 8H  p Li ; i)FT)type_include_object_p__eq__AttributeError__cmp__NotImplemented__dict__valuesrG   IGNORED_TYPESr   IGNORED_TYPE_NAMES)r&   objkindexact_method_equalsxs   &&   r   rL   "_RefCountChecker._include_object_p   s    
 ;Cy 4..//O&*&<&<&C&CC&H# #.8=P %%'Ax ( &&&)))}} 7 77 / " O '+&<&<&D&DS&IQ&N#	Os   C )C10C1c                \    \         P                  ! R V P                  V P                  R7      # )N)limitrF   filter)objgraphgrowthrF   rL   r%   s   &r   _growth_RefCountChecker._growth   s$    Tdoo&*&<&<> 	>r   c                    V'       g   R # . p\        R V 4       4      pV F   w  rEpVP                  RW4WV3,          4       K"  	  RP                  V4      pV# )z<Unable to calculate growth>c              3   @   "   T F  w  p p\        V4      x  K  	  R # 5ir*   )len).0r-   _s   &  r   	<genexpr>0_RefCountChecker._report_diff.<locals>.<genexpr>   s     7*$1CIIs   z%-*s%9d %+9d
)maxappendjoin)r&   r^   lineswidthr-   countdeltadiffs   &&      r   _report_diff_RefCountChecker._report_diff   sW    1777"(DLL5*EEF #) yyr   c                   \         P                  ! 4       p\         P                  ! 4        V P                  '       d,   V P                  P                  4        R V P                  n         V P                  ! V P                  .VO5/ VB  V P                  P                  4        V P                  P                  4        RV P                  n        RV n        V'       d   \         P                  ! 4        R# R#   T P                  P                  4        T P                  P                  4        RT P                  n        RT n        T'       d   \         P                  ! 4        i i ; i)FTN)r,   	isenableddisablerH   rC   setUpskipTearDownrD   tearDown
doCleanupsenable)r&   argskwargs
gc_enableds   &&& r   	_run_test_RefCountChecker._run_test   s    \\^



MM!).DMM&	MM$--9$9&9MM""$MM$$&)-DMM&#D		 	 MM""$MM$$&)-DMM&#D		 s   ) C6 6A,E"c                
   R \         P                  9   d&   \         P                  R ,          P                  4        R\         P                  9   d&   \         P                  R,          P                  4        V P                  4       # )urlparsezurllib.parse)r$   modulesclear_cacher_   r%   s   &r   _growth_after_RefCountChecker._growth_after   sR     $KK
#//1S[[(KK'335||~r   c                   V P                   pV'       g   R # \        P                  '       d   \        R\        P                  : 24      hVRR ^ ^ .8X  d   \	        V4      R9   d   R# VRR . R	O8X  d   R# \	        V4      ^8  d   \        VR
R 4      ^ 8X  d   R# \	        V4      ^8  d]   VR,          ^ 8  dO   VR,          VR,          8X  d:   VR,          VR,          8X  d%   V P                  V4      p\        RV: RV: 24      h\        VRR 4      ^ 8:  g-   \        VR
R 4      ^ 8:  g   VR
R P                  ^ 4      ^8  d   ^pM^p\	        V4      V8  d#   \        RV: RV P                  V4      : 24      hR # )Tz Generated uncollectable garbage NFzrefcount increased by rh   )      )r   r   r   )rE   r,   garbager   rc   sumrq   rn   )r&   r^   rE   rp   r[   s   &&   r   _check_deltas_RefCountChecker._check_deltas   s\   
 ::: !UVV "#;1a& S[F%:"#;)#v;!F23K 0A 5v;!r
Q6":3KPVWYPZ^deg^hPh$$V,D 64!PQQ vbc{q Crs$4$9VBC[=N=Nq=QUV=VEEv;% $*$($5$5f$="? @ @
 r   c                T   \        ^4       F  p\        P                  ! 4        K  	  \        V P                  RR4      pV'       d   RV P
                  n        \        V P                  RR	4      V n        V P                  4       p V P                  V4      '       dO   V P                  W4       V P                  4       pV P                  P                  \        R V 4       4      4       Ke   V'       d   \        RV P                  : R24      hR#   \         d    T'       g   h  R# i ; i)
r   r   FTr=   c              3   2   "   T F  q^,          x  K  	  R# 5i)r   Nr   )rd   stats   & r   rf   ,_RefCountChecker.__call__.<locals>.<genexpr><  s     'CFDQFs   z	Expected z to leak but it did not.Nr   )ranger,   collectr+   rD   rC   expect_greenlet_leakrG   r_   r   r~   r   rE   rj   r   r   )r&   r{   r|   re   expect_failurer^   s   &&&   r   r>   _RefCountChecker.__call__)  s    qAJJL  !0A5I15DMM.$T]]4LbQ 	_$$V,,t,++-""3'CF'C#DE - $dmm%]^^ 	  	! "	s   D AD D'"D'&D')rE   rD   rG   rH   rF   rC   Nr   )uop_executor)r   r   r   r   rS   rT   r:   rL   r_   rq   r~   r   r   r>   r   r0   r1   s   @r   rA   rA      sE     
 M	!(T>
"/b_ _r   rA   c                 r   a  \        S R R4      '       g   \        '       d   S # \        S 4      V 3R l4       pV# )r   Fc                    < \        V R R4      '       d   \        P                  ! R4      h\        '       d*   \        SRR4      '       g   \        P                  ! R4      h\	        V S4      ! W4      # )r   Fz$This class ignored during leakchecksr   z(Only running tests that fail leakchecks.)r+   r   SkipTestONLY_FAILING_LEAKCHECKSrA   )r&   r{   r|   methods   &*,r   wrapperwrap_refcount.<locals>.wrapperH  s^    4+U33##$JKK""76;Le+T+T##$NOOf-d;;r   )r+   SKIP_LEAKCHECKSr   )r   r   s   f r   wrap_refcountr   D  s9    v)511__
6]< < Nr   )
__future__r   osr$   r,   	functoolsr   r   r]   environgetRUNNING_ON_GITHUB_ACTIONSRUNNING_ON_TRAVISRUNNING_ON_APPVEYORRUNNING_ON_CIRUNNING_ON_MANYLINUXr   r   r   r   r   AssertionErrorr   hasattrobjectr"   r4   r6   rA   r   r   r   r   <module>r      s2  0 & 	 
 	   B JJNN+;< JJNN8,II0I jjnnZ0 !88%8zz~~&:; &TT"**..9S*T**..)KL **..)KL 	^ 	 3%& %
 )HK, ~_v ~_@r   