[issue21770] Module not callable in script_helper.py
Terry J. Reedy
report at bugs.python.org
Sat Jun 21 00:06:02 CEST 2014
Terry J. Reedy added the comment:
It took me a few minutes to realized that you patched test_cmd_line_script.py to get the failure. When I did that, both
test_module_in_package_in_zipfile and
test_module_in_subpackage_in_zipfile
failed with TypeError in the call to _make_test_zip_pkg.
After reverting test_cmd_line_script.py, importing your patch, and re-patching test_cmd_line_script.py, both methods still fail, but only later in the _check_script call. This means that the earlier call succeeded.
2.7 did not need patching because in the same spot, script_helper.make_zip_pkg calls the following dubious function instead of directly calling py_compile(.compile). Someone should have copied the first line of the body instead re-typing it.
def compile_script(script_name):
py_compile.compile(script_name, doraise=True)
if __debug__:
compiled_name = script_name + 'c'
else:
compiled_name = script_name + 'o'
return compiled_name
----------
assignee: -> terry.reedy
nosy: +terry.reedy
resolution: -> fixed
stage: -> resolved
status: open -> closed
type: -> behavior
versions: +Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21770>
_______________________________________
More information about the Python-bugs-list
mailing list