From 806d126d5f0c657ea53cf7acc6941b77960dd0a3 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Thu, 5 May 2022 00:16:58 +0200 Subject: BUG: Ensure compile errors are raised correclty This has been bugging me for a bit. The concurrent.futures Executor requires checking the result for the error to be raised. That makes sense, but just means we need to consume the result explicitly here to ensure we know about compile errors. Otherwise, compile errors just pass silently (which is very confusing if the old object files are still around and the tests run based on the old version). --- numpy/distutils/ccompiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy') diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py index df268d1de..8697fae62 100644 --- a/numpy/distutils/ccompiler.py +++ b/numpy/distutils/ccompiler.py @@ -357,7 +357,8 @@ def CCompiler_compile(self, sources, output_dir=None, macros=None, # build parallel from concurrent.futures import ThreadPoolExecutor with ThreadPoolExecutor(jobs) as pool: - pool.map(single_compile, build_items) + res = pool.map(single_compile, build_items) + list(res) # access result to raise errors else: # build serial for o in build_items: -- cgit v1.2.1