]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Restore export for nullslast/nullfirst
authorFederico Caselli <cfederico87@gmail.com>
Mon, 27 Feb 2023 21:56:02 +0000 (22:56 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 1 Mar 2023 00:19:20 +0000 (19:19 -0500)
Previously only the snake case versions nulls_last/nulls_first
were exported in the toplevel namespace.

Fixes: #9390
Change-Id: I9088e858ae108a5c9106b9d8d82655ad605417cc

doc/build/changelog/unreleased_20/9390.rst [new file with mode: 0644]
doc/build/core/sqlelement.rst
lib/sqlalchemy/__init__.py
lib/sqlalchemy/sql/expression.py

diff --git a/doc/build/changelog/unreleased_20/9390.rst b/doc/build/changelog/unreleased_20/9390.rst
new file mode 100644 (file)
index 0000000..763fbba
--- /dev/null
@@ -0,0 +1,8 @@
+.. change::
+    :tags: bug, sql, regression
+    :tickets: 9390
+
+    Restore the :func:`.nullslast` and :func:`.nullsfirst` legacy functions
+    into the ``sqlalchemy`` import namespace. Previously, the newer
+    :func:`.nulls_last` and :func:`.nulls_first` functions were available, but
+    the legacy ones were inadvertently removed.
index ac55e988ed55ac1f98013e053c75bd0a39ecf05b..937840924250929ac46757052d544ab3b8bb8446 100644 (file)
@@ -102,8 +102,20 @@ Functions listed here are more commonly available as methods from any
 
 .. autofunction:: nulls_first
 
+.. function:: nullsfirst
+
+   Synonym for the :func:`_sql.nulls_first` function.
+
+   .. versionchanged:: 2.0.5 restored missing legacy symbol :func:`.nullsfirst`.
+
 .. autofunction:: nulls_last
 
+.. function:: nullslast
+
+   Legacy synonym for the :func:`_sql.nulls_last` function.
+
+   .. versionchanged:: 2.0.5 restored missing legacy symbol :func:`.nullslast`.
+
 .. autofunction:: over
 
 .. autofunction:: within_group
index 6720437fa3c808de45d8c319911be3f819c45d8e..70eace96457e79b7dbeb2f66ba5399da2a93b04d 100644 (file)
@@ -162,6 +162,8 @@ from .sql.expression import Null as Null
 from .sql.expression import null as null
 from .sql.expression import nulls_first as nulls_first
 from .sql.expression import nulls_last as nulls_last
+from .sql.expression import nullsfirst as nullsfirst
+from .sql.expression import nullslast as nullslast
 from .sql.expression import Operators as Operators
 from .sql.expression import or_ as or_
 from .sql.expression import outerjoin as outerjoin
index 7076cd10d26dd99dae7aa047933b6f1ee24f5cbc..4fa9cda00544344f68a5b79ad15cc9afc24fb78b 100644 (file)
@@ -152,4 +152,8 @@ from .selectable import Values as Values
 from .visitors import Visitable as Visitable
 
 nullsfirst = nulls_first
+"""Synonym for the :func:`.nulls_first` function."""
+
+
 nullslast = nulls_last
+"""Synonym for the :func:`.nulls_last` function."""