-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
bpo-39769: Fix compileall ddir for subpkgs. #18676
Conversation
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.
while i marked this as needing a backport... it'll never be automatic. This fix was easy to make as I could use the new features introduced by #16012 to implement it. I'm not sure it is worth it, nobody noticed for four releases. Easiest to just let 3.9 get this. |
Codecov Report
@@ Coverage Diff @@
## master #18676 +/- ##
=========================================
Coverage 82.12% 82.13%
=========================================
Files 1956 1955 -1
Lines 589830 584531 -5299
Branches 44477 44481 +4
=========================================
- Hits 484427 480096 -4331
+ Misses 95752 94790 -962
+ Partials 9651 9645 -6
Continue to review full report at Codecov.
|
When you're done making the requested changes, leave the comment: |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @Yhg1s: please review the changes made to this pull request. |
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Sorry @gpshead, I had trouble checking out the |
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.
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.
…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 <[email protected]>
… (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 <[email protected]> [Google]
|
Fixes
compileall.compile_dir()
'sddir
parameter andcompileall
commandline 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.
https://bugs.python.org/issue39769