New submission from Martin Panter: According to the documentation and tests, a negative value for the “workers” parameter to compileall.compile_dir() should trigger ValueError. But if Python is built with “configure --without-threads”, the parameter is not checked. So I propose a patch to fix the implementation.
====================================================================== FAIL: test_compile_workers_non_positive (test.test_compileall.CompileallTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/proj/python/cpython/Lib/test/test_compileall.py", line 172, in test_compile_workers_non_positive compileall.compile_dir(self.directory, workers=-1) AssertionError: ValueError not raised ---------- files: mt-compile.patch keywords: patch messages: 279018 nosy: Claudiu.Popa, martin.panter priority: normal severity: normal stage: patch review status: open title: compileall.compile_dir(workers=<negative>) does not raise ValueError if multithreading disabled type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45149/mt-compile.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28485> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com