#244 pep 328 relative imports can't be parsed

v3.0
closed-fixed
5
2008-01-29
2008-01-29
mdbeachy
No

PEP 328 relative imports of the form

from . import foo

give errors of the form

| Error: Error during parsing: invalid syntax (/home/beachy/tmp/
| epydoc-3.0beta1/foo/foo.py, line 1) -- Bad name

Attached is a patch that fixes the problem for at least the simple case of a single dot. It hasn't been tested for something like 'from ..bar import foo' however.

Discussion

  • mdbeachy

    mdbeachy - 2008-01-29

    proposed patch

     
  • Edward Loper

    Edward Loper - 2008-01-29

    Logged In: YES
    user_id=195958
    Originator: NO

    Fixed (by Danielle) in svn revision 1580.

     
  • Edward Loper

    Edward Loper - 2008-01-29
    • labels: 469724 --> source parsing
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks