I'm running Python 3.6.1 on MacOS Sierra 10.12.2.
Traceback:
{{{
(djangodev) django/tests [4ccfc44] » ./runtests.py
servers.test_basehttp.WSGIRequestHandlerTestCase.test_strips_underscore_headers
Testing against Django installed in
'/Users/mateuszjankowski/Code/django/django'
Creating test database for alias 'default'...
Creating test database for alias 'other'...
E
======================================================================
ERROR: test_strips_underscore_headers
(servers.test_basehttp.WSGIRequestHandlerTestCase)
WSGIRequestHandler ignores headers containing underscores.
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 138, in run
self.finish_response()
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 180, in finish_response
self.write(data)
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 274, in write
self.send_headers()
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 332, in send_headers
self.send_preamble()
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 252, in send_preamble
self._write(('HTTP/%s %s\r\n' %
(self.http_version,self.status)).encode('iso-8859-1'))
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 453, in _write
result = self.stdout.write(data)
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py",
line 775, in write
self._sock.sendall(b)
AttributeError: 'Stub' object has no attribute 'sendall'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 141, in run
self.handle_error()
File
"/Users/mateuszjankowski/Code/django/django/core/servers/basehttp.py",
line 92, in handle_error
super(ServerHandler, self).handle_error()
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 368, in handle_error
self.finish_response()
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 180, in finish_response
self.write(data)
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 274, in write
self.send_headers()
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/Users/mateuszjankowski/Code/django/tests/servers/test_basehttp.py", line
72, in test_strips_underscore_headers
WSGIRequestHandler(request, '192.168.0.2', server)
File
"/Users/mateuszjankowski/Code/django/django/core/servers/basehttp.py",
line 99, in __init__
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py",
line 696, in __init__
self.handle()
File
"/Users/mateuszjankowski/Code/django/django/core/servers/basehttp.py",
line 179, in handle
handler.run(self.server.get_app())
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/handlers.py",
line 144, in run
self.close()
File
"/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/wsgiref/simple_server.py",
line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------------------------------------
Ran 1 test in 0.002s
FAILED (errors=1)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28034>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Matteo Parrucci):
The specific test you mention did not fail for me but I have something
more than "a couple" tests failing:
FAILED (failures=37, errors=946, skipped=574, expected failures=6)
But may be it's ok after all
Using python 3.5.2 on Linux mint 18
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:1>
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
That point in Django's history doesn't have the Python 3.6 compatibility
fixes. We should update the tutorial to use a more recent commit (this was
last done in 3fd754f12df42d173b6e9a93e7c32f8f5be55e7f).
0034e9af18f3d393a6dd2389ffbba4c919b1d7d7 could be a candidate patch to use
for the tutorial.
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:2>
* owner: nobody => Joe Krzystan
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:3>
* has_patch: 0 => 1
Comment:
Submitted PR with updates per #5851
(0034e9af18f3d393a6dd2389ffbba4c919b1d7d7).
https://github.com/django/django/pull/8970
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:4>
Comment (by Tim Graham):
At this point, it would be idea to use a more recent patch that doesn't
require an old version of Sphinx to build the documentation. I'm beginning
to wonder if there might be a better approach to this tutorial so that we
don't have to update it every so often.
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:5>
* has_patch: 1 => 0
Comment:
I merged 407c1249c9a0296ec8a8d95e447bd695ca471b5e today. That could be a
candidate to use.
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:6>
* cc: Adam (Chainz) Johnson (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:7>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/10418 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"18e4ade79ef145401b899ab539322c95d2a64266" 18e4ade7]:
{{{
#!CommitTicketReference repository=""
revision="18e4ade79ef145401b899ab539322c95d2a64266"
Fixed #28034 -- Updated the contributing tutorial to use an imaginary
ticket.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:9>
Comment (by Tim Graham <timograham@…>):
In [changeset:"173e242d715da1eedce2540f8531b9c446177a16" 173e242d]:
{{{
#!CommitTicketReference repository=""
revision="173e242d715da1eedce2540f8531b9c446177a16"
[2.1.x] Fixed #28034 -- Updated the contributing tutorial to use an
imaginary ticket.
Backport of 18e4ade79ef145401b899ab539322c95d2a64266 from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:10>
Comment (by GitHub <noreply@…>):
In [changeset:"67bb1f516cf507feb141fd4ef746456e1ef67c4a" 67bb1f51]:
{{{
#!CommitTicketReference repository=""
revision="67bb1f516cf507feb141fd4ef746456e1ef67c4a"
Refs #28034 -- Corrected docs example in contributing tutorial.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:11>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"fc9cbad880632e77a37957ba6686a72c2e7481e4" fc9cbad]:
{{{
#!CommitTicketReference repository=""
revision="fc9cbad880632e77a37957ba6686a72c2e7481e4"
[3.2.x] Refs #28034 -- Corrected docs example in contributing tutorial.
Backport of 67bb1f516cf507feb141fd4ef746456e1ef67c4a from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28034#comment:12>