File tree Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change
1
+ Version 3.1.1
2
+ -------------
3
+
4
+ Unreleased
5
+
6
+ - Deprecate the ``__version__ `` attribute. Use feature detection, or
7
+ ``importlib.metadata.version("flask-sqlalchemy") ``, instead. :issue: `5230 `
8
+
9
+
1
10
Version 3.1.0
2
11
-------------
3
12
4
- Released 2023-09-10
13
+ Released 2023-09-11
5
14
6
15
- Drop support for Python 3.7. :pr: `1251 `
7
16
- Add support for the SQLAlchemy 2.x API via ``model_class `` parameter. :issue: `1140 `
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " Flask-SQLAlchemy"
3
+ version = " 3.1.1.dev"
3
4
description = " Add SQLAlchemy support to your Flask application."
4
5
readme = " README.rst"
5
6
license = { file = " LICENSE.rst" }
@@ -18,7 +19,6 @@ dependencies = [
18
19
" flask>=2.2.5" ,
19
20
" sqlalchemy>=2.0.16" ,
20
21
]
21
- dynamic = [" version" ]
22
22
23
23
[project .urls ]
24
24
Donate = " https://palletsprojects.com/donate"
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
- from . extension import SQLAlchemy
3
+ import typing as t
4
4
5
- __version__ = "3.1.0"
5
+ from . extension import SQLAlchemy
6
6
7
7
__all__ = [
8
8
"SQLAlchemy" ,
9
9
]
10
+
11
+
12
+ def __getattr__ (name : str ) -> t .Any :
13
+ if name == "__version__" :
14
+ import importlib .metadata
15
+ import warnings
16
+
17
+ warnings .warn (
18
+ "The '__version__' attribute is deprecated and will be removed in"
19
+ " Flask-SQLAlchemy 3.2. Use feature detection or"
20
+ " 'importlib.metadata.version(\" flask-sqlalchemy\" )' instead." ,
21
+ DeprecationWarning ,
22
+ stacklevel = 2 ,
23
+ )
24
+ return importlib .metadata .version ("flask-sqlalchemy" )
25
+
26
+ raise AttributeError (name )
You can’t perform that action at this time.
0 commit comments