
    i+                     Z    d dl mZmZmZ d dlmZ d dlmZ ddlm	Z	  G d de          Z
dS )	    )absolute_importprint_functiondivision)contextmanager)Hub   )ExpectedExceptionc                   B    e Zd ZdZdZefZdZed             Z	d Z
d ZdS )QuietHubNFc              #   V   K   | j         }d| _         	 dV  || _         dS # || _         w xY w)a!  
        Code in the body of this context manager will ignore
        ``EXPECTED_TEST_ERROR`` objects reported to ``handle_error``;
        they will not get a chance to go to the hub's parent.

        This completely changes the semantics of normal error handling
        by avoiding some switches (to the main greenlet, and eventually
        once a callback is processed, back to the hub). This should be used
        in narrow ways for test compatibility for tests that assume
        ``ExpectedException`` objects behave this way.
        TN)IGNORE_EXPECTED_TEST_ERROR)selfolds     =/usr/local/lib/python3.11/dist-packages/gevent/testing/hub.pyignoring_expected_test_errorz%QuietHub.ignoring_expected_test_error"   sH       -*.'	2EEE.1D+++cD+1111s    	(c                     |                      |||          \  }}}| j        rt          || j                  rd S t	          j        | ||||          S N)_normalize_exceptionr   
issubclassEXPECTED_TEST_ERRORr   handle_error)r   contexttypevaluetbs        r   r   zQuietHub.handle_error6   s^    33D%DDeR
 * 	z$@X/Y/Y 	FgtUB???    c                     |                      |||          \  }}}t          || j                  rd S t          j        | ||||          S r   )r   r   r   r   print_exception)r   r   tvr   s        r   r   zQuietHub.print_exceptionA   sR    ,,Q2661ba122 	F"4!Q;;;r   )__name__
__module____qualname__	_resolver_threadpoolr	   r   r   r   r   r   r    r   r   r   r      sg        IK,.!&2 2 ^2&	@ 	@ 	@< < < < <r   r   N)
__future__r   r   r   
contextlibr   
gevent.hubr   	exceptionr	   r   r&   r   r   <module>r+      s   ( A @ @ @ @ @ @ @ @ @ % % % % % %       ( ( ( ( ( (+< +< +< +< +<s +< +< +< +< +<r   