diff --git a/srcpkgs/python3-timeout-decorator/patches/89-support_python_3.14.patch b/srcpkgs/python3-timeout-decorator/patches/89-support_python_3.14.patch new file mode 100644 index 00000000000000..a2957a41088977 --- /dev/null +++ b/srcpkgs/python3-timeout-decorator/patches/89-support_python_3.14.patch @@ -0,0 +1,31 @@ +From 55468a8a53dea55815dac5262661d038ace9a134 Mon Sep 17 00:00:00 2001 +From: Boyuan Yang +Date: Fri, 23 Jan 2026 09:27:41 -0500 +Subject: [PATCH] Use pre-python3.14 fork method for multiprocessing.Process + +This keeps the old behavior of multiprocessing module and avoids +testsuite failures when using Python 3.14 or later Python versions. + +This patch closes #88. +--- + timeout_decorator/timeout_decorator.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/timeout_decorator/timeout_decorator.py b/timeout_decorator/timeout_decorator.py +index 42b6686..2263170 100644 +--- a/timeout_decorator/timeout_decorator.py ++++ b/timeout_decorator/timeout_decorator.py +@@ -140,9 +140,10 @@ def __call__(self, *args, **kwargs): + self.__limit = kwargs.pop('timeout', self.__limit) + self.__queue = multiprocessing.Queue(1) + args = (self.__queue, self.__function) + args +- self.__process = multiprocessing.Process(target=_target, +- args=args, +- kwargs=kwargs) ++ ctx = multiprocessing.get_context('fork') ++ self.__process = ctx.Process(target=_target, ++ args=args, ++ kwargs=kwargs) + self.__process.daemon = True + self.__process.start() + if self.__limit is not None: diff --git a/srcpkgs/python3-timeout-decorator/template b/srcpkgs/python3-timeout-decorator/template new file mode 100644 index 00000000000000..3d852d8c02df46 --- /dev/null +++ b/srcpkgs/python3-timeout-decorator/template @@ -0,0 +1,20 @@ +# Template file for 'python3-timeout-decorator' +pkgname=python3-timeout-decorator +version=0.5.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Timeout decorator" +maintainer="Gonzalo TornarĂ­a " +license="MIT" +homepage="https://github.com/pnpnpn/timeout-decorator" +changelog="https://raw.githubusercontent.com/pnpnpn/timeout-decorator/refs/heads/master/CHANGES.rst" +# pypi sdist does not include tests +distfiles="https://github.com/pnpnpn/timeout-decorator/archive/refs/tags/${version}.tar.gz" +checksum=52a66174888dea9be4a225e683e86cedd286bd5b7def51dd57e86eadc2182c6e + +post_install() { + vlicense LICENSE.txt +}