Skip to content
Myr

remove previously deprecated code

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent 4fec712 · Browse files · 2 files+2 added−21 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−21 removed

  • other:+2 added−21 removed

2 files+2 added−21 removed

modified:src/flask/__init__.py-21 removed
1from __future__ import annotations23import typing as t41from . import json as json2from .app import Flask as Flask3from .blueprints import Blueprint as Blueprint4from .config import Config as Config
31 unmodified lines
36from .templating import stream_template as stream_template37from .templating import stream_template_string as stream_template_string38from .wrappers import Request as Request39from .wrappers import Response as Response444546def __getattr__(name: str) -> t.Any:47 if name == "__version__":48 import importlib.metadata49 import warnings5051 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")5960 raise AttributeError(name)
modified:CHANGES.rst+2 added
1 unmodified line
2-------------34Unreleased56- Remove previously deprecated code: ``__version__``. :pr:`5648`789Version 3.1.010-------------1112Released 2024-11-13
1593 unmodified lines