]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
de-optionalize union types to support Optional for m2o
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 19 Oct 2022 01:01:05 +0000 (21:01 -0400)
committermike bayer <mike_mp@zzzcomputing.com>
Wed, 19 Oct 2022 12:01:21 +0000 (12:01 +0000)
commit257002227b811c85c7887236321d9965455889bc
tree5827f4d891a044c7b586987ce6a822593cff45fe
parentde7007e7cc6231b067df71ca79efee75f3317eae
de-optionalize union types to support Optional for m2o

Fixed bug in new ORM typed declarative mappings where we did not include
the ability to use ``Optional[]`` in the type annotation for a many-to-one
relationship, even though this is common.

Fixes: #8668
Change-Id: Idaf0846e49cc12095394b99ad6fe678735cf9242
doc/build/changelog/unreleased_20/8668.rst [new file with mode: 0644]
lib/sqlalchemy/orm/relationships.py
test/orm/declarative/test_dc_transforms.py
test/orm/declarative/test_typed_mapping.py