Control: tag -1 upstream fixed-upstream patch Although there are still some issues with 3.8 upstream, this one is actually fixed. Here's the patch.
Ben. -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom
From: Chandan Singh <csing...@bloomberg.net> Date: Mon, 21 Oct 2019 14:38:07 +0100 Subject: _scheduler/scheduler.py: Enforce SafeChildWatcher Origin: https://gitlab.com/BuildStream/buildstream/-/commit/0eca9e6a4a01d1094987773bce58d9d3e501f1e8 Bug-Debian: https://bugs.debian.org/962197 In Python 3.8, `ThreadedChildWatcher` is the default watcher that causes issues with our scheduler. Enforce use of `SafeChildWatcher`. [benh: Backported to 1.4.1: adjust filename] --- buildstream/_scheduler/scheduler.py | 6 ++++++ 1 file changed, 6 insertions(+) --- a/buildstream/_scheduler/scheduler.py +++ b/buildstream/_scheduler/scheduler.py @@ -137,6 +137,12 @@ class Scheduler(): # Hold on to the queues to process self.queues = queues + # NOTE: Enforce use of `SafeChildWatcher` as we generally don't want + # background threads. + # In Python 3.8+, `ThreadedChildWatcher` is the default watcher, and + # not `SafeChildWatcher`. + asyncio.set_child_watcher(asyncio.SafeChildWatcher()) + # Ensure that we have a fresh new event loop, in case we want # to run another test in this thread. self.loop = asyncio.new_event_loop()