summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2015-12-05 04:04:37 (GMT)
committerR David Murray <rdmurray@bitdance.com>2015-12-05 04:04:37 (GMT)
commit939614c48c3b0b5adeb408294a032118411ab987 (patch)
treeaa7d23dfa311445c3d88fec4b6dda1482f1f1693
parent6a77c2d978277fc9597baaa6ff612666332bfdca (diff)
parentced699b4c7e79e0a53e3ca7f2d789b761d4a9e76 (diff)
downloadcpython-939614c48c3b0b5adeb408294a032118411ab987.zip
cpython-939614c48c3b0b5adeb408294a032118411ab987.tar.gz
cpython-939614c48c3b0b5adeb408294a032118411ab987.tar.bz2
Merge: #24903: Remove misleading error message to fix regression.
-rw-r--r--Lib/compileall.py3
-rw-r--r--Lib/test/test_compileall.py8
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS4
4 files changed, 5 insertions, 11 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py
index 64c0a9a..0cc0c1d 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -238,9 +238,6 @@ def main():
args = parser.parse_args()
compile_dests = args.compile_dest
- if (args.ddir and (len(compile_dests) != 1
- or not os.path.isdir(compile_dests[0]))):
- parser.exit('-d destdir requires exactly one directory argument')
if args.rx:
import re
args.rx = re.compile(args.rx)
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py
index ef2b669..2ce8a61 100644
--- a/Lib/test/test_compileall.py
+++ b/Lib/test/test_compileall.py
@@ -398,14 +398,6 @@ class CommandLineTests(unittest.TestCase):
self.assertCompiled(init2fn)
self.assertCompiled(bar2fn)
- def test_d_takes_exactly_one_dir(self):
- rc, out, err = self.assertRunNotOK('-d', 'foo')
- self.assertEqual(out, b'')
- self.assertRegex(err, b'-d')
- rc, out, err = self.assertRunNotOK('-d', 'foo', 'bar')
- self.assertEqual(out, b'')
- self.assertRegex(err, b'-d')
-
def test_d_compile_error(self):
script_helper.make_script(self.pkgdir, 'crunchyfrog', 'bad(syntax')
rc, out, err = self.assertRunNotOK('-q', '-d', 'dinsdale', self.pkgdir)
diff --git a/Misc/ACKS b/Misc/ACKS
index 7ecb31a..cd715de 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -477,6 +477,7 @@ Raymund Galvin
Nitin Ganatra
Fred Gansevles
Lars Marius Garshol
+Jake Garver
Dan Gass
Andrew Gaul
Matthieu Gautier
diff --git a/Misc/NEWS b/Misc/NEWS
index 4cca7a2..fc2797c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -22,6 +22,10 @@ Core and Builtins
Library
-------
+- Issue #24903: Fix regression in number of arguments compileall accepts when
+ '-d' is specified. The check on the number of arguments has been dropped
+ completely as it never worked correctly anyway.
+
- Issue #25764: In the subprocess module, preserve any exception caused by
fork() failure when preexec_fn is used.