]> 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:23:07 +0000 (11:23 -0500)
commit98596bd20a9e8ac81cee1eaaf6f42444a6725982
tree722399abad90a8d858305ce4e97ff9f9cbf77d6e
parentf849da9b66eb3734ae89a459fecfca28c48ea4ac
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
(cherry picked from commit fd3d17a30b15cc45ba18efaeb24ecc29b0ea1087)
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