Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
http.py21 linesDownload Raw Back to websockets
1from __future__ import annotations
2
3import warnings
4
5from .datastructures import Headers, MultipleValuesError  # noqa: F401
6
7
8with warnings.catch_warnings():
9    # Suppress redundant DeprecationWarning raised by websockets.legacy.
10    warnings.filterwarnings("ignore", category=DeprecationWarning)
11    from .legacy.http import read_request, read_response  # noqa: F401
12
13
14warnings.warn(  # deprecated in 9.0 - 2021-09-01
15    "Headers and MultipleValuesError were moved "
16    "from websockets.http to websockets.datastructures"
17    "and read_request and read_response were moved "
18    "from websockets.http to websockets.legacy.http",
19    DeprecationWarning,
20)
21 
codekingpro/portable-devtools · Team Ai