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

Handle ASDLSyntaxErrors gracefully #46977

Closed
thomaslee mannequin opened this issue Apr 30, 2008 · 3 comments
Closed

Handle ASDLSyntaxErrors gracefully #46977

thomaslee mannequin opened this issue Apr 30, 2008 · 3 comments
Assignees
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@thomaslee
Copy link
Mannequin

thomaslee mannequin commented Apr 30, 2008

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']

    @thomaslee
    Copy link
    Mannequin Author

    thomaslee mannequin commented Apr 30, 2008

    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.

    @thomaslee thomaslee mannequin added build The build process and cross-build type-bug An unexpected behavior, bug, or error labels Apr 30, 2008
    @birkenfeld
    Copy link
    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.

    @birkenfeld birkenfeld self-assigned this Apr 7, 2009
    @birkenfeld
    Copy link
    Member

    Committed a similar patch in r71505.

    @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
    build The build process and cross-build type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant