File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed
Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ Version 3.2.0
33
44Unreleased
55
6+ - Remove previously deprecated code: ``__version__ ``. :pr: `5648 `
7+
68
79Version 3.1.0
810-------------
Original file line number Diff line number Diff line change 1- from __future__ import annotations
2-
3- import typing as t
4-
51from . import json as json
62from .app import Flask as Flask
73from .blueprints import Blueprint as Blueprint
4137from .templating import stream_template_string as stream_template_string
4238from .wrappers import Request as Request
4339from .wrappers import Response as Response
44-
45-
46- def __getattr__ (name : str ) -> t .Any :
47- if name == "__version__" :
48- import importlib .metadata
49- import warnings
50-
51- warnings .warn (
52- "The '__version__' attribute is deprecated and will be removed in"
53- " Flask 3.1. Use feature detection or"
54- " 'importlib.metadata.version(\" flask\" )' instead." ,
55- DeprecationWarning ,
56- stacklevel = 2 ,
57- )
58- return importlib .metadata .version ("flask" )
59-
60- raise AttributeError (name )
You can’t perform that action at this time.
0 commit comments