From 9fca5d827d880ccc529c94bb65c46de6aafd227c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 24 Jan 2020 14:07:24 -0500 Subject: Create initial future package, RemovedIn20Warning Reorganization of Select() is the first major element of the 2.0 restructuring. In order to start this we need to first create the new Select constructor and apply legacy elements to the old one. This in turn necessitates starting up the RemovedIn20Warning concept which itself need to refer to "sqlalchemy.future", so begin to establish this basic framework. Additionally, update the DML constructors with the newer no-keyword style. Remove the use of the "pending deprecation" and fix Query.add_column() deprecation which was not acting as deprecated. Fixes: #4845 Fixes: #4648 Change-Id: I0c7a22b2841a985e1c379a0bb6c94089aae6264c --- lib/sqlalchemy/orm/query.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lib/sqlalchemy/orm/query.py') diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 15319e049..f19ec5673 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -642,8 +642,6 @@ class Query(Generative): """Return the full SELECT statement represented by this :class:`.Query`, converted to a scalar subquery. - Analogous to :meth:`sqlalchemy.sql.expression.SelectBase.as_scalar`. - """ return self.scalar_subquery() @@ -1477,18 +1475,15 @@ class Query(Generative): for c in column: _ColumnEntity(self, c) - @util.pending_deprecation( - "0.7", - ":meth:`.add_column` is superseded " "by :meth:`.add_columns`", - False, + @util.deprecated( + "1.4", + ":meth:`.Query.add_column` is deprecated and will be removed in a " + "future release. Please use :meth:`.Query.add_columns`", ) def add_column(self, column): """Add a column expression to the list of result columns to be returned. - Pending deprecation: :meth:`.add_column` will be superseded by - :meth:`.add_columns`. - """ return self.add_columns(column) -- cgit v1.2.1