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

parser module chokes on unusual characters #46533

Closed
dbinger mannequin opened this issue Mar 12, 2008 · 3 comments
Closed

parser module chokes on unusual characters #46533

dbinger mannequin opened this issue Mar 12, 2008 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@dbinger
Copy link
Mannequin

dbinger mannequin commented Mar 12, 2008

BPO 2280
Files
  • parsermodule.patch: patch with unit test and proposed change
  • 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 2008-07-12.18:38:47.914>
    created_at = <Date 2008-03-12.18:33:04.447>
    labels = ['type-bug', 'library']
    title = 'parser module chokes on unusual characters'
    updated_at = <Date 2008-07-12.18:38:47.876>
    user = 'https://bugs.python.org/dbinger'

    bugs.python.org fields:

    activity = <Date 2008-07-12.18:38:47.876>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-07-12.18:38:47.914>
    closer = 'benjamin.peterson'
    components = ['Library (Lib)']
    creation = <Date 2008-03-12.18:33:04.447>
    creator = 'dbinger'
    dependencies = []
    files = ['9662']
    hgrepos = []
    issue_num = 2280
    keywords = ['patch']
    message_count = 3.0
    messages = ['63482', '69564', '69578']
    nosy_count = 2.0
    nosy_names = ['dbinger', 'kfast']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2280'
    versions = ['Python 3.0']

    @dbinger
    Copy link
    Mannequin Author

    dbinger mannequin commented Mar 12, 2008

    This is with the current revision of py3k: 61353.

    parser.suite('"\u1234"') fails with a TypeError.

    Changing the argument format from "s" to "s#" works around this problem.

    I added a unit test for this. After fixing the "s#", another
    bug is exposed by the same test: a string literal containing
    \u1234 is mangled by sequence2st().

    The last section of the patch seems to correct the second bug.

    (I think getarg.c's handling of "s" has a problem
    handling a unicode string containing a character whose
    encoding is not 1 byte. It has a test for null bytes
    at the end that does not work correctly.)

    @dbinger dbinger mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Mar 12, 2008
    @kfast
    Copy link
    Mannequin

    kfast mannequin commented Jul 11, 2008

    I get no problem in 3.0b1. Should this be closed?

    >>> parser.suite('"\u1234"')
    <parser.st object at 0xb7ceebd0>

    @dbinger
    Copy link
    Mannequin Author

    dbinger mannequin commented Jul 12, 2008

    On Jul 11, 2008, at 5:35 PM, Kuba Fast wrote:

    I get no problem in 3.0b1. Should this be closed?

    I think so. It looks like this has been fixed.

    Thanks.

    @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