summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/query.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2020-04-08 20:26:21 +0200
committerFederico Caselli <cfederico87@gmail.com>2020-04-09 00:33:22 +0200
commita9b068ae564e5e775e312373088545b75aeaa1b0 (patch)
tree3a20c79acfefe49b62ee4bca360bb11001f9eec9 /lib/sqlalchemy/orm/query.py
parentecca4fe3f8aebc5b42c2acda2e5d28d6a90a821e (diff)
downloadsqlalchemy-a9b068ae564e5e775e312373088545b75aeaa1b0.tar.gz
Remove code deprecated before version 1.1
- Remove deprecated method ``get_primary_keys` in the :class:`.Dialect` and :class:`.Inspector` classes. - Remove deprecated event ``dbapi_error`` and the method ``ConnectionEvents.dbapi_error`. - Remove support for deprecated engine URLs of the form ``postgres://``. - Remove deprecated dialect ``mysql+gaerdbms``. - Remove deprecated parameter ``quoting`` from :class:`.mysql.ENUM` and :class:`.mysql.SET` in the ``mysql`` dialect. - Remove deprecated function ``comparable_property``. and function ``comparable_using`` in the declarative extension. - Remove deprecated function ``compile_mappers``. - Remove deprecated method ``collection.linker``. - Remove deprecated method ``Session.prune`` and parameter ``Session.weak_identity_map``. This change also removes the class ``StrongInstanceDict``. - Remove deprecated parameter ``mapper.order_by``. - Remove deprecated parameter ``Session._enable_transaction_accounting`. - Remove deprecated parameter ``Session.is_modified.passive``. - Remove deprecated class ``Binary``. Please use :class:`.LargeBinary`. - Remove deprecated methods ``Compiled.compile``, ``ClauseElement.__and__`` and ``ClauseElement.__or__`` and attribute ``Over.func``. - Remove deprecated ``FromClause.count`` method. - Remove deprecated parameter ``Table.useexisting``. - Remove deprecated parameters ``text.bindparams`` and ``text.typemap``. - Remove boolean support for the ``passive`` parameter in ``get_history``. - Remove deprecated ``adapt_operator`` in ``UserDefinedType.Comparator``. Fixes: #4643 Change-Id: Idcd390c77bf7b0e9957907716993bdaa3f1a1763
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
-rw-r--r--lib/sqlalchemy/orm/query.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index d001ab983..e131a4aa3 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -1765,10 +1765,7 @@ class Query(Generative):
the newly resulting ``Query``
All existing ORDER BY settings can be suppressed by
- passing ``None`` - this will suppress any ordering configured
- on the :func:`.mapper` object using the deprecated
- :paramref:`.mapper.order_by` parameter.
-
+ passing ``None``.
"""
if len(criterion) == 1:
@@ -3439,7 +3436,8 @@ class Query(Generative):
"Using the Query.instances() method without a context "
"is deprecated and will be disallowed in a future release. "
"Please make use of :meth:`.Query.from_statement` "
- "for linking ORM results to arbitrary select constructs."
+ "for linking ORM results to arbitrary select constructs.",
+ version="1.4",
)
context = QueryContext(self)
@@ -4256,15 +4254,6 @@ class _MapperEntity(_QueryEntity):
# if self._adapted_selectable is None:
context.froms += (self.selectable,)
- if context.order_by is False and self.mapper.order_by:
- context.order_by = self.mapper.order_by
-
- # apply adaptation to the mapper's order_by if needed.
- if adapter:
- context.order_by = adapter.adapt_list(
- util.to_list(context.order_by)
- )
-
loading._setup_entity_query(
context,
self.mapper,