[Django] #37163: Optimize `@user_passes_test`

3 views
Skip to first unread message

Django

unread,
Jun 11, 2026, 6:07:34 PM (2 days ago) Jun 11
to django-...@googlegroups.com
#37163: Optimize `@user_passes_test`
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: Adam Johnson
Johnson |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: dev
contrib.auth |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
#35030 added async support to this decorator, but put the async test and
wrapping for `test_func` at call time. This work can instead be done once
at decoration time, saving ~500 ns per request.
--
Ticket URL: <https://code.djangoproject.com/ticket/37163>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 11, 2026, 6:11:31 PM (2 days ago) Jun 11
to django-...@googlegroups.com
#37163: Optimize `@user_passes_test`
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Adam
Type: | Johnson
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam Johnson):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37163#comment:1>

Django

unread,
Jun 12, 2026, 11:46:18 AM (2 days ago) Jun 12
to django-...@googlegroups.com
#37163: Optimize `@user_passes_test`
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Adam
Type: | Johnson
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* stage: Unreviewed => Accepted

Comment:

Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/37163#comment:2>
Reply all
Reply to author
Forward
0 new messages