Skip to content

Commit

Permalink
remove previously deprecated code (pallets#2967)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism authored Oct 27, 2024
2 parents bf9873b + c147760 commit 2139fa0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Version 3.1.0
Unreleased

- Drop support for Python 3.8. :pr:`2966`
- Remove previously deprecated code. :pr:`2967`
- ``Request.max_form_memory_size`` defaults to 500kB instead of unlimited.
Non-file form fields over this size will cause a ``RequestEntityTooLarge``
error. :issue:`2964`
Expand Down
21 changes: 0 additions & 21 deletions src/werkzeug/__init__.py
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)

0 comments on commit 2139fa0

Please sign in to comment.