
    g
                    R    d dl mZ d dlZd dlmZmZ dgZddZ	 	 d	 	 	 	 	 	 	 d	dZy)
    )annotationsN)AnyIterablelazy_importc                    d}||   dk(  r#|dz  }|t        |      k  sJ d       ||   dk(  r#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)namesource	namespacelevelmodules        G/var/www/openai/venv/lib/python3.12/site-packages/websockets/imports.pyimport_namer   
   sm     E
-3

s6{"K$KK" -3
 uv	4$GF64      c                     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<   y)
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__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   aliasesdeprecated_aliasesr   packages     r   __getattr__z lazy_import.<locals>.__getattr__F   s    """	8T]F tVY77  		
 "---
	8'-F MM)1TF.1"
 tVY77  		 wwk1CD8LMMs    	%%A! !	A-,A-r"   c                 &    t         z  z        S )N)sorted)aliases_setdeprecated_aliases_setnamespace_sets   r   __dir__zlazy_import.<locals>.__dir__`   s    mk14JJKKr   r(   )r   strreturnr   )r*   zIterable[str])set)	r   r   r    r"   r(   r%   r&   r'   r!   s	   ```  @@@@r   r   r      s    0 !	NMg,K !34{*@,@@*55K7KK533I5II3
#GN N0  +ImL #Iir   )r   r)   r   r)   r   dict[str, Any]r*   r   )NN)r   r,   r   dict[str, str] | Noner    r-   r*   None)	
__future__r   r   typingr   r   __all__r   r    r   r   <module>r3      sR    "    /!. &*04D#D#"D# .D# 
	D#r   