]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
apply a fixed locals w/ Mapped to all de-stringify
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 21 Feb 2023 15:34:01 +0000 (10:34 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 27 Feb 2023 03:20:11 +0000 (22:20 -0500)
commit681055f9fb5230d344a67f47b0c60fc1a5804b3e
tree2cb2b6bda2e36b936c0f50fe202bf40214408bd7
parent304d590ad4016d5ec627edd55e9ac5b747c68d2a
apply a fixed locals w/ Mapped to all de-stringify

Continued the fix for :ticket:`8853`, allowing the :class:`_orm.Mapped`
name to be fully qualified regardless of whether or not
``from __annotations__ import future`` were present. This issue first fixed
in 2.0.0b3 confirmed that this case worked via the test suite, however the
test suite apparently was not testing the behavior for the name ``Mapped``
not being locally present at all; string resolution has been updated to
ensure the ``Mapped`` symbol is locatable as applies to how the ORM uses
these functions.

Fixes: #8853
Fixes: #9335
Change-Id: Id82d09aee906165a4d77c7da6a0b4177dd675c10
doc/build/changelog/unreleased_20/8853.rst [new file with mode: 0644]
lib/sqlalchemy/orm/decl_base.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/util/typing.py
test/orm/declarative/test_abs_import_only.py [new file with mode: 0644]
test/orm/declarative/test_tm_future_annotations.py