Issue 13316: build_py_2to3 does not convert when there was an error in the last run (original) (raw)

Created on 2011-11-01 21:22 by simohe, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg146807 - (view) Author: simohe (simohe) Date: 2011-11-01 21:22
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 copied. Something safer should be used. The simplest possibility is to always convert.
msg146945 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-11-03 16:36
> When I use build_py_2to3 and there is an error while converting a > file with 2to3, convert is skipped on the next run. I think build should stop with an error message if 2to3 fails. Do you agree?
msg146975 - (view) Author: simohe (simohe) Date: 2011-11-03 20:28
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 and those after them. (And when the error still is there, it should reraise it.)
msg148047 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-11-21 14:41
> It does stop with an error message. But when I reinvoke the command, converting is > skipped (because the file is already copied). Then that’s the bug: In case of error, the file in the build dir should be removed. By the way, I think this was not reported before because people probably edit the file when there is a 2to3 error, and so it is detected as modified and then copied again.
msg379329 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2020-10-22 19:46
Closing this. It was not fixed when it would have been useful, and people mostly use other tools that distutils for packaging and 2to3 for transition.
History
Date User Action Args
2022-04-11 14:57:23 admin set github: 57525
2020-10-22 19:46:10 eric.araujo set status: open -> closedresolution: wont fixmessages: + stage: test needed -> resolved
2011-11-21 14:41:24 eric.araujo set assignee: tarek -> eric.araujotype: behaviormessages: +
2011-11-05 22:42:41 Arfrever set nosy: + Arfrever
2011-11-03 20:28:02 simohe set messages: +
2011-11-03 16:36:50 eric.araujo set assignee: tarekcomponents: + Distutils, Distutils2, - Build, 2to3 (2.x to 3.x conversion tool)versions: + 3rd party, Python 3.2, Python 3.3, - Python 3.1nosy: + eric.araujo, alexis, tarekmessages: + stage: test needed
2011-11-01 21:34:37 simohe set type: behavior -> (no value)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
2011-11-01 21:32:45 simohe set components: + 2to3 (2.x to 3.x conversion tool)
2011-11-01 21:22:19 simohe create