HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/websockets/__pycache__/imports.cpython-310.pyc
o

�h�
�@sPddlmZddlZddlmZddlmZdgZdd
d�Z		dddd�Z	dS)�)�annotationsN)�Iterable)�Any�lazy_import�name�str�source�	namespace�dict[str, Any]�returnrcCs\d}||dkr|d7}|t|�ksJd��||dkst||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)rrr	�level�module�r�E/usr/local/CyberCP/lib/python3.10/site-packages/websockets/imports.py�import_names
�
r�aliases�dict[str, str] | None�deprecated_aliases�Nonecs��duri��duri�t���t���t�����@r Jd����@r(Jd����@r0Jd���d�d����fdd	�}|�d
<d���fdd
�}|�d<dS)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`.

    Nznamespace conflict�__name__rrrrcs��dusJ�z�|}Wn	tyYnwt||��S�dus"J�z�|}Wn	ty1Ynwtj��d|�d�tdd�t||��Std��d|����)Nrz is deprecated�)�
stacklevelzmodule z has no attribute )�KeyErrorr�warnings�warn�DeprecationWarning�AttributeError)rr)rrr	�packagerr�__getattr__Gs(���z lazy_import.<locals>.__getattr__r#�
Iterable[str]cst��B�B�S)N)�sortedr)�aliases_set�deprecated_aliases_set�
namespace_setrr�__dir__aszlazy_import.<locals>.__dir__r))rrrr)rr$)�set)r	rrr#r)r)rr&rr'r	r(r"rr s)rrrrr	r
rr)NN)r	r
rrrrrr)
�
__future__rr�collections.abcr�typingr�__all__rrrrrr�<module>s
�