�
?r*jE1 � �n � d dl Z d dlZd dlZd dlmZ d dlZd dlZe j j d� Z e j j d� xs e Z
e j j d� Ze
xs eZe j j d� Z
e
xs e j j d� Ze j j d� Ze j j d � Zd
� Zd� Z G d� d
e� Z eed� r G d� de� Z e� e_ eZnd� Z G d� de� Z G d� de� Zd� Zy)� N)�wraps�GITHUB_ACTIONS�TRAVIS�APPVEYOR�GREENLET_MANYLINUX�GREENLET_SKIP_LEAKCHECKS� GREENLET_SKIP_FAILING_LEAKCHECKS� GREENLET_ONLY_FAILING_LEAKCHECKSc � � d| _ | S )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 �I/opt/hc_python/lib64/python3.12/site-packages/greenlet/tests/leakcheck.py�ignores_leakcheckr J s � � !�D���K� c �V � d| _ t r t j d� | � } | S )z2
Mark that the function is known to leak.
TzSkipping known failures)�fails_leakcheck�SKIP_FAILING_LEAKCHECKS�unittest�skipr
s r r r Y s* � � �D���7�x�}�}�6�7��=���Kr c � � e Zd Zy)�LeakCheckErrorN)�__name__�
__module__�__qualname__� r r r r b s � �r r �
getobjectsc � � e Zd Zd� Zd� Zy)�_MockGCc �, � t j d� S )Nr )�sysr ��selfs r �get_objectsz_MockGC.get_objectsj s � ��>�>�!�$�$r c �"