Skip to content

Commit

Permalink
build: Fix running on Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Moguri committed Oct 27, 2023
1 parent c004def commit 65e5359
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pman/_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import itertools
import os
import signal
import sys
import time

# pylint: disable=redefined-builtin
Expand Down Expand Up @@ -187,7 +188,12 @@ def update_progress():
os.kill(pid, signal.SIGKILL)
except ProcessLookupError:
pass
pool.shutdown(wait=False, cancel_futures=True)
shutdown_args = {
'wait': False
}
if sys.version_info >= (3, 9):
shutdown_args['cancel_futures'] = True
pool.shutdown(**shutdown_args)
raise exc

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

0 comments on commit 65e5359

Please sign in to comment.