]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
fix optionalized forms for dict[]
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 21 Nov 2022 14:46:43 +0000 (09:46 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 22 Nov 2022 14:49:02 +0000 (09:49 -0500)
commit509ffeedefca1ad0ad8e29c6c3410d270fb3d2b9
treebfa5022ae1de59d90830241b99b10e80ea0b5c62
parent46e6693cb3db445f18aa25d5e4ca613504bd12b3
fix optionalized forms for dict[]

Fixed a suite of issues involving :class:`.Mapped` use with dictionary
types, such as ``Mapped[dict[str, str] | None]``, would not be correctly
interpreted in Declarative ORM mappings. Support to correctly
"de-optionalize" this type including for lookup in type_annotation_map has
been fixed.

Fixes: #8777
Change-Id: Iaba90791dea341d00eaff788d40b0a4e48dab02e
doc/build/changelog/unreleased_20/8777.rst [new file with mode: 0644]
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/util/typing.py
test/orm/declarative/test_tm_future_annotations.py
test/orm/declarative/test_typed_mapping.py