Compare commits

...

8 Commits
f29 ... master

Author SHA1 Message Date
Miro Hrončok
0b494fc10f Rebuilt for Python 3.9 2020-05-23 09:32:29 +02:00
Terje Rosten
789654b895 Fix Python 3.9 build 2020-05-21 14:32:43 +02:00
Miro Hrončok
dcde08397f Backport an upstream commit for Python 3.9 compatibility
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1808355
2020-05-21 12:48:36 +02:00
Fedora Release Engineering
f74d4d6e72 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 12:32:12 +00:00
Miro Hrončok
696011edae Subpackages python2-greenlet, python2-greenlet-devel have been removed 2019-09-26 11:21:22 +02:00
Miro Hrončok
79b2485b35 Rebuilt for Python 3.8 2019-08-16 15:16:44 +02:00
Fedora Release Engineering
61096279ed - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 13:48:43 +00:00
Fedora Release Engineering
b26215a168 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 07:06:42 +00:00
2 changed files with 72 additions and 33 deletions

View File

@ -0,0 +1,48 @@
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

@ -2,12 +2,13 @@
Name: python-%{modname}
Version: 0.4.14
Release: 1%{?dist}
Release: 8%{?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\
@ -17,16 +18,6 @@ and are synchronized with data exchanges on "channels".
%description %{_description}
%package -n python2-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{modname}}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%description -n python2-%{modname} %{_description}
Python 2 version.
%package -n python3-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
@ -37,16 +28,6 @@ BuildRequires: python3-setuptools
Python 3 version.
%package -n python2-%{modname}-devel
Summary: C development headers for python2-%{modname}
%{?python_provide:%python_provide python2-%{modname}-devel}
Requires: python2-%{modname}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description -n python2-%{modname}-devel
%{summary}.
Python 2 version.
%package -n python3-%{modname}-devel
Summary: C development headers for python3-%{modname}
%{?python_provide:%python_provide python3-%{modname}-devel}
@ -61,26 +42,14 @@ Python 3 version.
%autosetup -n %{modname}-%{version} -p1
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%{__python2} setup.py test
%{__python3} setup.py test
%files -n python2-%{modname}
%license LICENSE LICENSE.PSF
%doc AUTHORS NEWS README.rst
%{python2_sitearch}/%{modname}-*.egg-info
%{python2_sitearch}/%{modname}.so
%files -n python2-%{modname}-devel
%{_includedir}/python%{python2_version}*/%{modname}/
%files -n python3-%{modname}
%license LICENSE LICENSE.PSF
%doc AUTHORS NEWS README.rst
@ -91,6 +60,28 @@ Python 3 version.
%{_includedir}/python%{python3_version}*/%{modname}/
%changelog
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-8
- Rebuilt for Python 3.9
* Thu May 21 2020 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-7
- Fix Python 3.9 build
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Sep 26 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-5
- Subpackages python2-greenlet, python2-greenlet-devel have been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-4
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jul 18 2018 Kevin Fenzi <kevin@scrye.com> - 0.4.14-1
- Update to 0.4.14.
- Drop upstreamed/no longer needed patches.