From 922651412865f5f5b3d9b1bddfe6a5f9d3800838 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 23 Jan 2026 09:51:39 +0100 Subject: [PATCH] devel: handle multiprocessing regression in Python 3.14 https://github.com/python/cpython/issues/125714 --- devel/management/commands/archweb_inotify.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devel/management/commands/archweb_inotify.py b/devel/management/commands/archweb_inotify.py index 5b2333fd..6aae4903 100644 --- a/devel/management/commands/archweb_inotify.py +++ b/devel/management/commands/archweb_inotify.py @@ -78,7 +78,14 @@ def run(): if retry_count == self.retry_limit: logger.error('Unable to update database, exceeded maximum retries') - process = multiprocessing.Process(target=run) + # Python 3.14 changed the non-macOS POSIX default to forkserver + # but the code in this module does not work with it + # See https://github.com/python/cpython/issues/125714 + if multiprocessing.get_start_method() == 'forkserver': + _mp_context = multiprocessing.get_context(method='fork') + else: + _mp_context = multiprocessing.get_context() + process = _mp_context.Process(target=run) process.start() process.join() finally: