]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
ensure util.get_annotations() is used
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 31 Oct 2025 15:51:37 +0000 (11:51 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 31 Oct 2025 16:20:14 +0000 (12:20 -0400)
commit4fd9fbe73f648ed7e134dddbc43241aac1a75723
treeff861c79db390efbaaec571d9f45c811e8bd1755
parent5b9d175416425dfb70272890923b6b1313d8ed69
ensure util.get_annotations() is used

Fixed issue in Python 3.14 where dataclass transformation would fail when
a mapped class using :class:`.MappedAsDataclass` included a
:func:`.relationship` referencing a class that was not available at
runtime (e.g., within a ``TYPE_CHECKING`` block). This occurred when using
Python 3.14's :pep:`649` deferred annotations feature, which is the
default behavior without a ``from __future__ import annotations``
directive.

Fixes: #12952
Change-Id: I32f0adba00c32f5bf98fe2880dda1b96a7774d07
doc/build/changelog/unreleased_20/12952.rst [new file with mode: 0644]
lib/sqlalchemy/orm/decl_base.py
lib/sqlalchemy/testing/requirements.py
test/orm/declarative/test_dc_transforms.py
test/orm/declarative/test_dc_transforms_future_anno_sync.py