
    <|h                         d Z ddlmZ ddlmZ ddlmZ ddlZg dZd eej                        vsJ  G d d	ej                        Z	 e	       Z
dad
 Zd Zd Zd Zd Zd Zd Zd ZddlmZ  e e       d       y)z"
Maintains the thread local hub.

    )absolute_import)division)print_functionN)get_hubget_hub_noargsget_hub_if_existsgeventc                        e Zd Z fdZ xZS )_Threadlocalc                 T    t         t        |           d | _        d | _        d | _        y N)superr   __init__Hubloophub)self	__class__s    P/var/www/html/test/engine/venv/lib/python3.12/site-packages/gevent/_hub_local.pyr   z_Threadlocal.__init__   s'    2 	lD*,	    )__name__
__module____qualname__r   __classcell__)r   s   @r   r   r      s     r   r   c                  L    t         j                  } | t        x} t         _        | S )zReturn the type of hub to use for the current thread.

    If there's no type of hub for the current thread yet, 'gevent.hub.Hub' is used.
    )_threadlocalr   hubtypes    r   get_hub_classr   =   s&    
 G%((,"Nr   c                     | a y r   )r   r   s    r   set_default_hub_classr!   G   s    
Cr   c                      	 t         j                  } | t               } |       x} t         _        | S # t        $ r d} Y -w xY w)a  
    Return the hub for the current thread.

    If a hub does not exist in the current thread, a new one is
    created of the type returned by :func:`get_hub_class`.

    .. deprecated:: 1.3b1
       The ``*args`` and ``**kwargs`` arguments are deprecated. They were
       only used when the hub was created, and so were non-deterministic---to be
       sure they were used, *all* callers had to pass them, or they were order-dependent.
       Use ``set_hub`` instead.

    .. versionchanged:: 1.5a3
       The *args* and *kwargs* arguments are now completely ignored.

    .. versionchanged:: 23.7.0
       The long-deprecated ``args`` and ``kwargs`` parameters are no
       longer accepted.
    Nr   r   AttributeErrorr   r   r   s     r   r   r   K   sJ    * {/!(*lJ     2 A A c                      	 t         j                  } | t               } |       x} t         _        | S # t        $ r d } Y -w xY wr   r#   r%   s     r   r   r   k   sJ     {/!(*lJ  r&   c                  B    	 t         j                  S # t        $ r Y yw xY w)ze
    Return the hub for the current thread.

    Return ``None`` if no hub has been created yet.
    N)r   r   r$    r   r   r   r   v   s'      s    	c                     | t         _        y r   )r   r   )r   s    r   set_hubr+      s
    Lr   c                  "    t         j                  S r   r   r   r)   r   r   get_loopr.      s    r   c                     | t         _        y r   r-   )r   s    r   set_loopr0      s
    Lr   )import_c_accelzgevent.__hub_local)__doc__
__future__r   r   r   _thread__all__str_localr   r   r   r   r!   r   r   r   r+   r.   r0   gevent._utilr1   globalsr)   r   r   <module>r:      s    '  %  s7>>** **7>> @ ~
@	, ( wy. /r   