[3.8] bpo-39769: Fix compileall ddir for subpkgs. (GH-18676)#18718
Merged
gpshead merged 1 commit intopython:3.8from Mar 1, 2020
Merged
[3.8] bpo-39769: Fix compileall ddir for subpkgs. (GH-18676)#18718gpshead merged 1 commit intopython:3.8from
gpshead merged 1 commit intopython:3.8from
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.
|
Contributor
|
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Contributor
|
Sorry, @gpshead, I could not cleanly backport this to |
gpshead
added a commit
to gpshead/cpython
that referenced
this pull request
Mar 1, 2020
…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. |
gpshead
added a commit
that referenced
this pull request
Mar 1, 2020
… (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]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix compileall.compile_dir() ddir= behavior on sub-packages.
Fixes compileall.compile_dir's ddir parameter and compileall command
line flag
-dto 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 -> dfilecomputations but discarded the results instead of sending them
to
compile_file(). This fixes that.https://bugs.python.org/issue39769