]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
restore declared_attr consumption for __table__
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 18 Jun 2024 02:45:16 +0000 (22:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 18 Jun 2024 14:40:45 +0000 (10:40 -0400)
commit0e2a91163ea250b40dc33e4f6fa07996d8d14ce3
tree5f326255cbc9b433c947c19481244b540b0339fc
parent78b2ed2f49647c0be458e7bdc4b8147981aea22a
restore declared_attr consumption for __table__

Fixed bug in ORM Declarative where the ``__table__`` directive could not be
declared as a class function with :func:`_orm.declared_attr` on a
superclass, including an ``__abstract__`` class as well as coming from the
declarative base itself.  This was a regression since 1.4 where this was
working, and there were apparently no tests for this particular use case.

Fixes: #11509
Change-Id: I82ef0f93d00cb7a43b0b1b16ea28f1a9a79eba3b
(cherry picked from commit 30ec43440168fa79a4d45db64c387562ef8f97e6)
doc/build/changelog/unreleased_20/11509.rst [new file with mode: 0644]
lib/sqlalchemy/orm/decl_base.py
test/orm/declarative/test_mixin.py