
    g
                    N    d dl mZ d dlZd dlmZ d dlmZ dgZddZ	 	 dddZ	dS )    )annotationsN)Iterable)Anylazy_importnamestrsource	namespacedict[str, Any]returnr   c                    d}||         dk    r.|dz  }|t          |          k     s
J d            ||         dk    .t          ||d         |d| g|          }t          ||           S )aN  
    Import ``name`` from ``source`` in ``namespace``.

    There are two use cases:

    - ``name`` is an object defined in ``source``;
    - ``name`` is a submodule of ``source``.

    Neither :func:`__import__` nor :func:`~importlib.import_module` does
    exactly this. :func:`__import__` is closer to the intended behavior.

    r   .   z%importing from parent isn't supportedN)len
__import__getattr)r   r	   r
   levelmodules        ^/var/www/html/nodeJS/PythonScripts/venv3.11/lib/python3.11/site-packages/websockets/imports.pyimport_namer      s     E
-3


s6{{"""$K""" -3

 uvv	4$GGF64       aliasesdict[str, str] | Nonedeprecated_aliasesNonec                    i i t                     t                    t                    z  r
J d            z  r
J d            z  r
J d             d         d fd}| d	<   dfd}| d<   dS )a  
    Provide lazy, module-level imports.

    Typical use::

        __getattr__, __dir__ = lazy_import(
            globals(),
            aliases={
                "<name>": "<source module>",
                ...
            },
            deprecated_aliases={
                ...,
            }
        )

    This function defines ``__getattr__`` and ``__dir__`` per :pep:`562`.

    Nznamespace conflict__name__r   r   r   r   c                *   J 	 |          }t          | |          S # t          $ r Y nw xY wJ 	 |          }t          j         d|  dt          d           t          | |          S # t          $ r Y nw xY wt          dd|           )Nr   z is deprecated   )
stacklevelzmodule z has no attribute )r   KeyErrorwarningswarnDeprecationWarningAttributeError)r   r	   r   r   r
   packages     r   __getattr__z lazy_import.<locals>.__getattr__G   s    """	8T]F tVY777  	 	 	D	
 "---
	8'-F M11T111"   
 tVY777  	 	 	D	 LwLLDLLMMMs     
--A0 0
A=<A=r'   Iterable[str]c                 .    t           z  z            S )N)sorted)aliases_setdeprecated_aliases_setnamespace_sets   r   __dir__zlazy_import.<locals>.__dir__a   s    mk14JJKKKr   r.   )r   r   r   r   )r   r(   )set)	r
   r   r   r'   r.   r+   r,   r-   r&   s	   ```  @@@@r   r   r       s$   0 !	NNMg,,K !344{*@@,@@@@55KK7KKKK33II5IIII
#GN N N N N N N N N0  +ImL L L L L L L L #Iir   )r   r   r	   r   r
   r   r   r   )NN)r
   r   r   r   r   r   r   r   )

__future__r   r"   collections.abcr   typingr   __all__r   r    r   r   <module>r5      s    " " " " " "  $ $ $ $ $ $       /! ! ! !. &*04D# D# D# D# D# D# D#r   