From 514f2a8b4c6de8c033496543e9aaf2a0a4eb599d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 14 Jun 2022 17:05:44 -0400 Subject: 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/sql/annotation.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/annotation.py b/lib/sqlalchemy/sql/annotation.py index 56d88bc2f..61849d053 100644 --- a/lib/sqlalchemy/sql/annotation.py +++ b/lib/sqlalchemy/sql/annotation.py @@ -9,6 +9,10 @@ copies of SQL constructs which contain context-specific markers and associations. +Note that the :class:`.Annotated` concept as implemented in this module is not +related in any way to the pep-593 concept of "Annotated". + + """ from __future__ import annotations -- cgit v1.2.1