]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
identify unresolvable Mapped types
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 28 Nov 2022 15:58:49 +0000 (10:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 28 Nov 2022 17:01:48 +0000 (12:01 -0500)
commit0c50f8dfdeb8adf997cbc8aa03443e8e47761cb3
tree92c235fab367a2ea30943f2e6624ef7f4923f3ea
parentdb2344b0a2a9ef164651d645a8da2d7a9d1bc250
identify unresolvable Mapped types

Fixed issue where use of an unknown datatype within a :class:`.Mapped`
annotation for a column-based attribute would silently fail to map the
attribute, rather than reporting an exception; an informative exception
message is now raised.

tighten up iteration of names on mapped classes to more fully
exclude a large number of underscored names, so that we can avoid trying
to look at annotations for them or anything else.  centralize the
"list of names we care about" more fully within _cls_attr_resolver
and base it on underscore conventions we should usually ignore,
with the exception of the few underscore names we want to see.

Fixes: #8888
Change-Id: I3c0a1666579fe67b3c40cc74fa443b6f1de354ce
doc/build/changelog/unreleased_20/8888.rst [new file with mode: 0644]
lib/sqlalchemy/orm/decl_api.py
lib/sqlalchemy/orm/decl_base.py
lib/sqlalchemy/orm/util.py
test/orm/declarative/test_basic.py
test/orm/declarative/test_tm_future_annotations.py
test/orm/declarative/test_tm_future_annotations_sync.py
test/orm/declarative/test_typed_mapping.py