summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-01-24 14:07:24 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-02-12 12:44:47 -0500
commit9fca5d827d880ccc529c94bb65c46de6aafd227c (patch)
tree54383b90c6acfc644c563872f131724fed5ef6ea /lib/sqlalchemy/orm/query.py
parent47202abbf9823e1058e0b88ce64ffd3b88027e96 (diff)
downloadsqlalchemy-9fca5d827d880ccc529c94bb65c46de6aafd227c.tar.gz
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
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
-rw-r--r--lib/sqlalchemy/orm/query.py13
1 files changed, 4 insertions, 9 deletions
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)