o
    ,wi                     @   s~   d dl Z e   d dlZdd Zdd ZdddZeee  d dlZ	e	j
  d dlZ	d dlZ	eee	j d	d
 dS )    Nc                 C   s   z| j W S  ty   Y d S w N)_blockAttributeError)lock r   ^/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/gevent/tests/test__monkey_logging.py_inner_lock	   s
   r   c                 C   s(   t ||std|t|||| f d S )NzExpected <object>.[_]lock._block to be of type %s, but it was of type %s.
	<object>.[_]lock=%r
	<object>.[_]lock._block=%r
	<object>=%r)
isinstanceAssertionErrortype)rootr   inner_semaphorekindr   r   r   _check_type   s   
r   Tc                 C   s   t j}|sJ |D ]}t|r| n|}t|j}|d u r |r q	t||j||  q	tt j}|d u r6|r6d S tt t j||  d S r   )logging_handlerListcallabler   r   r   _lock)r   ignore_nonehandlersweakrefhandlerblockattrr   r   r   
checkLocks    s   

r   F)r   )T)r   basicConfig	threadingr   r   r   r   _allocate_lockgevent.monkeygeventmonkey	patch_allgevent.lockgevent.threadthreadallocate_lockr   r   r   r   <module>   s   

