Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in assertion in wsgiref.handlers.BaseHandler.start_response #70747

Closed
inglesp mannequin opened this issue Mar 14, 2016 · 5 comments
Closed

Error in assertion in wsgiref.handlers.BaseHandler.start_response #70747

inglesp mannequin opened this issue Mar 14, 2016 · 5 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@inglesp
Copy link
Mannequin

inglesp mannequin commented Mar 14, 2016

BPO 26560
Nosy @pjeby, @berkerpeksag
Files
  • issue26560.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-03-19.07:06:36.783>
    created_at = <Date 2016-03-14.18:11:47.530>
    labels = ['type-bug', 'library']
    title = 'Error in assertion in wsgiref.handlers.BaseHandler.start_response'
    updated_at = <Date 2016-03-19.07:06:36.782>
    user = 'https://bugs.python.org/inglesp'

    bugs.python.org fields:

    activity = <Date 2016-03-19.07:06:36.782>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-03-19.07:06:36.783>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2016-03-14.18:11:47.530>
    creator = 'inglesp'
    dependencies = []
    files = ['42188']
    hgrepos = []
    issue_num = 26560
    keywords = ['patch']
    message_count = 5.0
    messages = ['261773', '261843', '261921', '262023', '262024']
    nosy_count = 4.0
    nosy_names = ['pje', 'python-dev', 'inglesp', 'berker.peksag']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue26560'
    versions = ['Python 3.5', 'Python 3.6']

    @inglesp
    Copy link
    Mannequin Author

    inglesp mannequin commented Mar 14, 2016

    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"

    @inglesp inglesp mannequin added the stdlib Python modules in the Lib dir label Mar 14, 2016
    @SilentGhost SilentGhost mannequin added the type-bug An unexpected behavior, bug, or error label Mar 15, 2016
    @berkerpeksag
    Copy link
    Member

    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.

    @inglesp
    Copy link
    Mannequin Author

    inglesp mannequin commented Mar 17, 2016

    I found it while reading the source. Patch attached.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 19, 2016

    New changeset 60f01a8a71ef by Berker Peksag in branch '3.5':
    Issue bpo-26560: Avoid potential ValueError in BaseHandler.start_response
    https://hg.python.org/cpython/rev/60f01a8a71ef

    New changeset ae1d12f09392 by Berker Peksag in branch 'default':
    Issue bpo-26560: Avoid potential ValueError in BaseHandler.start_response
    https://hg.python.org/cpython/rev/ae1d12f09392

    @berkerpeksag
    Copy link
    Member

    Thanks for the patch, Peter! I've simplified the test a bit and commit it.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant