� <��g� ��N�ddlmZddlZddlmZddlmZdgZdd �Z ddd�Z dS)�)� annotationsN)�Iterable)�Any� lazy_import�name�str�source� namespace�dict[str, Any]�returnrc���d}||dkr.|dz }|t|��ks Jd���||dk�.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)rr r �level�modules �b/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/websockets/imports.py� import_namer s��� �E� ��-�3� � � �� ���s�6�{�{�"�"�"�$K�"�"�"� ��-�3� � ���u�v�v�� �4�$��� G� G�F� �6�4� � � ��aliases�dict[str, str] | None�deprecated_aliases�Nonec�����������i���i�t����t����t������zr Jd�����zr Jd�����zr Jd����d�d ����fd� }|�d <d���fd � }|�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__rrr rc�*����J� �|}t||���S#t$rYnwxYw��J� �|}tj��d|�d�td���t||���S#t$rYnwxYwt d��d|�����)Nrz is deprecated�)� stacklevelzmodule z has no attribute )r�KeyError�warnings�warn�DeprecationWarning�AttributeError)rr rrr �packages ����r� __getattr__z lazy_import.<locals>.__getattr__Gs�����"�"�"� 8��T�]�F��t�V�Y�7�7� 7��� � � � �D� ���� "�-�-�-� 8�'��-�F� �M��1�1�T�1�1�1�"�� � � � � �t�V�Y�7�7� 7��� � � � �D� �����L�w�L�L�D�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__zlazy_import.<locals>.__dir__as����m�k�1�4J�J�K�K�Krr.)rrr r)r r()�set) r rrr'r.r+r,r-r&s ``` @@@@rrr s$���������0�����!���� �N�N�M��g�,�,�K� �!3�4�4���{�*�@�@�,@�@�@� *��5�5�K�K�7K�K�K� 5��3�3�I�I�5I�I�I� 3�� �#�G�N�N�N�N�N�N�N�N�N�0 +�I�m��L�L�L�L�L�L�L�L�#�I�i���r)rrr rr r r r)NN)r r rrrrr r) � __future__rr"�collections.abcr�typingr�__all__rr�rr�<module>r5s���"�"�"�"�"�"�����$�$�$�$�$�$������� �/��!�!�!�!�.&*�04�D#�D#�D#�D#�D#�D#�D#r
Memory