Skip to content

Handle ASDLSyntaxErrors gracefully #46977

Closed

Description

@thomaslee
mannequin
BPO 2725
Nosy @birkenfeld
Files
  • fix-asdl-errors.patch: A patch to correct the handling of ASDL syntax errors
  • 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 = 'https://github.com/birkenfeld'
    closed_at = <Date 2009-04-12.11:34:21.852>
    created_at = <Date 2008-04-30.12:08:02.227>
    labels = ['type-bug', 'build']
    title = 'Handle ASDLSyntaxErrors gracefully'
    updated_at = <Date 2009-04-12.11:34:21.851>
    user = 'https://bugs.python.org/thomaslee'

    bugs.python.org fields:

    activity = <Date 2009-04-12.11:34:21.851>
    actor = 'georg.brandl'
    assignee = 'georg.brandl'
    closed = True
    closed_date = <Date 2009-04-12.11:34:21.852>
    closer = 'georg.brandl'
    components = ['Build']
    creation = <Date 2008-04-30.12:08:02.227>
    creator = 'thomaslee'
    dependencies = []
    files = ['10144']
    hgrepos = []
    issue_num = 2725
    keywords = ['patch']
    message_count = 3.0
    messages = ['65999', '66020', '85893']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'thomaslee']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2725'
    versions = ['Python 3.0']

    Activity

    1. thomaslee commented on Apr 30, 2008

      thomasleemannequin
      MannequinAuthor

      The current code in Parser/asdl.py doesn't handle syntax errors very
      well. A minor problem to be sure, since the net result is the same (i.e.
      build fails), but the error message being displayed is entirely
      unhelpful to the developer.

      The attached patch will display the error message as was seemingly intended.

      This probably affects earlier versions (including python-trunk), but I
      haven't tested.

    2. added
      buildThe build process and cross-build
      type-bugAn unexpected behavior, bug, or error
      on Apr 30, 2008
    3. birkenfeld commented on Apr 30, 2008

      @birkenfeld
      Member

      Some comments:

      • Since you check for a false mod before calling check(), the check in
        check() will not be reached.
      • The error print seems to be already in trunk.
    4. self-assigned this
      on Apr 7, 2009
    5. birkenfeld commented on Apr 12, 2009

      @birkenfeld
      Member

      Committed a similar patch in r71505.

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions