From 9ddbd585a62ff1ad56e9ee6fef5898ced1932a88 Mon Sep 17 00:00:00 2001 From: jonathan vanasco Date: Wed, 28 Oct 2020 14:35:39 -0400 Subject: Apply underscore naming to several more operators The operator changes are: * `isfalse` is now `is_false` * `isnot_distinct_from` is now `is_not_distinct_from` * `istrue` is now `is_true` * `notbetween` is now `not_between` * `notcontains` is now `not_contains` * `notendswith` is now `not_endswith` * `notilike` is now `not_ilike` * `notlike` is now `not_like` * `notmatch` is now `not_match` * `notstartswith` is now `not_startswith` * `nullsfirst` is now `nulls_first` * `nullslast` is now `nulls_last` Because these are core operators, the internal migration strategy for this change is to support legacy terms for an extended period of time -- if not indefinitely -- but update all documentation, tutorials, and internal usage to the new terms. The new terms are used to define the functions, and the legacy terms have been deprecated into aliases of the new terms. Fixes: #5435 Change-Id: Ifbd7cb1cdda5981990243c4fc4b4ff467dc132ac --- lib/sqlalchemy/engine/reflection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/engine/reflection.py') diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 6af74d052..daebfe263 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -581,7 +581,7 @@ class Inspector(object): * ``column_sorting`` - optional dict mapping column names to tuple of sort keywords, - which may include ``asc``, ``desc``, ``nullsfirst``, ``nullslast``. + which may include ``asc``, ``desc``, ``nulls_first``, ``nulls_last``. .. versionadded:: 1.3.5 @@ -1006,8 +1006,8 @@ class Inspector(object): _index_sort_exprs = [ ("asc", operators.asc_op), ("desc", operators.desc_op), - ("nullsfirst", operators.nullsfirst_op), - ("nullslast", operators.nullslast_op), + ("nulls_first", operators.nulls_first_op), + ("nulls_last", operators.nulls_last_op), ] def _reflect_indexes( -- cgit v1.2.1