]> 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:21:01 +0000 (12:21 -0400)
commit04751bf747d1db83abe34780cdfc3e20fe64e975
treeb5caa42d4e79d0ec5323ad74dde6fb78aa2b6740
parentb0d676d3e7e7a1a7591f14375906ad27c6b2f758
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
(cherry picked from commit 03dbd830e174685964191f739ea784f51c97d6b3)
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