a
    ݌xd                  	   @   sB  d Z ddlmZ ddlmZ ddlmZ G dd deZg dZz*ddlm	Z
 G d	d
 d
e
Z	ed
 W n ey|   Y n0 z*ddlmZ G dd deZed W n ey   Y n0 z*ddlmZ G dd deZed W n ey   Y n0 z*ddlmZ G dd deZed W n eefy<   Y n0 dS )a{  
pyee supplies a ``EventEmitter`` class that is similar to the
``EventEmitter`` class from Node.js. In addition, it supplies the subclasses
``AsyncIOEventEmitter``, ``TwistedEventEmitter`` and ``ExecutorEventEmitter``
for supporting async and threaded execution with asyncio, twisted, and
concurrent.futures Executors respectively, as supported by the environment.


Example
-------

::

    In [1]: from pyee.base import EventEmitter

    In [2]: ee = EventEmitter()

    In [3]: @ee.on('event')
       ...: def event_handler():
       ...:     print('BANG BANG')
       ...:

    In [4]: ee.emit('event')
    BANG BANG

    In [5]:

    )warn)EventEmitter)PyeeExceptionc                       s    e Zd ZdZ fddZ  ZS )BaseEventEmitterzG
    BaseEventEmitter is deprecated and an alias for EventEmitter.
    c                    s   t td tt|   d S )Nz|pyee.BaseEventEmitter is deprecated and will be removed in a future major version; you should instead use pyee.EventEmitter.)r   DeprecationWarningsuperr   __init__self	__class__ E/var/www/html/Ranjet/env/lib/python3.9/site-packages/pyee/__init__.pyr   +   s    zBaseEventEmitter.__init____name__
__module____qualname____doc__r   __classcell__r   r   r   r   r   &   s   r   )r   r   r   )AsyncIOEventEmitterc                       s"   e Zd ZdZd fdd	Z  ZS )r   zP
        AsyncIOEventEmitter has been moved to the pyee.asyncio module.
        Nc                    s"   t td tt| j|d d S )NzCpyee.AsyncIOEventEmitter has been moved to the pyee.asyncio module.)loop)r   r   r   r   r   )r
   r   r   r   r   r   @   s    zAsyncIOEventEmitter.__init__)Nr   r   r   r   r   r   ;   s   r   )TwistedEventEmitterc                       s    e Zd ZdZ fddZ  ZS )r   zP
        TwistedEventEmitter has been moved to the pyee.twisted module.
        c                    s   t td tt|   d S )NzCpyee.TwistedEventEmitter has been moved to the pyee.twisted module.)r   r   r   r   r   r	   r   r   r   r   U   s    zTwistedEventEmitter.__init__r   r   r   r   r   r   P   s   r   )ExecutorEventEmitterc                       s"   e Zd ZdZd fdd	Z  ZS )r   zR
        ExecutorEventEmitter has been moved to the pyee.executor module.
        Nc                    s"   t td tt| j|d d S )NzEpyee.ExecutorEventEmitter has been moved to the pyee.executor module.)executor)r   r   r   r   r   )r
   r   r   r   r   r   j   s    zExecutorEventEmitter.__init__)Nr   r   r   r   r   r   e   s   r   )TrioEventEmitterc                       s"   e Zd ZdZd fdd	Z  ZS )r   zJ
        TrioEventEmitter has been moved to the pyee.trio module.
        Nc                    s$   t td tt| j||d d S )Nz=pyee.TrioEventEmitter has been moved to the pyee.trio module.)nurserymanager)r   r   r   r   r   )r
   r   r   r   r   r   r      s    zTrioEventEmitter.__init__)NNr   r   r   r   r   r   z   s   r   N)r   warningsr   Z	pyee.baser   r   r   __all__Zpyee.asyncior   Z_AsyncIOEventEmitterappendImportErrorZpyee.twistedr   Z_TwistedEventEmitterZpyee.executorr   Z_ExecutorEventEmitterZ	pyee.trior   Z_TrioEventEmitterSyntaxErrorr   r   r   r   <module>   s:   