diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-05-12 11:30:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-12 11:30:03 +0200 |
| commit | 68da6b389c403cb91650754be0e2287696807333 (patch) | |
| tree | a5dce4df79bc4e4d54632864f861705a0e530bba /docs | |
| parent | 2798c937deb6625a4e6a36e70d4d60ce5faac954 (diff) | |
Fixed #33543 -- Deprecated passing nulls_first/nulls_last=False to OrderBy and Expression.asc()/desc().
Thanks Allen Jonathan David for the initial patch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 4 | ||||
| -rw-r--r-- | docs/ref/models/expressions.txt | 24 | ||||
| -rw-r--r-- | docs/releases/4.1.txt | 4 |
3 files changed, 30 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 39007eb3e9..bb6b889f91 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -105,6 +105,10 @@ details on these changes. * The ``django.contrib.auth.hashers.CryptPasswordHasher`` will be removed. +* The ability to pass ``nulls_first=False`` or ``nulls_last=False`` to + ``Expression.asc()`` and ``Expression.desc()`` methods, and the ``OrderBy`` + expression will be removed. + .. _deprecation-removed-in-4.1: 4.1 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 diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index af129a149e..84eca03563 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -685,6 +685,10 @@ Miscellaneous * ``django.contrib.auth.hashers.CryptPasswordHasher`` is deprecated. +* The ability to pass ``nulls_first=False`` or ``nulls_last=False`` to + ``Expression.asc()`` and ``Expression.desc()`` methods, and the ``OrderBy`` + expression is deprecated. Use ``None`` instead. + Features removed in 4.1 ======================= |
