|
2 | 2 | SQLAlchemy 2 Stubs
|
3 | 3 | ===================
|
4 | 4 |
|
5 |
| -These are PEP-484 typing stubs for `SQLAlchemy <https://www.sqlalchemy.org>`_ |
6 |
| -1.4 and 2.0. They are released concurrently along with |
7 |
| -a `Mypy extension <https://docs.sqlalchemy.org/en/14/orm/extensions/mypy.html>`_ |
8 |
| -which is designed to work with these stubs, which assists primarily in the |
9 |
| -area of ORM mappings. |
| 5 | +These are interim PEP-484 typing stubs for the |
| 6 | +`SQLAlchemy <https://www.sqlalchemy.org>`_ **1.4 release series only**. They |
| 7 | +are released concurrently along with a |
| 8 | +`Mypy extension <https://docs.sqlalchemy.org/en/14/orm/extensions/mypy.html>`_ |
| 9 | +which is designed to work with these stubs, which assists primarily in the area |
| 10 | +of ORM mappings. |
10 | 11 |
|
11 | 12 | The stubs replace the use of the "sqlalchemy-stubs" package published by
|
12 |
| -Dropbox. Differences include that these stubs are generated against |
13 |
| -1.4's API as well as some adjustments to the use of generics. |
| 13 | +Dropbox. Differences include that these stubs are generated against 1.4's API |
| 14 | +as well as some adjustments to the use of generics. The sqlalchemy2-stubs stubs |
| 15 | +package **will not work with SQLAlchemy 2.0, and will need to be explicitly / |
| 16 | +manually uninstalled when upgrading to SQLAlchemy 2.0**. |
14 | 17 |
|
15 | 18 | This project should be considered **alpha level** and is not as mature
|
16 | 19 | as the Dropbox stubs for the initial release.
|
17 | 20 |
|
18 | 21 | See the Mypy plugin documentation at https://docs.sqlalchemy.org/en/14/orm/extensions/mypy.html
|
19 | 22 | for an overview of how to use PEP-484 annotations with ORM mapped classes.
|
20 | 23 |
|
| 24 | +For SQLAlchemy 2.0, when released, **the sqlalchemy2-stubs project is not |
| 25 | +compatible**. SQLAlchemy 2.0 will be / is fully pep-484 typed inline and |
| 26 | +will not be compatible with any stubs. There unfortunately appears to be no |
| 27 | +standard approach in Python for the problem of a library that upgrades to |
| 28 | +include typing annotations inline, as typing tools will still consider |
| 29 | +any installed stubs to take precedence. Therefore **sqlalchemy2-stubs |
| 30 | +will need to be manually uninstalled when upgrading to SQLAlchemy 2.0**. |
| 31 | + |
| 32 | + |
21 | 33 | Code of Conduct
|
22 | 34 | ---------------
|
23 | 35 |
|
|
0 commit comments