]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
re-process args for builtin generic types
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 31 Aug 2024 16:56:00 +0000 (12:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 1 Sep 2024 20:42:34 +0000 (16:42 -0400)
commitf746fd78e303352d426a15c1f76ee835ce399d44
tree312e213524e5bc0c95d0a8777545d70b04e697bc
parenta102b8880cee50ac54ee6c25265420d670f91c21
re-process args for builtin generic types

Improvements to the ORM annotated declarative type map lookup dealing with
composed types such as ``dict[str, Any]`` linking to JSON (or others) with
or without "future annotations" mode.

There's apparently a big incompatiblity in types from typing vs.
Python builtins in the way they genericize.   The typing library makes
it very difficult to distinguish between the two sets of types.  This
patch is a bit slash and burn to work around all this.   These should
likely be reported as bugs in the Python standard library if they
aren't already.

Fixes: #11814
Change-Id: I56a62701d5e883be04df7f45fd9429bb9c1c9a6f
doc/build/changelog/unreleased_20/11814.rst [new file with mode: 0644]
lib/sqlalchemy/orm/decl_base.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/util/typing.py
test/orm/declarative/test_tm_future_annotations_sync.py
test/orm/declarative/test_typed_mapping.py