From 6d7ba58f880be618ade07f8ea080fe8c4bf8a896 Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Wed, 3 Apr 2024 03:10:44 -0400 Subject: venv --- .../python3.11/site-packages/websockets/http.py | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 venv/lib/python3.11/site-packages/websockets/http.py (limited to 'venv/lib/python3.11/site-packages/websockets/http.py') diff --git a/venv/lib/python3.11/site-packages/websockets/http.py b/venv/lib/python3.11/site-packages/websockets/http.py new file mode 100644 index 0000000..9f86f6a --- /dev/null +++ b/venv/lib/python3.11/site-packages/websockets/http.py @@ -0,0 +1,35 @@ +from __future__ import annotations + +import sys +import typing + +from .imports import lazy_import +from .version import version as websockets_version + + +# For backwards compatibility: + + +# When type checking, import non-deprecated aliases eagerly. Else, import on demand. +if typing.TYPE_CHECKING: + from .datastructures import Headers, MultipleValuesError # noqa: F401 +else: + lazy_import( + globals(), + # Headers and MultipleValuesError used to be defined in this module. + aliases={ + "Headers": ".datastructures", + "MultipleValuesError": ".datastructures", + }, + deprecated_aliases={ + "read_request": ".legacy.http", + "read_response": ".legacy.http", + }, + ) + + +__all__ = ["USER_AGENT"] + + +PYTHON_VERSION = "{}.{}".format(*sys.version_info) +USER_AGENT = f"Python/{PYTHON_VERSION} websockets/{websockets_version}" -- cgit v1.2.3