New submission from Mitchell Model <m...@acm.org>:

2to3 changes "import m" to "from . import m" but it doesn't change
"import sub.s".

The directory q.py is in has a file m.py and a subdirectory sub.
The subdirectory sub has a file s.py.
File q.py contains two lines:

import m
import sub.s

% 2to3 -f q.py
--- q.py (original)
+++ q.py (refactored)
@@ -1,2 +1,2 @@
-import m
+from . import m
 import sub.s
RefactoringTool: Files that need to be modified:
RefactoringTool: q.py

----------
messages: 88444
nosy: MLModel
severity: normal
status: open
title: 2to3 does not convert imports of the form 'import sub.mod' to relative 
import

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6129>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to