From 4e754a8914a1c2c16c97bdf363d2e24bfa823730 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 25 Mar 2022 17:08:48 -0400 Subject: pep-484: the pep-484ening, SQL part three hitting DML which is causing us to open up the ColumnCollection structure a bit, as we do put anonymous column expressions with None here. However, we still want Table /TableClause to have named column collections that don't return None, so parametrize the "key" in this collection also. * rename some "immutable" elements to "readonly". we change the contents of immutablecolumncollection underneath, so it's not "immutable" Change-Id: I2593995a4e5c6eae874bed5bf76117198be8ae97 --- lib/sqlalchemy/engine/default.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 65cb57e10..85ce91deb 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -54,7 +54,6 @@ from ..sql import expression from ..sql._typing import is_tuple_type from ..sql.compiler import DDLCompiler from ..sql.compiler import SQLCompiler -from ..sql.elements import ColumnClause from ..sql.elements import quoted_name from ..sql.schema import default_is_scalar @@ -88,6 +87,7 @@ if typing.TYPE_CHECKING: from ..sql.dml import DMLState from ..sql.dml import UpdateBase from ..sql.elements import BindParameter + from ..sql.roles import ColumnsClauseRole from ..sql.schema import Column from ..sql.schema import ColumnDefault from ..sql.type_api import _BindProcessorType @@ -1166,7 +1166,7 @@ class DefaultExecutionContext(ExecutionContext): return () @util.memoized_property - def returning_cols(self) -> Optional[Sequence[ColumnClause[Any]]]: + def returning_cols(self) -> Optional[Sequence[ColumnsClauseRole]]: if TYPE_CHECKING: assert isinstance(self.compiled, SQLCompiler) return self.compiled.returning -- cgit v1.2.1