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

compile traceback must include filename #36699

Closed
theller opened this issue Jun 5, 2002 · 8 comments
Closed

compile traceback must include filename #36699

theller opened this issue Jun 5, 2002 · 8 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@theller
Copy link

theller commented Jun 5, 2002

BPO 564931
Nosy @theller
Files
  • patch.diff: Patch including test case
  • compile-patch2.diff: Patch without PyParser_ParseStringFilename()
  • 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/theller'
    closed_at = <Date 2002-07-09.09:25:23.000>
    created_at = <Date 2002-06-05.17:09:47.000>
    labels = ['interpreter-core']
    title = 'compile traceback must include filename'
    updated_at = <Date 2002-07-09.09:25:23.000>
    user = 'https://github.com/theller'

    bugs.python.org fields:

    activity = <Date 2002-07-09.09:25:23.000>
    actor = 'theller'
    assignee = 'theller'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2002-06-05.17:09:47.000>
    creator = 'theller'
    dependencies = []
    files = ['504', '505']
    hgrepos = []
    issue_num = 564931
    keywords = []
    message_count = 8.0
    messages = ['11060', '11061', '11062', '11063', '11064', '11065', '11066', '11067']
    nosy_count = 2.0
    nosy_names = ['jhylton', 'theller']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue564931'
    versions = []

    @theller
    Copy link
    Author

    theller commented Jun 5, 2002

    > >>> compile("1+*3", "myfile.py", "exec")
    > Traceback (most recent call last):
    >   File "<stdin>", line 1, in ?
    >   File "<string>", line 1
    >     1+*3
    >       ^
    > SyntaxError: invalid syntax
    > >>>
    > 
    > Shouldn't it print "myfile.py" instead of "<string>"?

    Yes.

    --Guido van Rossum

    @theller theller closed this as completed Jun 5, 2002
    @theller theller self-assigned this Jun 5, 2002
    @theller theller added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jun 5, 2002
    @theller theller closed this as completed Jun 5, 2002
    @theller theller self-assigned this Jun 5, 2002
    @theller theller added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jun 5, 2002
    @theller
    Copy link
    Author

    theller commented Jun 5, 2002

    Logged In: YES
    user_id=11105

    To avoid any confusion: I (Thomas Heller) copied the 'Initial
    Comment' from a message posted to python-dev by Guido.

    @theller
    Copy link
    Author

    theller commented Jul 4, 2002

    Logged In: YES
    user_id=11105

    I'm ready to work further on the patch. Comments appreciated!

    @theller
    Copy link
    Author

    theller commented Jul 4, 2002

    Logged In: YES
    user_id=11105

    Uploaded patch. I had to create quite some new functions to
    pass the filename through all these calls. Maybe some
    functions could be replaced by macros?

    @jhylton
    Copy link
    Mannequin

    jhylton mannequin commented Jul 4, 2002

    Logged In: YES
    user_id=31392

    It is a maze of twisty little passages that all look alike
    <wink>. I think there is no need for
    PyParser_ParseStringFilename(). Replace each use of it
    with a call to the Flags version that passes 0 for flags.

    We should redo the entire API to have simpler names
    and avoid all the flags & ex stuff in the names. Then we
    could write a compat layer that provides all the old
    names and calls the new functions. But you can make
    that a separate patch <wink>.

    @theller
    Copy link
    Author

    theller commented Jul 5, 2002

    Logged In: YES
    user_id=11105

    Ok, I created a second patch according to your suggestions:
    compile-patch2.diff.

    @jhylton
    Copy link
    Mannequin

    jhylton mannequin commented Jul 5, 2002

    Logged In: YES
    user_id=31392

    #2 Looks good. Check it in but:

    1. don't forget the test case from Support "bpo-" in Misc/NEWS #1
    2. be ure to wrap long lines

    @theller
    Copy link
    Author

    theller commented Jul 9, 2002

    Logged In: YES
    user_id=11105

    Checked in and closed.

    @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