summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2020-03-01 18:42:56 (GMT)
committerGitHub <noreply@github.com>2020-03-01 18:42:56 (GMT)
commitce720d3e0674d6ac6f1b950c20a89be4cfde7853 (patch)
tree54dba81e8458c72a3e65886d69d688c9ed07b044 /Misc
parentfec6681f7ae3e8867bd0446aa993a0b5f23045f9 (diff)
downloadcpython-ce720d3e0674d6ac6f1b950c20a89be4cfde7853.zip
cpython-ce720d3e0674d6ac6f1b950c20a89be4cfde7853.tar.gz
cpython-ce720d3e0674d6ac6f1b950c20a89be4cfde7853.tar.bz2
bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) (GH-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 02673352b5db6ca4d3dc804965facbedfe66425d, 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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rst b/Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rst
new file mode 100644
index 0000000..9b564bd
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rst
@@ -0,0 +1,4 @@
+The :func:`compileall.compile_dir` function's *ddir* parameter and the
+compileall command line flag `-d` 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.