[New-bugs-announce] [issue28485] compileall.compile_dir(workers=<negative>) does not raise ValueError if multithreading disabled

Martin Panter report at bugs.python.org
Thu Oct 20 03:39:19 EDT 2016


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 <report at bugs.python.org>
<http://bugs.python.org/issue28485>
_______________________________________


More information about the New-bugs-announce mailing list