[issue24324] Remove -Wunreachable-code flag
Changes by Jake Garver : Added file: http://bugs.python.org/file41663/Python351-no-unreachable-check.diff ___ Python tracker <http://bugs.python.org/issue24324> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24903] Do not verify destdir argument to compileall
Jake Garver added the comment: Updated patch. Same as before, but updates tests. Sorry I went MIA on this issue. -- Added file: http://bugs.python.org/file40440/python34_compileall_ddir_2.diff ___ Python tracker <http://bugs.python.org/issue24903> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24903] Do not verify destdir argument to compileall
Jake Garver added the comment: I agree. I couldn't find a use for the check, so I removed it entirely in the provided patch. I'm running that way now with success, but of course I'm covering just one use case. Digging back a bit further, the isdir() check came in here: https://github.com/python/cpython/commit/dc6a4c158f8a6175c7d0d5d1a61c24c06767ef22 And even further, near the beginning of time, we find the original check: https://github.com/python/cpython/commit/995d45ede2432306a2a0306ce29cea4013bc2850 Speculation: In the context of the original code, "directory" in the error message makes more sense and that word should have been dropped when single file support was added. However, given that we loop over the args, I don't see how -d was limited to a single arg. With my patch in place, I tested compileall.py with multiple args and the -d. It works as expected and contains the -d path. python -m compileall -d /runtime/path foo.py bar.py foobar.py I'm happy to craft a new patch. How would you like it? -- versions: -Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue24903> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24903] Do not verify destdir argument to compileall
Jake Garver added the comment: Thanks for the response and sorry for the mis-read. In 2.7, I did something like: python -m compileall -d /runtime/path foo.py But in 3.4, I get: -d destdir requires exactly one directory argument I'm doing this during a build. Then we package the pyc file into a runtime image. Let me know if I can further help (or confuse). -- ___ Python tracker <http://bugs.python.org/issue24903> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24903] Do not verify destdir argument to compileall
New submission from Jake Garver: In compileall.py's main, we verify that the provided destdir (-d) exists at build time. But destdir will commonly be used to override the build time path with a runtime path. That runtime path will usually not exist at build time. Note that this logic was changed when compileall.py was migrated to argparse. I think the old logic accidentally avoided the isdir() check at build time. https://github.com/python/cpython/commit/11e99b06bda2a23478fcec40df8c18edc8a06668 With the attached patch, behavior is made consistent with python 2.7, intended or otherwise. -- components: Library (Lib) files: python34_compileall_ddir.diff keywords: patch messages: 248900 nosy: jgarver priority: normal severity: normal status: open title: Do not verify destdir argument to compileall type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file40216/python34_compileall_ddir.diff ___ Python tracker <http://bugs.python.org/issue24903> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com