simohe 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 is not built yet
simohe 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 the failing conversion
Changes by simohe :
--
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
<http://bugs.python.org/i
Changes by simohe :
--
components: +2to3 (2.x to 3.x conversion tool)
___
Python tracker
<http://bugs.python.org/issue13316>
___
___
Python-bugs-list mailin
New submission from simohe :
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: 2to3 (2.x to 3.x
New submission from simohe :
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 it is
newly
New submission from simohe :
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:
-import