forked from pool/python-billiard
		
	Accepting request 880496 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/880496 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-billiard?expand=0&rev=20
This commit is contained in:
		
							
								
								
									
										33
									
								
								billiard-pr310-py39-fork_exec.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								billiard-pr310-py39-fork_exec.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
From a508ebafadcfe2e25554b029593f3e66d01ede6c Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Victor Stinner <vstinner@python.org>
 | 
			
		||||
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)
 | 
			
		||||
@@ -1,3 +1,8 @@
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Fri Mar 19 19:42:02 UTC 2021 - Ben Greiner <code@bnavigator.de>
 | 
			
		||||
 | 
			
		||||
- Add billiard-pr310-py39-fork_exec.patch -- gh#celery/billiard#310
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Mon Apr  6 12:24:22 UTC 2020 - Matej Cepl <mcepl@suse.com>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user