Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 55468a8a53dea55815dac5262661d038ace9a134 Mon Sep 17 00:00:00 2001
From: Boyuan Yang <byang@debian.org>
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:
20 changes: 20 additions & 0 deletions srcpkgs/python3-timeout-decorator/template
Original file line number Diff line number Diff line change
@@ -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 <tornaria@cmat.edu.uy>"
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
}