]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
new features for pep 593 Annotated
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 14 Jun 2022 21:05:44 +0000 (17:05 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Jun 2022 13:04:51 +0000 (09:04 -0400)
commit514f2a8b4c6de8c033496543e9aaf2a0a4eb599d
treea18461c3168a9e49803b41a0492d33fc000aef15
parentaa8ddf7d356e7ea8c100cca18bb49e3bd820ca31
new features for pep 593 Annotated

* extract the inner type from Annotated when the outer type
  isn't present in the type map, to allow for arbitrary Annotated
* allow _IntrospectsAnnotations objects to be directly present
  in an Annotated and resolve the mapper property from that.
  Currently implemented for mapped_column(), with message for
  others.  Can work for composite() and likely some
  relationship() as well at some point

References: https://twitter.com/zzzeek/status/1536693554621341697 and
replies

Change-Id: I04657050a8785f194bf8f63291faf3475af88781
lib/sqlalchemy/orm/decl_base.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/sql/annotation.py
lib/sqlalchemy/util/typing.py
test/orm/declarative/test_typed_mapping.py