[issue13316] build_py_2to3 does not convert when there was an error in the last run

2011-11-03 Thread simohe
simohe sim...@besonet.ch added the comment: It does stop with an error message. But when I reinvoke the command, converting is skipped (because the file is already copied). No error message is raised and the build continues with the remaining jobs (build_*). It should reexecute at least

[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-03 Thread simohe
simohe sim...@besonet.ch added the comment: fix_imports rewrites the import statements to local or global. When a python module loads a local extension module, this import statement should be converted to a local import (from . import extensionmodule). But when the extension module

[issue13316] build_py_2to3 does not execute when there was an error before

2011-11-01 Thread simohe
New submission from simohe sim...@besonet.ch: When I use build_py_2to3 and there is an error while converting a file with 2to3, convert is skipped on the next run. The reason is that build_module in build_py_2to3 (in module distutils.command.build_py) only appends the file for converting when

[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-01 Thread simohe
New submission from simohe sim...@besonet.ch: We need build_ext before build_py. Otherwise, when 2to3 is called (in build_py), it will not find ext modules, thinking that those modules are global and, consequently, making a mess, now that all module imports are global. -- components

[issue13316] build_py_2to3 does not execute when there was an error before

2011-11-01 Thread simohe
Changes by simohe sim...@besonet.ch: -- components: +2to3 (2.x to 3.x conversion tool) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13316

[issue13316] build_py_2to3 does not convert when there was an error in the last run

2011-11-01 Thread simohe
Changes by simohe sim...@besonet.ch: -- title: build_py_2to3 does not execute when there was an error before - build_py_2to3 does not convert when there was an error in the last run type: behavior - ___ Python tracker rep...@bugs.python.org http

[issue12864] 2to3 creates illegal code on import a.b inside a package

2011-08-30 Thread simohe
New submission from simohe sim...@besonet.ch: When the current module is in a package and imports submodules, the following lines are converted to illegal code. -import sub.subsub +from . import sub.subsub -import sub, sub.subsub, sub2 +from . import sub, sub.subsub, sub2 A valid alternative