diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2022-01-06 19:15:06 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-01-06 19:15:06 +0000 |
commit | dd5f9c2039731adb6c019c4cc3a39694f9b236ad (patch) | |
tree | ce80dd61476c0c09f792f5690c7c7434b7876cc7 /lib/sqlalchemy/orm/context.py | |
parent | f3c93170dcbe705da25bc18bad2b29620d82a490 (diff) | |
parent | 01c50c64e302c193733cef7fb146fbab8eaa44bd (diff) | |
download | sqlalchemy-dd5f9c2039731adb6c019c4cc3a39694f9b236ad.tar.gz |
Merge "Remove all remaining removed_in_20 warnings slated for removal" into main
Diffstat (limited to 'lib/sqlalchemy/orm/context.py')
-rw-r--r-- | lib/sqlalchemy/orm/context.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/sqlalchemy/orm/context.py b/lib/sqlalchemy/orm/context.py index 012db36c2..36590f8ee 100644 --- a/lib/sqlalchemy/orm/context.py +++ b/lib/sqlalchemy/orm/context.py @@ -1091,24 +1091,6 @@ class ORMSelectCompileState(ORMCompileState, SelectState): def _simple_statement(self): - if ( - self.compile_options._use_legacy_query_style - and (self.distinct and not self.distinct_on) - and self.order_by - ): - to_add = sql_util.expand_column_list_from_order_by( - self.primary_columns, self.order_by - ) - if to_add: - util.warn_deprecated_20( - "ORDER BY columns added implicitly due to " - "DISTINCT is deprecated and will be removed in " - "SQLAlchemy 2.0. SELECT statements with DISTINCT " - "should be written to explicitly include the appropriate " - "columns in the columns clause" - ) - self.primary_columns += to_add - statement = self._select_statement( self.primary_columns + self.secondary_columns, tuple(self.from_clauses) + tuple(self.eager_joins.values()), @@ -2293,14 +2275,6 @@ class _BundleEntity(_QueryEntity): ) self.supports_single_entity = self.bundle.single_entity - if ( - self.supports_single_entity - and not compile_state.compile_options._use_legacy_query_style - ): - util.warn_deprecated_20( - "The Bundle.single_entity flag has no effect when " - "using 2.0 style execution." - ) @property def mapper(self): |