diff options
-rw-r--r-- | doc/build/changelog/unreleased_20/9390.rst | 8 | ||||
-rw-r--r-- | doc/build/core/sqlelement.rst | 12 | ||||
-rw-r--r-- | lib/sqlalchemy/__init__.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/expression.py | 4 |
4 files changed, 26 insertions, 0 deletions
diff --git a/doc/build/changelog/unreleased_20/9390.rst b/doc/build/changelog/unreleased_20/9390.rst new file mode 100644 index 000000000..763fbba30 --- /dev/null +++ b/doc/build/changelog/unreleased_20/9390.rst @@ -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. diff --git a/doc/build/core/sqlelement.rst b/doc/build/core/sqlelement.rst index ac55e988e..937840924 100644 --- a/doc/build/core/sqlelement.rst +++ b/doc/build/core/sqlelement.rst @@ -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 diff --git a/lib/sqlalchemy/__init__.py b/lib/sqlalchemy/__init__.py index 6720437fa..70eace964 100644 --- a/lib/sqlalchemy/__init__.py +++ b/lib/sqlalchemy/__init__.py @@ -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 diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 7076cd10d..4fa9cda00 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -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.""" |