This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Error in assertion in wsgiref.handlers.BaseHandler.start_response
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6, Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, inglesp, pje, python-dev
Priority: low Keywords: patch

Created on 2016-03-14 18:11 by inglesp, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
issue26560.patch inglesp, 2016-03-17 17:32 review
Messages (5)
msg261773 - (view) Author: Peter Inglesby (inglesp) * Date: 2016-03-14 18:11
The line:

  assert int(status[:3]),"Status message must begin w/3-digit code"

should be something like:

  assert status[:3].isnumeric(), "Status message must begin w/3-digit code"
msg261843 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-03-16 08:35
Thanks for the report.

Can you give us a bit more information about the issue? Did you get a traceback? Or just noticed it while reading the source code?

If you want to write a patch, please read the devguide.
msg261921 - (view) Author: Peter Inglesby (inglesp) * Date: 2016-03-17 17:32
I found it while reading the source.  Patch attached.
msg262023 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-19 07:04
New changeset 60f01a8a71ef by Berker Peksag in branch '3.5':
Issue #26560: Avoid potential ValueError in BaseHandler.start_response

New changeset ae1d12f09392 by Berker Peksag in branch 'default':
Issue #26560: Avoid potential ValueError in BaseHandler.start_response
msg262024 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-03-19 07:06
Thanks for the patch, Peter! I've simplified the test a bit and commit it.
Date User Action Args
2022-04-11 14:58:28adminsetgithub: 70747
2016-03-19 07:06:36berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg262024

stage: needs patch -> resolved
2016-03-19 07:04:51python-devsetnosy: + python-dev
messages: + msg262023
2016-03-17 17:32:52inglespsetfiles: + issue26560.patch
keywords: + patch
messages: + msg261921
2016-03-16 08:35:22berker.peksagsetpriority: normal -> low
versions: + Python 3.5
nosy: + berker.peksag

messages: + msg261843

stage: needs patch
2016-03-15 17:11:21SilentGhostsetnosy: + pje

type: behavior
versions: + Python 3.6
2016-03-14 18:11:47inglespcreate