]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
evaluate types in terms of the class in which they appear
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 31 Oct 2022 13:51:51 +0000 (09:51 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 31 Oct 2022 16:56:21 +0000 (12:56 -0400)
commit66f3533de86506327c753c1ea80b121692535745
tree68e9563532474597a9b2e27b1e5bf0cfd0fbca66
parentaf9d3ab9b8a0aaa43e9347fd251a087eebd71e1d
evaluate types in terms of the class in which they appear

Fixed issues within the declarative typing resolver (i.e. which resolves
``ForwardRef`` objects) where types that were declared for columns in one
particular source file would raise ``NameError`` when the ultimate mapped
class were in another source file.  The types are now resolved in terms
of the module for each class in which the types are used.

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