]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
warn for DC mixin / abstract fields that are not on a dataclass
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 30 Mar 2023 18:48:39 +0000 (14:48 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 30 Mar 2023 21:12:48 +0000 (17:12 -0400)
commit8eaf6f30cb8b316a6a6b4bb8743322f03b4903c4
tree06214da20a99ce89b0b2a0f31464f06ba336a8fa
parent72d2ec57928bdf5649c551bdaa87b7fb0943c2fe
warn for DC mixin / abstract fields that are not on a dataclass

Fields that are declared on Declarative Mixins and then combined with
classes that make use of :class:`_orm.MappedAsDataclass`, where those mixin
fields are not themselves part of a dataclass, now emit a deprecation
warning as these fields will be ignored in a future release, as Python
dataclasses behavior is to ignore these fields. Type checkers will not see
these fields under pep-681.

Fixes: #9350
Change-Id: Ie0a0ac0f0bb58d1c2aae13b4a8dcd0439a4f5477
doc/build/changelog/unreleased_20/9350.rst [new file with mode: 0644]
doc/build/errors.rst
doc/build/orm/dataclasses.rst
lib/sqlalchemy/orm/decl_base.py
test/orm/declarative/test_dc_transforms.py