codekingpro/portable-devtools
115k
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 