From 68da6b389c403cb91650754be0e2287696807333 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 12 May 2022 11:30:03 +0200 Subject: Fixed #33543 -- Deprecated passing nulls_first/nulls_last=False to OrderBy and Expression.asc()/desc(). Thanks Allen Jonathan David for the initial patch. --- docs/ref/models/expressions.txt | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index b3702116d7..da533ba5c3 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -1033,20 +1033,40 @@ calling the appropriate methods on the wrapped expression. to a column. The ``alias`` parameter will be ``None`` unless the expression has been annotated and is used for grouping. - .. method:: asc(nulls_first=False, nulls_last=False) + .. method:: asc(nulls_first=None, nulls_last=None) Returns the expression ready to be sorted in ascending order. ``nulls_first`` and ``nulls_last`` define how null values are sorted. See :ref:`using-f-to-sort-null-values` for example usage. - .. method:: desc(nulls_first=False, nulls_last=False) + .. versionchanged:: 4.1 + + In older versions, ``nulls_first`` and ``nulls_last`` defaulted to + ``False``. + + .. deprecated:: 4.1 + + Passing ``nulls_first=False`` or ``nulls_last=False`` to ``asc()`` + is deprecated. Use ``None`` instead. + + .. method:: desc(nulls_first=None, nulls_last=None) Returns the expression ready to be sorted in descending order. ``nulls_first`` and ``nulls_last`` define how null values are sorted. See :ref:`using-f-to-sort-null-values` for example usage. + .. versionchanged:: 4.1 + + In older versions, ``nulls_first`` and ``nulls_last`` defaulted to + ``False``. + + .. deprecated:: 4.1 + + Passing ``nulls_first=False`` or ``nulls_last=False`` to ``desc()`` + is deprecated. Use ``None`` instead. + .. method:: reverse_ordering() Returns ``self`` with any modifications required to reverse the sort -- cgit v1.3