Skip to content

Commit 65e5359

Browse files
committed
build: Fix running on Python 3.8
1 parent c004def commit 65e5359

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pman/_build.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import itertools
55
import os
66
import signal
7+
import sys
78
import time
89

910
# pylint: disable=redefined-builtin
@@ -187,7 +188,12 @@ def update_progress():
187188
os.kill(pid, signal.SIGKILL)
188189
except ProcessLookupError:
189190
pass
190-
pool.shutdown(wait=False, cancel_futures=True)
191+
shutdown_args = {
192+
'wait': False
193+
}
194+
if sys.version_info >= (3, 9):
195+
shutdown_args['cancel_futures'] = True
196+
pool.shutdown(**shutdown_args)
191197
raise exc
192198

193199
print(f':stopwatch: Build took [json.number]{time.perf_counter() - stime:.2f}s')

0 commit comments

Comments
 (0)