diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-03-11 10:38:44 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-03-12 12:07:41 -0400 |
commit | 3a4705225d2d7ccfdc48c31bd5a4436bc3830c5d (patch) | |
tree | bc953673ed32cbf0a82f124641f2348dae7f441a /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | 85897db771bd3150d10ebb80cade909c69264ac0 (diff) | |
download | sqlalchemy-3a4705225d2d7ccfdc48c31bd5a4436bc3830c5d.tar.gz |
document no-pep681 workarounds
Mypy 1.1.1 has been released which includes a non-compliant pep-681
implementation that fails with SQLAlchemy's :class:`.MappedAsDataclass` and
similar features. In order to work around this issue until Mypy is able to
release a fix, as well as to support other typing tools which may have
non-compliant pep-681 implementations, document a workaround class
for :class:`.MappedAsDataclass`.
Including this class as well as a decorator was considered, but overall
this is an issue with typing tools that they will have to resolve
and I'm not ready to set up for this issue going on long term. There's
also no good solution for the decorator version since you have to
have an ``__init__`` method indicated somewhere.
References: https://github.com/python/mypy/issues/13856
Fixes: #9467
Change-Id: I1be6abea7f7fc72883c14ab2447edad937d0c23f
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
0 files changed, 0 insertions, 0 deletions