#35530: `django.contrib.auth.login` inconsistently guards `request.user`
-------------------------------------+-------------------------------------
Reporter: Jaap Roes | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: contrib.auth | Version: dev
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jaap Roes):
Just to be clear, these tests I provided are not supposed to pass. They're
just examples of reasonable scenarios that break as soon as the `user`
argument to `login` is `None`.
Calling `login` with `None` just doesn't make sense in my opinion. The
function signature also doesn't imply that the user is optional, or
allowed to be `None` in the first place.
--
Ticket URL: <https://code.djangoproject.com/ticket/35530#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070190377078a4-ab1f1bdd-348e-4685-911c-90553ba85176-000000%40eu-central-1.amazonses.com.