Opened 4 years ago

Closed 4 years ago

#32265 closed Cleanup/optimization (fixed)

Remove unnecessary ServerHandler.handle_error().

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: HTTP handling Version: dev
Severity: Normal Keywords:
Cc: Petter Strandmark Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

With 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 ServerHandler.handle_error() when Python 3.7 becomes the minimal Python supported by Django, i.e. in Django 4.0+.

Change History (5)

comment:1 by Mariusz Felisiak, 4 years ago

Cc: Petter Strandmark added

comment:2 by Mariusz Felisiak, 4 years ago

Triage Stage: Someday/MaybeAccepted

comment:3 by Mariusz Felisiak, 4 years ago

Has patch: set

comment:4 by Claude Paroz, 4 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by GitHub <noreply@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 88e972e4:

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

Note: See TracTickets for help on using tickets.
Back to Top