Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion django/contrib/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async def alogin(request, user, backend=None):
# RemovedInDjango61Warning.
if user is None:
warnings.warn(
"Fallback to request.user when user is None will be removed.",
"Fallback to request.auser() when user is None will be removed.",
RemovedInDjango61Warning,
stacklevel=2,
)
Expand Down
6 changes: 3 additions & 3 deletions docs/internals/deprecation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ details on these changes.
* The ``all`` keyword argument of ``django.contrib.staticfiles.finders.find()``
will be removed.

* The fallback to ``request.user`` when ``user`` is ``None`` in
``django.contrib.auth.login()`` and ``django.contrib.auth.alogin()`` will be
removed.
* Fallbacks to ``request.user`` and ``request.auser()`` when ``user`` is
``None`` in ``django.contrib.auth.login()`` and
``django.contrib.auth.alogin()``, respectively, will be removed.

* The ``ordering`` keyword argument of the PostgreSQL specific aggregation
functions ``django.contrib.postgres.aggregates.ArrayAgg``,
Expand Down
6 changes: 3 additions & 3 deletions docs/releases/5.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@ Miscellaneous
* The ``all`` argument for the ``django.contrib.staticfiles.finders.find()``
function is deprecated in favor of the ``find_all`` argument.

* The fallback to ``request.user`` when ``user`` is ``None`` in
``django.contrib.auth.login()`` and ``django.contrib.auth.alogin()`` will be
removed.
* Fallbacks to ``request.user`` and ``request.auser()`` when ``user`` is
``None`` in ``django.contrib.auth.login()`` and
``django.contrib.auth.alogin()``, respectively, are deprecated.

* The ``ordering`` keyword argument of the PostgreSQL specific aggregation
functions ``django.contrib.postgres.aggregates.ArrayAgg``,
Expand Down
6 changes: 3 additions & 3 deletions tests/async/test_async_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async def test_alogin_without_user_no_request_user(self):
),
self.assertWarnsMessage(
RemovedInDjango61Warning,
"Fallback to request.user when user is None will be removed.",
"Fallback to request.auser() when user is None will be removed.",
),
):
await alogin(request, None)
Expand All @@ -100,7 +100,7 @@ async def auser():
),
self.assertWarnsMessage(
RemovedInDjango61Warning,
"Fallback to request.user when user is None will be removed.",
"Fallback to request.auser() when user is None will be removed.",
),
):
await alogin(request, None)
Expand All @@ -116,7 +116,7 @@ async def auser():
request.session = await self.client.asession()
with self.assertWarnsMessage(
RemovedInDjango61Warning,
"Fallback to request.user when user is None will be removed.",
"Fallback to request.auser() when user is None will be removed.",
):
await alogin(request, None)
user = await aget_user(request)
Expand Down
Loading