2024-03-03 17:15:23 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
import typing as t
|
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
from .serving import run_simple as run_simple
|
|
|
|
from .test import Client as Client
|
|
|
|
from .wrappers import Request as Request
|
|
|
|
from .wrappers import Response as Response
|
2019-12-02 21:46:54 +00:00
|
|
|
|
2024-03-03 17:15:23 +00:00
|
|
|
|
|
|
|
def __getattr__(name: str) -> t.Any:
|
|
|
|
if name == "__version__":
|
|
|
|
import importlib.metadata
|
|
|
|
import warnings
|
|
|
|
|
|
|
|
warnings.warn(
|
|
|
|
"The '__version__' attribute is deprecated and will be removed in"
|
|
|
|
" Werkzeug 3.1. Use feature detection or"
|
|
|
|
" 'importlib.metadata.version(\"werkzeug\")' instead.",
|
|
|
|
DeprecationWarning,
|
|
|
|
stacklevel=2,
|
|
|
|
)
|
|
|
|
return importlib.metadata.version("werkzeug")
|
|
|
|
|
|
|
|
raise AttributeError(name)
|