From 69adabd3e96ef43fdcbe5d8cadf0b09141136451102dda89630686e79e8bf473 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 22 Mar 2021 10:46:15 +0000 Subject: [PATCH] Accepting request 880178 from home:bnavigator:branches:devel:languages:python - Add billiard-pr310-py39-fork_exec.patch -- gh#celery/billiard#310 OBS-URL: https://build.opensuse.org/request/show/880178 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-billiard?expand=0&rev=44 --- billiard-pr310-py39-fork_exec.patch | 33 +++++++++++++++++++++++++++++ python-billiard.changes | 5 +++++ python-billiard.spec | 6 ++++-- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 billiard-pr310-py39-fork_exec.patch diff --git a/billiard-pr310-py39-fork_exec.patch b/billiard-pr310-py39-fork_exec.patch new file mode 100644 index 0000000..d6611eb --- /dev/null +++ b/billiard-pr310-py39-fork_exec.patch @@ -0,0 +1,33 @@ +From a508ebafadcfe2e25554b029593f3e66d01ede6c Mon Sep 17 00:00:00 2001 +From: Victor Stinner +Date: Mon, 16 Mar 2020 21:50:36 +0100 +Subject: [PATCH] Issue #309: Add Python 3.9 support to spawnv_passfds() + +Python 3.9 added (umask, user, group, extra_groups) parameters to +_posixsubprocess.fork_exec(). +--- + billiard/compat.py | 8 ++++++-- + ~~tox.ini | 2 +-~~ + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/billiard/compat.py b/billiard/compat.py +index b172d9a..b5ce7c7 100644 +--- a/billiard/compat.py ++++ b/billiard/compat.py +@@ -220,10 +220,14 @@ def spawnv_passfds(path, args, passfds): + passfds = sorted(passfds) + errpipe_read, errpipe_write = os.pipe() + try: +- return _posixsubprocess.fork_exec( ++ args = [ + args, [fsencode(path)], True, tuple(passfds), None, None, + -1, -1, -1, -1, -1, -1, errpipe_read, errpipe_write, +- False, False, None) ++ False, False] ++ if sys.version_info >= (3, 9): ++ args.extend((None, None, None, -1)) # group, extra_groups, user, umask ++ args.append(None) # preexec_fn ++ return _posixsubprocess.fork_exec(*args) + finally: + os.close(errpipe_read) + os.close(errpipe_write) diff --git a/python-billiard.changes b/python-billiard.changes index 34bc820..bf0d723 100644 --- a/python-billiard.changes +++ b/python-billiard.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 19 19:42:02 UTC 2021 - Ben Greiner + +- Add billiard-pr310-py39-fork_exec.patch -- gh#celery/billiard#310 + ------------------------------------------------------------------- Mon Apr 6 12:24:22 UTC 2020 - Matej Cepl diff --git a/python-billiard.spec b/python-billiard.spec index f51d57b..bc78806 100644 --- a/python-billiard.spec +++ b/python-billiard.spec @@ -1,7 +1,7 @@ # # spec file for package python-billiard # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/celery/billiard Source: https://files.pythonhosted.org/packages/source/b/billiard/billiard-%{version}.tar.gz +# PATCH-FIX-UPSTREAM billiard-pr310-py39-fork_exec.patch -- gh#celery/billiard#310 +Patch0: billiard-pr310-py39-fork_exec.patch BuildRequires: %{python_module case >= 1.3.1} BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest} @@ -55,7 +57,7 @@ fixes/improvements from python-trunk. Documentation and help files for %{name}. %prep -%setup -q -n billiard-%{version} +%autosetup -p1 -n billiard-%{version} %build %python_build