This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 2to3 mangles from . import frobnitz
Type: Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, eric.araujo, holmbie, takluyver, terry.reedy
Priority: normal Keywords:

Created on 2012-01-01 12:03 by holmbie, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg150430 - (view) Author: Henrik Holmboe (holmbie) Date: 2012-01-01 12:03
It seems that 2to3 mangles::

 from . import frobnitz

into::

 from ... import frobnitz

This was noticed in the port of ipython to py3k. See https://github.com/ipython/ipython/issues/1197
msg150431 - (view) Author: Thomas Kluyver (takluyver) * Date: 2012-01-01 13:01
A couple of things to note:

- This was with the Python 3.1 implementation of 2to3 - the problem doesn't appear with the Python 3.2 version.
- The import statement in question was inside a method definition. I wonder if the extra two dots correspond to the class and method scopes.
msg150779 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-01-07 00:23
If this is fixed in 3.2, can this be closed?
msg150797 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-01-07 14:42
Thanks for the report, but 3.1 does not get bug fixes any more.  Maybe Benjamin would like to add a regression test for this, so I’m leaving the decision to close this report to him.
History
Date User Action Args
2022-04-11 14:57:25adminsetgithub: 57901
2012-01-07 15:40:51benjamin.petersonsetstatus: open -> closed
resolution: out of date
2012-01-07 14:42:30eric.araujosetnosy: + eric.araujo, benjamin.peterson
messages: + msg150797
2012-01-07 00:23:46terry.reedysetnosy: + terry.reedy
messages: + msg150779
2012-01-01 13:01:52takluyversetnosy: + takluyver
messages: + msg150431
2012-01-01 12:03:31holmbiecreate