forked from pallets/werkzeug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove previously deprecated code (pallets#2967)
- Loading branch information
Showing
2 changed files
with
1 addition
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,4 @@ | ||
from __future__ import annotations | ||
|
||
import typing as t | ||
|
||
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 | ||
|
||
|
||
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) |