[Git][debian-gis-team/mapproxy][master] Use multiprocessing.get_context() instead of multiprocessing.set_start_method().
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Thu Dec 18 07:03:54 GMT 2025
Bas Couwenberg pushed to branch master at Debian GIS Project / mapproxy
Commits:
c589a732 by Bas Couwenberg at 2025-12-18T08:03:42+01:00
Use multiprocessing.get_context() instead of multiprocessing.set_start_method().
- - - - -
1 changed file:
- debian/patches/python3.14.patch
Changes:
=====================================
debian/patches/python3.14.patch
=====================================
@@ -1,32 +1,47 @@
Description: Explicitly use 'fork' instead of 'forkserver'.
Fixes FTBFS with python3.14.
Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: https://github.com/mapproxy/mapproxy/pull/1355
-Applied-Upstream: https://github.com/mapproxy/mapproxy/commit/91f89459f1397b3e87024a835c8d47f7be29d17d
+Forwarded: https://github.com/mapproxy/mapproxy/pull/1356
---- a/mapproxy/test/conftest.py
-+++ b/mapproxy/test/conftest.py
-@@ -1,3 +1,8 @@
-+import multiprocessing
+--- a/mapproxy/test/unit/test_seed_cachelock.py
++++ b/mapproxy/test/unit/test_seed_cachelock.py
+@@ -36,7 +36,9 @@ class TestCacheLock(object):
+ assert True
+
+ def test_locked_by_process_no_block(self, lock_file):
+- proc_is_locked = multiprocessing.Event()
++ ctx = multiprocessing.get_context('fork')
+
-+import pytest
++ proc_is_locked = ctx.Event()
+
+ def lock():
+ locker = CacheLocker(lock_file)
+@@ -44,7 +46,7 @@ class TestCacheLock(object):
+ proc_is_locked.set()
+ time.sleep(10)
+
+- p = multiprocessing.Process(target=lock)
++ p = ctx.Process(target=lock)
+ p.start()
+ # wait for process to start
+ proc_is_locked.wait()
+@@ -66,7 +68,9 @@ class TestCacheLock(object):
+ p.join()
+
+ def test_locked_by_process_waiting(self, lock_file):
+- proc_is_locked = multiprocessing.Event()
++ ctx = multiprocessing.get_context('fork')
+
-+
- def pytest_configure(config):
- import sys
- sys._called_from_pytest = True
-@@ -6,3 +11,14 @@ def pytest_configure(config):
- def pytest_unconfigure(config):
- import sys
- del sys._called_from_pytest
-+
-+
-+ at pytest.fixture(scope="session", autouse=True)
-+def use_multiprocessing_fork_on_linux():
-+ import sys
-+ if sys.platform != "linux":
-+ # Windows and macOS use 'spawn' by default
-+ return
-+
-+ # 'forkserver' is default since Python 3.14, but can't pickle everything.
-+ multiprocessing.set_start_method("fork")
++ proc_is_locked = ctx.Event()
+
+ def lock():
+ locker = CacheLocker(lock_file)
+@@ -74,7 +78,7 @@ class TestCacheLock(object):
+ proc_is_locked.set()
+ time.sleep(.1)
+
+- p = multiprocessing.Process(target=lock)
++ p = ctx.Process(target=lock)
+ start_time = time.time()
+ p.start()
+ # wait for process to start
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/commit/c589a732f1fad95bb3847af188cbb83b4af47494
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/commit/c589a732f1fad95bb3847af188cbb83b4af47494
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20251218/f6b46d87/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list