Issue 9130: Parser module fails on short relative imports (original) (raw)

Created on 2010-06-30 19:31 by mark.dickinson, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)

msg109006 - (view)

Author: Mark Dickinson (mark.dickinson) * (Python committer)

Date: 2010-06-30 19:31

Python 2.7rc2+ (trunk:82399M, Jun 30 2010, 17:10:13) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import parser [35303 refs] parser.sequence2st(parser.suite("from . import me").totuple()) Traceback (most recent call last): File "", line 1, in parser.ParserError: VALIDATION FAILURE: report this to the maintainer! [35341 refs]

Patch attached.

msg109007 - (view)

Author: Mark Dickinson (mark.dickinson) * (Python committer)

Date: 2010-06-30 19:35

With this patch, and the one in issue 9128, the parser module roundtrips correctly on all Lib/.py and all Lib/test/.py files (except for Lib/test/bad*.py). Tested by doing:

./python.exe Demo/parser/test_parser.py Lib/*.py

and

./python.exe Demo/parser/test_parser.py Lib/test/*.py

(the latter after deleting the Lib/test/bad*.py files)

msg109252 - (view)

Author: Mark Dickinson (mark.dickinson) * (Python committer)

Date: 2010-07-04 18:19

Fixed in revisions r82543, r82546, r82552, r82553, r82554.

Leaving open because I'm suspicious that the parser module isn't handling relative imports with more than three dots correctly in py3k (since ... gets parsed as an ellipsis token).

msg109253 - (view)

Author: Mark Dickinson (mark.dickinson) * (Python committer)

Date: 2010-07-04 18:40

Ellipsis token validation fixed in r82555 (py3k), r82556 (release31-maint).

History

Date

User

Action

Args

2022-04-11 14:57:03

admin

set

github: 53376

2010-07-04 18:40:56

mark.dickinson

set

status: open -> closed
resolution: fixed
messages: +

stage: commit review -> resolved

2010-07-04 18:19:39

mark.dickinson

set

messages: +

2010-06-30 19:35:03

mark.dickinson

set

messages: +

2010-06-30 19:31:05

mark.dickinson

create