[Django] #24069: Regression in ServerHandler.handler_error

1 view
Skip to first unread message

Django

unread,
Jan 2, 2015, 6:55:59 AM1/2/15
to django-...@googlegroups.com
#24069: Regression in ServerHandler.handler_error
------------------------------+--------------------
Reporter: pelme | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------
9253042d53d61b23b3f727a00c41e8089be73836 which #4444 - silence broken pipe
errors introduced a regression in the error handling on Python 2.x.

In Python 2.x, `simple_server.ServerHandler` is and old style class. This
makes it an error using super() to access the super class.

The solution is simple: explicitly call
`simple_server.ServerHandler.handle_error()`.

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

Django

unread,
Jan 2, 2015, 7:00:01 AM1/2/15
to django-...@googlegroups.com
#24069: Regression in ServerHandler.handler_error
------------------------------+--------------------------------------
Reporter: pelme | Owner: pelme
Type: Bug | Status: assigned

Component: Core (Other) | Version: master
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 pelme):

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => pelme
* needs_docs: => 0


Old description:

> 9253042d53d61b23b3f727a00c41e8089be73836 which #4444 - silence broken
> pipe errors introduced a regression in the error handling on Python 2.x.
>
> In Python 2.x, `simple_server.ServerHandler` is and old style class. This
> makes it an error using super() to access the super class.
>
> The solution is simple: explicitly call
> `simple_server.ServerHandler.handle_error()`.

New description:

9253042d53d61b23b3f727a00c41e8089be73836 which #4444 - silence broken pipe
errors introduced a regression in the error handling on Python 2.x.

In Python 2.x, `simple_server.ServerHandler` is and old style class. This
makes it an error using super() to access the super class.

The solution is simple: explicitly call

`simple_server.ServerHandler.handle_error()` or inherit from object.

--

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

Django

unread,
Jan 2, 2015, 7:03:32 AM1/2/15
to django-...@googlegroups.com
#24069: Regression in ServerHandler.handler_error
------------------------------+--------------------------------------
Reporter: pelme | Owner: pelme
Type: Bug | Status: assigned
Component: Core (Other) | Version: master
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 pelme):

Here is a PR that makes ServerHandler a new style class which fixes the
issue:

https://github.com/django/django/pull/3826

I am not sure how this can be tested. It is hard to test this since
simple_server does some very nasty error handling (`except:` in a bunch of
places and relies on `sys.exc_info`).

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

Django

unread,
Jan 2, 2015, 7:30:05 AM1/2/15
to django-...@googlegroups.com
#24069: Regression in ServerHandler.handler_error
------------------------------+--------------------------------------
Reporter: pelme | Owner: pelme
Type: Bug | Status: assigned
Component: Core (Other) | Version: master
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 pelme):

For reference, here is a traceback where this fails:

The `TestLiveServer.test_serve_static_dj17_without_staticfiles_app`
failure from https://travis-ci.org/pytest-dev/pytest-django/jobs/45674534
shows this error in action. It is obscured by the exception munging that
is done within `simple_server`, though.

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

Django

unread,
Jan 2, 2015, 8:47:14 AM1/2/15
to django-...@googlegroups.com
#24069: Regression in ServerHandler.handler_error
------------------------------+------------------------------------

Reporter: pelme | Owner: pelme
Type: Bug | Status: assigned
Component: Core (Other) | 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 claudep):

* has_patch: 0 => 1
* stage: Unreviewed => Accepted


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

Django

unread,
Jan 2, 2015, 8:52:26 AM1/2/15
to django-...@googlegroups.com
#24069: Regression in ServerHandler.handler_error
------------------------------+------------------------------------
Reporter: pelme | Owner: pelme
Type: Bug | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac"]:
{{{
#!CommitTicketReference repository=""
revision="4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac"
Fixed #24069 -- Made ServerHandler a new style class to fix super() call.
}}}

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

Reply all
Reply to author
Forward
0 new messages