]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
further fixes for _cleanup_mapped_str_annotation
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 30 Dec 2024 18:17:29 +0000 (13:17 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 1 Jan 2025 16:17:57 +0000 (11:17 -0500)
commitfd3d17a30b15cc45ba18efaeb24ecc29b0ea1087
treec6fda3d06f7262f90f8eec9b806bb552eae46584
parenta4e38d119913ca18462f2e9c6448c6e24d369df3
further fixes for _cleanup_mapped_str_annotation

Fixed issues in type handling within the ``type_annotation_map`` feature
which prevented the use of unions, using either pep-604 or ``Union``
syntaxes under future annotations mode, which contained multiple generic
types as elements from being correctly resolvable.

also adds some further tests to assert that None added into the type
map for pep695, typing.NewType etc. sets up nullability on the column

Fixes: #12207
Change-Id: I4057694cf35868972db2942721049d79301b19c4
doc/build/changelog/unreleased_20/12207.rst [new file with mode: 0644]
lib/sqlalchemy/orm/decl_base.py
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_tm_future_annotations_sync.py
test/orm/declarative/test_typed_mapping.py