
    Mhn                         d Z ddlZddlmZ ddlmZ ddlmZmZ ddl	m
Z
 ddlZddZ ee
j        d	          r*e
j                            e          d
edefd            ZdS dS )z0Bridges between the Twisted package and Tornado.    N)Deferred)failure)Futurefuture_set_exc_info)genreturnc                  &    ddl m}   |              dS )a  Install ``AsyncioSelectorReactor`` as the default Twisted reactor.

    .. deprecated:: 5.1

       This function is provided for backwards compatibility; code
       that does not require compatibility with older versions of
       Tornado should use
       ``twisted.internet.asyncioreactor.install()`` directly.

    .. versionchanged:: 6.0.3

       In Tornado 5.x and before, this function installed a reactor
       based on the Tornado ``IOLoop``. When that reactor
       implementation was removed in Tornado 6.0.0, this function was
       removed as well. It was restored in Tornado 6.0.3 using the
       ``asyncio`` reactor instead.

    r   installN)twisted.internet.asyncioreactorr   r
   s    X/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/tornado/platform/twisted.pyr   r      s%    & 877777GIIIII    registerdc                     t                      dt          j        dd ffd}|                     j        |           S )Nr   r   c                     	  | j                      t          d          #  t          t          j                               Y d S xY w)Nzerrback called without error)raiseException	Exceptionr   sysexc_info)r   fs    r   errbackz_.<locals>.errback7   sP    7&&((( >???7#As|~~666666s	   ! #A)r   r   FailureaddCallbacks
set_result)r   r   r   s     @r   _r   3   sW    HH	7W_ 	7 	7 	7 	7 	7 	7 	7 	
q|W---r   )r   N)__doc__r   twisted.internet.deferr   twisted.pythonr   tornado.concurrentr   r   tornador   typingr   hasattrconvert_yieldedr   r    r   r   <module>r&      s    7 6 



 + + + + + + " " " " " " : : : : : : : :          0 73
++ !!(++X &    ,+   r   