Re: [Django] #35030: Make django.contrib.auth decorators work with async functions.

30 views
Skip to first unread message

Django

unread,
Dec 12, 2023, 9:25:13 AM12/12/23
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Dingning):

* owner: nobody => Dingning
* status: new => assigned


Comment:

OK, I have achieved a simple demo, I think I can work on this ticket. I'll
I will improve my code further, then submit a PR as soon as possible.

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 18, 2023, 12:05:26 AM12/18/23
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Dingning):

* needs_docs: 0 => 1
* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:5>

Django

unread,
Dec 18, 2023, 12:07:48 AM12/18/23
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Dingning):

* needs_better_patch: 0 => 1


Comment:

Here is my PR.
https://github.com/django/django/pull/17621

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:6>

Django

unread,
Dec 18, 2023, 7:14:37 AM12/18/23
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------

Comment (by Natalia Bidart):

Hello Dingning, thanks for your work on this ticket. Once your PR is ready
for review, please unset the flags "Patch needs improvement" and "Needs
documentation" so it appears in the review queue
([https://docs.djangoproject.com/en/dev/internals/contributing/writing-
code/submitting-patches/#patch-style docs about this]).

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:7>

Django

unread,
Dec 18, 2023, 7:44:54 AM12/18/23
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Dingning):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:8>

Django

unread,
Dec 18, 2023, 8:46:11 AM12/18/23
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:9>

Django

unread,
Jan 18, 2024, 7:46:56 AMJan 18
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------

Comment (by Dingning):

Hi guys, I created a topic to discuss, welcome to chat
here(https://forum.djangoproject.com/t/about-async-version-of-the-login-
required-decorator/27077)

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:10>

Django

unread,
Feb 1, 2024, 9:41:02 PMFeb 1
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Dingning):

* needs_better_patch: 1 => 0

* needs_docs: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:11>

Django

unread,
Feb 2, 2024, 2:57:01 AMFeb 2
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1

* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:12>

Django

unread,
Feb 25, 2024, 6:43:54 AMFeb 25
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Dingning):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:13>

Django

unread,
Feb 28, 2024, 4:08:59 AMFeb 28
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by Dingning):

Hello, dear reviewers. I have updated my commit. Could you please review
the pull request?
--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:14>

Django

unread,
Mar 2, 2024, 1:57:14 PMMar 2
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:15>

Django

unread,
Mar 6, 2024, 7:28:42 AMMar 6
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
----------------------------------+------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by GitHub <noreply@…>):

In [changeset:"c4df2a77761a1ae392eb5c4803b5712803d5239f" c4df2a77]:
{{{#!CommitTicketReference repository=""
revision="c4df2a77761a1ae392eb5c4803b5712803d5239f"
Refs #35030 -- Added more tests for @user_passes_test decorator.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:16>

Django

unread,
Mar 7, 2024, 3:58:24 AMMar 7
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
-------------------------------------+-------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: async, decorator | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:17>

Django

unread,
Mar 7, 2024, 4:45:04 AMMar 7
to django-...@googlegroups.com
#35030: Make django.contrib.auth decorators work with async functions.
-------------------------------------+-------------------------------------
Reporter: Mike Lissner | Owner: Dingning
Type: New feature | Status: closed
Component: contrib.auth | Version: dev
Severity: Normal | Resolution: fixed
Keywords: async, decorator | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"549320946dfdaac6ccb6c0d3150c46db92637187" 5493209]:
{{{#!CommitTicketReference repository=""
revision="549320946dfdaac6ccb6c0d3150c46db92637187"
Fixed #35030 -- Made django.contrib.auth decorators to work with async
functions.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35030#comment:18>
Reply all
Reply to author
Forward
0 new messages