Re: [Django] #34173: SessionMiddleware support 503 status code

3 views
Skip to first unread message

Django

unread,
Nov 22, 2022, 4:40:30 AM11/22/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
----------------------------------+--------------------------------------
Reporter: SessionIssue | Owner: nobody
Type: New feature | Status: new
Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* cc: Florian Apolloner, Anssi Kääriäinen (added)


Comment:

I'm not sure why we should treat 503 differently. IMO, we could reconsider
avoiding session saving when status code > 500 🤔

PS. Do not reopen tickets without further explanation.

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

Django

unread,
Nov 22, 2022, 5:48:29 AM11/22/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
----------------------------------+--------------------------------------
Reporter: SessionIssue | Owner: nobody
Type: New feature | Status: new
Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
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 SessionIssue):

Replying to [comment:3 Mariusz Felisiak]:


> I'm not sure why we should treat 503 differently. IMO, we could
reconsider avoiding session saving when status code > 500 🤔
>
> PS. Do not reopen tickets without further explanation.

That would fix the problem and seems like a convenient solution to me.
Thanks a lot! 😁

--
Ticket URL: <https://code.djangoproject.com/ticket/34173#comment:4>

Django

unread,
Nov 22, 2022, 8:43:24 AM11/22/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
--------------------------------------+------------------------------------
Reporter: SessionIssue | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Carlton Gibson):

* type: New feature => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

Happy to look at a patch (with tests) adjusting the check to `if
response.status_code >= 500:`

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

Django

unread,
Nov 22, 2022, 8:44:11 AM11/22/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
--------------------------------------+------------------------------------
Reporter: SessionIssue | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0

--------------------------------------+------------------------------------
Changes (by Carlton Gibson):

* easy: 0 => 1


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

Django

unread,
Nov 22, 2022, 10:44:02 PM11/22/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
-------------------------------------+-------------------------------------
Reporter: SessionIssue | Owner: Abhinav
Type: | Yadav
Cleanup/optimization | Status: assigned

Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Abhinav Yadav):

* owner: nobody => Abhinav Yadav
* status: new => assigned


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

Django

unread,
Nov 23, 2022, 11:04:31 AM11/23/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
-------------------------------------+-------------------------------------
Reporter: SessionIssue | Owner: Abhinav
Type: | Yadav
Cleanup/optimization | Status: assigned
Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by SessionIssue):

Replying to [comment:5 Carlton Gibson]:


> Happy to look at a patch (with tests) adjusting the check to `if
response.status_code >= 500:`

Is this a patch we can expect to see in 3.2 (LTS), or will this only be
patched in the upcoming 4.2 LTS?
Thanks in advance.

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

Django

unread,
Nov 24, 2022, 7:10:58 AM11/24/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
-------------------------------------+-------------------------------------
Reporter: SessionIssue | Owner: Abhinav
Type: | Yadav
Cleanup/optimization | Status: assigned
Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/16326 PR]

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

Django

unread,
Nov 24, 2022, 8:48:20 AM11/24/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
-------------------------------------+-------------------------------------
Reporter: SessionIssue | Owner: Abhinav
Type: | Yadav
Cleanup/optimization | Status: assigned
Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


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

Django

unread,
Nov 24, 2022, 9:47:18 AM11/24/22
to django-...@googlegroups.com
#34173: SessionMiddleware support 503 status code
-------------------------------------+-------------------------------------
Reporter: SessionIssue | Owner: Abhinav
Type: | Yadav
Cleanup/optimization | Status: closed
Component: contrib.sessions | Version: 4.1
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"17472c3304050fbbf7a65976ab7b392184d081d1" 17472c3]:
{{{
#!CommitTicketReference repository=""
revision="17472c3304050fbbf7a65976ab7b392184d081d1"
Fixed #34173 -- Skipped saving sessions on 5xx responses.
}}}

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

Reply all
Reply to author
Forward
0 new messages