diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-22 21:45:10 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-23 11:02:48 -0400 |
commit | 8bd9d72271ec9a2fec5749c428ef5ad6e9dc2175 (patch) | |
tree | ec9c232830db8c1ccb81cb5df94800334d997cdd /test/dialect/postgresql/test_compiler.py | |
parent | 8971e27a9b5d1923d36f35c2ba1aaaf46f596308 (diff) | |
download | sqlalchemy-8bd9d72271ec9a2fec5749c428ef5ad6e9dc2175.tar.gz |
implement declared_attr superclass assignment check for dataclasses
Adjusted the declarative scan for dataclasses so that the inheritance
behavior of :func:`_orm.declared_attr` established on a mixin, when using
the new form of having it inside of a ``dataclasses.field()`` construct and
not actually a descriptor attribute on the class, correctly accommodates
the case when the target class to be mapped is a subclass of an existing
mapped class which has already mapped that :func:`_orm.declared_attr`, and
therefore should not be re-applied to this class.
Also, as changed in ed3f2c617239668d we now have an "is_dataclass"
boolean set as we iterate through attrs so we can remove this
from declared_attr.
Fixes: #6346
Change-Id: Iec75bdefd3bff7d8a9a157c8dd744ac14ff15ea8
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
0 files changed, 0 insertions, 0 deletions