-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
[3.8] bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) #18718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix compileall.compile_dir() ddir= behavior on sub-packages. Fixes compileall.compile_dir's ddir parameter and compileall command line flag `-d` to no longer write the wrong pathname to the generated pyc file for submodules beneath the root of the directory tree being compiled. This fixes a regression introduced with Python 3.5. Tests backported from GH 0267335, the implementation is different due to intervening code changes. But still quiet simple. The refactoring to add parallel execution kept the ddir -> dfile computations but discarded the results instead of sending them to compile_file(). This fixes that.
Codecov Report
@@ Coverage Diff @@
## 3.8 #18718 +/- ##
==========================================
+ Coverage 82.08% 82.10% +0.01%
==========================================
Files 1919 1918 -1
Lines 582229 576908 -5321
Branches 43736 43739 +3
==========================================
- Hits 477944 473682 -4262
+ Misses 94716 93655 -1061
- Partials 9569 9571 +2
Continue to review full report at Codecov.
|
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Sorry, @gpshead, I could not cleanly backport this to |
…ythonGH-18718) Fix compileall.compile_dir() ddir= behavior on sub-packages. Fixes compileall.compile_dir's ddir parameter and compileall command line flag `-d` to no longer write the wrong pathname to the generated pyc file for submodules beneath the root of the directory tree being compiled. This fixes a regression introduced with Python 3.5. Tests backported from GH 0267335, the implementation is different due to intervening code changes. But still quiet simple. Why was the bug ever introduced? The refactoring to add parallel execution kept the ddir -> dfile computations but discarded the results instead of sending them to compile_file(). This fixes that. Lack of tests meant this went unnoticed.. (cherry picked from commit ce720d3) Co-authored-by: Gregory P. Smith <greg@krypto.org>
GH-18725 is a backport of this pull request to the 3.7 branch. |
… (GH-18725) Fix compileall.compile_dir() ddir= behavior on sub-packages. Fixes compileall.compile_dir's ddir parameter and compileall command line flag `-d` to no longer write the wrong pathname to the generated pyc file for submodules beneath the root of the directory tree being compiled. This fixes a regression introduced with Python 3.5. Tests backported from GH 0267335, the implementation is different due to intervening code changes. But still quiet simple. Why was the bug ever introduced? The refactoring to add parallel execution kept the ddir -> dfile computations but discarded the results instead of sending them to compile_file(). This fixes that. Lack of tests meant this went unnoticed.. (cherry picked from commit ce720d3) Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
Fix compileall.compile_dir() ddir= behavior on sub-packages.
Fixes compileall.compile_dir's ddir parameter and compileall command
line flag
-d
to no longer write the wrong pathname to the generatedpyc file for submodules beneath the root of the directory tree being
compiled. This fixes a regression introduced with Python 3.5.
Tests backported from GH #18676 's 0267335,
the implementation is different due to intervening code changes. But still
quiet simple. The refactoring to add parallel execution kept the
ddir -> dfile
computations but discarded the results instead of sending them
to
compile_file()
. This fixes that.https://bugs.python.org/issue39769