﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28034	Update the contributing tutorial to use a more recent patch	Mateusz Jankowski	Joe Krzystan	"I have started going through https://docs.djangoproject.com/en/dev/intro/contributing/. As advised in https://docs.djangoproject.com/en/dev/intro/contributing/#rolling-back-to-a-previous-revision-of-django I go back to commit 4ccfc4439a7add24f8db4ef3960d02ef8ae09887 (from 26 May 2015). I run the tests and some are failing. I ignore this as of ""If you’re using Python 3.5+, there will be a couple failures related to deprecation warnings that you can ignore. These failures have since been fixed in Django."" in https://docs.djangoproject.com/en/dev/intro/contributing/#running-django-s-test-suite-for-the-first-time. But I also get one error in {{{servers.test_basehttp.WSGIRequestHandlerTestCase.test_strips_underscore_headers}}}.

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'...
}}}"	Cleanup/optimization	closed	Documentation	dev	Normal	fixed		Adam Johnson	Accepted	1	0	0	0	0	0
