[Django] #32265: Remove unnecessary ServerHandler.handle_error().

23 views
Skip to first unread message

Django

unread,
Dec 14, 2020, 5:07:28 AM12/14/20
to django-...@googlegroups.com
#32265: Remove unnecessary ServerHandler.handle_error().
-------------------------------------+-------------------------------------
Reporter: Mariusz | Owner: Mariusz Felisiak
Felisiak |
Type: | Status: assigned
Cleanup/optimization |
Component: HTTP | Version: master
handling |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Someday/Maybe |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
With
[https://github.com/python/cpython/commit/47ffc1a9f6fab1c17cdcc325d4af066317369ed7
Petter Strandmark patch] (backported to Python 3.7)
`ConnectionAbortedError`, `BrokenPipeError`, `ConnectionResetError` raised
from `SocketServer.BaseServer.finish_request()` are already suppressed by
`wsgiref.handlers.BaseHandler.run()`, so we can remove
[https://github.com/django/django/blob/187e088b48449a9d3535c85e407f070a4ebc94ef/django/core/servers/basehttp.py#L116-L119
ServerHandler.handle_error()] when Python 3.7 becomes the minimal Python
supported by Django, i.e. in Django 4.0+.

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

Django

unread,
Dec 14, 2020, 5:08:18 AM12/14/20
to django-...@googlegroups.com
#32265: Remove unnecessary ServerHandler.handle_error().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0

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

* cc: Petter Strandmark (added)


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

Django

unread,
Jan 14, 2021, 2:18:18 PM1/14/21
to django-...@googlegroups.com
#32265: Remove unnecessary ServerHandler.handle_error().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: master
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 Mariusz Felisiak):

* stage: Someday/Maybe => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/32265#comment:2>

Django

unread,
Jan 15, 2021, 2:23:16 PM1/15/21
to django-...@googlegroups.com
#32265: Remove unnecessary ServerHandler.handle_error().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: master
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 Mariusz Felisiak):

* has_patch: 0 => 1


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/32265#comment:3>

Django

unread,
Jan 16, 2021, 4:43:44 AM1/16/21
to django-...@googlegroups.com
#32265: Remove unnecessary ServerHandler.handle_error().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | 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 Claude Paroz):

* stage: Accepted => Ready for checkin


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

Django

unread,
Jan 16, 2021, 11:38:39 AM1/16/21
to django-...@googlegroups.com
#32265: Remove unnecessary ServerHandler.handle_error().
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
Type: | Felisiak
Cleanup/optimization | Status: closed

Component: HTTP handling | Version: master
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: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"88e972e46d71520fbb480642cf957185e5a14a46" 88e972e4]:
{{{
#!CommitTicketReference repository=""
revision="88e972e46d71520fbb480642cf957185e5a14a46"
Fixed #32265, Refs #32355 -- Removed unnecessary
ServerHandler.handle_error().

ConnectionAbortedError, BrokenPipeError, ConnectionResetError raised


from SocketServer.BaseServer.finish_request() are already suppressed

by wsgiref.handlers.BaseHandler.run() in Python 3.7+, see
https://github.com/python/cpython/commit/47ffc1a9f6fab1c17cdcc325d4af066317369ed7
}}}

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

Reply all
Reply to author
Forward
0 new messages