o
    Òó·iž  ã                   @   sh   d dl mZ d dlmZmZ eZG dd„ deƒZdZda	dd„ Z
d	d
„ Zdd„ Zd dlmZ eeƒ dS )é    )Ú__version__)ÚIFailedFutureÚILoggerc                   @   s   e Zd ZdZdZdS )Ú_Configa¡  
    This holds all valid configuration options, accessed as
    class-level variables. For example, if you were using asyncio:

    .. sourcecode:: python

        txaio.config.loop = asyncio.get_event_loop()

    ``loop`` is populated automatically (while importing one of the
    framework-specific libraries) but can be changed before any call
    into this library. Currently, it's only used by :meth:`call_later`
    If using asyncio, you must set this to an event-loop (by default,
    we use asyncio.get_event_loop). If using Twisted, set this to a
    reactor instance (by default we "from twisted.internet import
    reactor" on the first call to call_later)
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úloop© r   r   úTC:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\txaio/__init__.pyr   &   s    r   )!Zwith_configÚusing_twistedÚusing_asyncioÚuse_twistedÚuse_asyncioÚconfigÚcreate_futureZcreate_future_successZcreate_future_errorZcreate_failureZ	as_futureZ	is_futureZrejectÚresolveÚcancelZadd_callbacksÚgatherZ	is_calledÚ
call_laterZfailure_messageZfailure_tracebackZfailure_format_tracebackZmake_batched_timerZmake_loggerZstart_loggingZset_global_log_levelZget_global_log_levelZadd_log_categoriesr   r   ÚsleepÚtime_nsÚperf_counter_nsNc                  C   óN   t d urt dkrtd t ¡ƒ‚da ddlm}  t| ƒ dd l}d|_d|_d S )NZtwistedúExplicitly using '{}' alreadyr   )ÚtxTF)Ú_explicit_frameworkÚRuntimeErrorÚformatÚtxaior   Ú_use_frameworkr   r   )r   r    r   r   r   r   d   ó   
r   c                  C   r   )NÚasyncior   r   )ÚaioFT)r   r   r   r    r$   r!   r   r   )r$   r    r   r   r   r   r   r"   r   c                 C   s2   ddl }tD ]}|dv rqt||t| |ƒƒ qdS )zc
    Internal helper, to set this modules methods to a specified
    framework helper-methods.
    r   N)r   r   )r    Ú__all__ÚsetattrÚgetattr)Úmoduler    Úmethod_namer   r   r   r!   €   s   ýr!   )Ú_unframework)Ztxaio._versionr   Ztxaio.interfacesr   r   ÚversionÚobjectr   r%   r   r   r   r!   r    r*   r   r   r   r   Ú<module>   s   %