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

Py_SequenceFast can mask errors #39773

Closed
glchapman mannequin opened this issue Jan 6, 2004 · 2 comments
Closed

Py_SequenceFast can mask errors #39773

glchapman mannequin opened this issue Jan 6, 2004 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@glchapman
Copy link
Mannequin

glchapman mannequin commented Jan 6, 2004

BPO 871704
Nosy @rhettinger
Files
  • abstract.c.diff
  • 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 2004-01-11.23:27:57.000>
    created_at = <Date 2004-01-06.14:53:38.000>
    labels = ['interpreter-core']
    title = 'Py_SequenceFast can mask errors'
    updated_at = <Date 2004-01-11.23:27:57.000>
    user = 'https://bugs.python.org/glchapman'

    bugs.python.org fields:

    activity = <Date 2004-01-11.23:27:57.000>
    actor = 'rhettinger'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2004-01-06.14:53:38.000>
    creator = 'glchapman'
    dependencies = []
    files = ['1157']
    hgrepos = []
    issue_num = 871704
    keywords = []
    message_count = 2.0
    messages = ['19562', '19563']
    nosy_count = 2.0
    nosy_names = ['rhettinger', 'glchapman']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue871704'
    versions = ['Python 2.4']

    @glchapman
    Copy link
    Mannequin Author

    glchapman mannequin commented Jan 6, 2004

    I just ran into a case where a generator passed to
    list.extend was raising the error "argument to list.extend
    () must be iterable". It turned out that code inside the
    generator was causing a TypeError. This error was then
    caught by PySequence_Fast, which remapped it to its
    error string parameter.

    Attached is a modified PySequence_Fast which should
    avoid this kind of masking.

    @glchapman glchapman mannequin closed this as completed Jan 6, 2004
    @glchapman glchapman mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 6, 2004
    @rhettinger
    Copy link
    Contributor

    Logged In: YES
    user_id=80475

    I'm accepting this for Py2.4 but doubt that it should be
    backported to Py2.3. Since only the message changes, no
    ones code will live or die by this one.

    Thanks for the patch.

    See Objects/abstract.c 2.123.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant