--- /dev/null
+.. change::
+ :tags: bug, mypy
+ :versions: 2.0
+
+ The deprecated mypy plugin is no longer fully functional with the latest
+ series of mypy 1.11.0, as changes in the mypy interpreter are no longer
+ compatible with the approach used by the plugin. If code is dependent on
+ the mypy plugin with sqlalchemy2-stubs, it's recommended to pin mypy to be
+ below the 1.11.0 series. Seek upgrading to the 2.0 series of SQLAlchemy
+ and migrating to the modern type annotations.
+
+ .. seealso::
+
+ :ref:`mypy_toplevel`
**The SQLAlchemy Mypy Plugin is DEPRECATED, and will be removed possibly
as early as the SQLAlchemy 2.1 release. We would urge users to please
- migrate away from it ASAP.**
+ migrate away from it ASAP. The mypy plugin also works only up until
+ mypy version 1.10.1. version 1.11.0 and greater may not work properly.**
This plugin cannot be maintained across constantly changing releases
of mypy and its stability going forward CANNOT be guaranteed.
.. topic:: SQLAlchemy Mypy Plugin Status Update
- **Updated July 2023**
+ **Updated July 2024**
+
+ The mypy plugin is supported **only up until mypy 1.10.1, and it will have
+ issues running with 1.11.0 or greater**. Use with mypy 1.11.0 or greater
+ may have error conditions which currently cannot be resolved.
For SQLAlchemy 2.0, the Mypy plugin continues to work at the level at which
it reached in the SQLAlchemy 1.4 release. SQLAlchemy 2.0 however features
)
name: Mapped[Optional[str]] = Mapped._special_method(Column(String))
- def __init__(self, id: Optional[int] = ..., name: Optional[str] = ...) -> None:
- ...
+ def __init__(self, id: Optional[int] = ..., name: Optional[str] = ...) -> None: ...
some_user = User(id=5, name="user")
greenlet != 0.4.17
mock; python_version < '3.3'
importlib_metadata; python_version < '3.8'
- mypy
+ mypy >= 1.2.0,<1.11
patch==1.*
git+https://github.com/sqlalchemy/sqlalchemy2-stubs
commands =