]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix missing class attributes when using __class_getitem__
authorKai Mueller <15907922+kasium@users.noreply.github.com>
Tue, 21 Dec 2021 20:00:30 +0000 (15:00 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 22 Dec 2021 23:24:15 +0000 (18:24 -0500)
commit1c73759353cdf009c21aa1a56caed574c7d5cf50
tree4a85e3b55e9d0c8dc7ee70944e4fd6137746712c
parentaded8b11d9eccbd1f2b645a94338e34a3d234bc9
Fix missing class attributes when using __class_getitem__

Fixed issue where the ``__class_getitem__()`` method of the generated
declarative base class by :func:`_orm.as_declarative` would lead to
inaccessible class attributes such as ``__table__``, for cases where a
``Generic[T]`` style typing declaration were used in the class hierarchy.
This is in continuation from the basic addition of ``__class_getitem__()``
in :ticket:`7368`. Pull request courtesy Kai Mueller.

Fixes: #7462
Closes: #7470
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7470
Pull-request-sha: d5e5765e0e5542149f116ed9ccff1b3e2e32dee5

Change-Id: I6418af6d34532ff181343884bd419d9c2684e617
doc/build/changelog/unreleased_14/7462.rst [new file with mode: 0644]
lib/sqlalchemy/orm/decl_api.py
test/orm/declarative/test_typing_py3k.py