[issue6125] 2to3 mishandles "from module_name import" when module_name includes an underscore

2009-05-27 Thread R. David Murray

Changes by R. David Murray :


--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6125] 2to3 mishandles "from module_name import" when module_name includes an underscore

2009-05-27 Thread Mitchell Model

Mitchell Model  added the comment:

I apologize. This example evolved from my attempt to simplify things
from the actual code, and I oversimplified to the point where I misread
the 2to3 results. I thought there was a space after the period for the
modules without the underscores in their name but obviously there
wasn't. In the original results there were a lot of "from . import
modulename" and while experimenting with my examples I carelessly
confused the import of an entire module with the import of a name or *
from a module. Sorry for the bother. (There really was a problem with
the code that read "from .modulename import *", but of course it wasn't
that a space was missing after the period.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6125] 2to3 mishandles "from module_name import" when module_name includes an underscore

2009-05-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I'm sorry; I don't see why this is a bug. Could you elaborate, please?

--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6125] 2to3 mishandles "from module_name import" when module_name includes an underscore

2009-05-27 Thread Mitchell Model

New submission from Mitchell Model :

2to3 -f import l.py
--- l.py (original)
File p.py (the four modules exist in the same directory as p.py):

from mod_a import a
from modb import b
from mod_c import *
from modd import *


% 2to3 -f import p.py
+++ p.py (refactored)
@@ -1,5 +1,5 @@
-from mod_a import a
-from modb import b
-from mod_c import *
-from modd import *
+from .mod_a import a
+from .modb import b
+from .mod_c import *
+from .modd import *

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 88427
nosy: MLModel
severity: normal
status: open
title: 2to3 mishandles "from module_name import" when module_name includes an 
underscore
versions: Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com