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.
* 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>
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>
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>
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24069#comment:4>
* 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>