Update to 0.4.16

This commit is contained in:
Orion Poplawski 2020-06-06 12:19:48 -06:00
parent 0b494fc10f
commit 8b6d977c90
4 changed files with 7 additions and 52 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ greenlet-0.3.1.tar.gz
/greenlet-0.4.12.tar.gz
/greenlet-0.4.13.tar.gz
/greenlet-0.4.14.tar.gz
/greenlet-0.4.16.tar.gz

View File

@ -1,48 +0,0 @@
From d05b62bb75e6a3e217435a1fe0f15a53e692898c Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@python.org>
Date: Wed, 18 Mar 2020 15:09:33 +0100
Subject: [PATCH] Port to Python 3.9
On Python 3.9, define _Py_DEC_REFTOTAL which has been removed by:
https://github.com/python/cpython/commit/49932fec62c616ec88da52642339d83ae719e924
Replace also PyEval_CallObjectWithKeywords() with PyObject_Call(),
since PyEval_CallObjectWithKeywords() has been deprecated in
Python 3.9 and PyObject_Call() has the same behavior. The only
difference is that PyEval_CallObjectWithKeywords() can be called with
args=NULL, but g_initialstub() ensures that args is not NULL.
---
greenlet.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/greenlet.c b/greenlet.c
index ec738b9..d37fc97 100644
--- a/greenlet.c
+++ b/greenlet.c
@@ -109,6 +109,16 @@ extern PyTypeObject PyGreenlet_Type;
#define GREENLET_USE_TRACING 1
#endif
+#ifndef _Py_DEC_REFTOTAL
+ /* _Py_DEC_REFTOTAL macro has been removed from Python 3.9 by:
+ https://github.com/python/cpython/commit/49932fec62c616ec88da52642339d83ae719e924 */
+# ifdef Py_REF_DEBUG
+# define _Py_DEC_REFTOTAL _Py_RefTotal--
+# else
+# define _Py_DEC_REFTOTAL
+# endif
+#endif
+
/* Weak reference to the switching-to greenlet during the slp switch */
static PyGreenlet* volatile ts_target = NULL;
/* Strong reference to the switching from greenlet after the switch */
@@ -820,8 +830,7 @@ static int GREENLET_NOINLINE(g_initialstub)(void* mark)
result = NULL;
} else {
/* call g.run(*args, **kwargs) */
- result = PyEval_CallObjectWithKeywords(
- run, args, kwargs);
+ result = PyObject_Call(run, args, kwargs);
Py_DECREF(args);
Py_XDECREF(kwargs);
}

View File

@ -1,14 +1,13 @@
%global modname greenlet
Name: python-%{modname}
Version: 0.4.14
Release: 8%{?dist}
Version: 0.4.16
Release: 1%{?dist}
Summary: Lightweight in-process concurrent programming
License: MIT
URL: https://github.com/python-greenlet/greenlet
Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
BuildRequires: gcc-c++
Patch1: %{url}/commit/c644ca6823994b958e004b3e00b587723181b58e.patch
%global _description \
The greenlet package is a spin-off of Stackless, a version of CPython\
@ -60,6 +59,9 @@ Python 3 version.
%{_includedir}/python%{python3_version}*/%{modname}/
%changelog
* Sat Jun 06 2020 Orion Poplawski <orion@nwra.com> - 0.4.16-1
- Update to 0.4.16
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-8
- Rebuilt for Python 3.9

View File

@ -1 +1 @@
SHA512 (greenlet-0.4.14.tar.gz) = c86802a0df56b78482b029a0eaf624ca8f14d0e704480b30a8a35e343b3e4a16e80b6f169a970a39935b39d56aafc25bada0738199818b5892ca398a809d54ef
SHA512 (greenlet-0.4.16.tar.gz) = f13d6346be89b109b64c971835ce19ed4cd4026fadc143736937f9e85852cafd61ee54e0f7d6d5f0434f07fccb106be5efb6f8ee170949a01f9ba92627d13bdc