Update djblets for future Django deprecations.
Review Request #11921 — Created Jan. 10, 2022 and submitted
This change updates the Djblets codebase for some upcoming changes to
Django:
- The
authenticate
method in authentication backends needs to take the
request as the first positional argument. - Admin site URLs are now added directly in the
url()
method instead
of throughinclude()
. The Djblets impact here is in loading admin
URLs defined by extensions.
Ran unit tests and saw no more deprecation warnings.
Summary | ID |
---|---|
3b2d6325c81823e65feb6bf0c1fb61cc272485fb |
Description | From | Last Updated |
---|---|---|
This will need to land for 3.x, since 2.x supports Django 1.6, which expects is_{anonymous,authenticated} to be methods. |
chipx86 | |
Your latest revision undid all the is_{anonymous,authenticated} changes. |
chipx86 | |
Missing , optional |
chipx86 | |
While here, can you add the missing **kwargs? |
chipx86 |
- Commits:
-
Summary ID 2b7e3239ca5690b38d28a292673636fe812d72e3 3b2d6325c81823e65feb6bf0c1fb61cc272485fb - Branch:
-
release-2.xrelease-3.x
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Description:
-
This change updates the Djblets codebase for some upcoming changes to
Django: ~ User.is_anonymous
andUser.is_authenticated
have been changed to
be properties rather than methods.
~ - The
authenticate
method in authentication backends needs to take the
request as the first positional argument.
~ - The
authenticate
method in authentication backends needs to take the
request as the first positional argument.
~ - Admin site URLs are now added directly in the
url()
method instead
of throughinclude()
. The Djblets impact here is in loading admin
URLs defined by extensions.
- - Admin site URLs are now added directly in the
url()
method instead
of throughinclude()
. The Djblets impact here is in loading admin
URLs defined by extensions.