Update to 3.0.9 (rhbz#2268123)
This commit is contained in:
parent
ba710e631b
commit
0e9ba50dcb
1
.gitignore
vendored
1
.gitignore
vendored
@ -67,3 +67,4 @@ Cython-0.12.1.tar.gz
|
||||
/Cython-3.0.5.tar.gz
|
||||
/Cython-3.0.6.tar.gz
|
||||
/Cython-3.0.8.tar.gz
|
||||
/Cython-3.0.9.tar.gz
|
||||
|
||||
50
6003.patch
50
6003.patch
@ -1,50 +0,0 @@
|
||||
From 829611469a979f499f3658fba632c9d9fe96933e Mon Sep 17 00:00:00 2001
|
||||
From: Victor Stinner <vstinner@python.org>
|
||||
Date: Fri, 16 Feb 2024 09:02:35 +0100
|
||||
Subject: [PATCH] Use Python 3.13a4 PyCFunctionFastWithKeywords
|
||||
|
||||
Python 3.13a4 adds a public PyCFunctionFastWithKeywords and
|
||||
PyCFunctionFast types and removes the private
|
||||
_PyCFunctionFastWithKeywords and _PyCFunctionFast types:
|
||||
|
||||
* https://github.com/python/cpython/commit/9e3729bbd77fb9dcaea6a06ac760160136d80b79
|
||||
* https://github.com/python/cpython/pull/114627
|
||||
* https://github.com/capi-workgroup/decisions/issues/11
|
||||
---
|
||||
Cython/Utility/CythonFunction.c | 2 +-
|
||||
Cython/Utility/ModuleSetupCode.c | 9 +++++++--
|
||||
2 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
|
||||
index 2a3b67335d2..646e3f5ff3a 100644
|
||||
--- a/Cython/Utility/CythonFunction.c
|
||||
+++ b/Cython/Utility/CythonFunction.c
|
||||
@@ -1019,7 +1019,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
|
||||
+ return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
|
||||
}
|
||||
|
||||
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
|
||||
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
|
||||
index 785fcc653ef..03373b50f13 100644
|
||||
--- a/Cython/Utility/ModuleSetupCode.c
|
||||
+++ b/Cython/Utility/ModuleSetupCode.c
|
||||
@@ -907,8 +907,13 @@ class __Pyx_FakeReference {
|
||||
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
|
||||
Py_ssize_t nargs, PyObject *kwnames);
|
||||
#else
|
||||
- #define __Pyx_PyCFunctionFast _PyCFunctionFast
|
||||
- #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
|
||||
+ #if PY_VERSION_HEX >= 0x030d00A4
|
||||
+ # define __Pyx_PyCFunctionFast PyCFunctionFast
|
||||
+ # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
|
||||
+ #else
|
||||
+ # define __Pyx_PyCFunctionFast _PyCFunctionFast
|
||||
+ # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
|
||||
+ #endif
|
||||
#endif
|
||||
|
||||
#if CYTHON_METH_FASTCALL
|
||||
64
6039.patch
64
6039.patch
@ -1,64 +0,0 @@
|
||||
From 2b1022efeeeefe1b813bb0810675a6fcb98cbb6e Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Wed, 28 Feb 2024 10:03:58 +0100
|
||||
Subject: [PATCH 1/2] Disable GCC warnings/errors about wrong self casts in
|
||||
final function calls.
|
||||
|
||||
See https://github.com/cython/cython/issues/2747
|
||||
---
|
||||
Cython/Compiler/ExprNodes.py | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
|
||||
index d46e8b0cbdd..62364edd1b1 100644
|
||||
--- a/Cython/Compiler/ExprNodes.py
|
||||
+++ b/Cython/Compiler/ExprNodes.py
|
||||
@@ -6498,7 +6498,13 @@ def generate_result_code(self, code):
|
||||
goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos)
|
||||
else:
|
||||
goto_error = ""
|
||||
+ if self.function.is_attribute and self.function.entry and self.function.entry.final_func_cname:
|
||||
+ # Hack around https://github.com/cython/cython/issues/2747
|
||||
+ # Disable GCC warnings/errors for wrong self casts.
|
||||
+ code.putln('#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"')
|
||||
code.putln("%s%s; %s" % (lhs, rhs, goto_error))
|
||||
+ if self.function.is_attribute and self.function.entry and self.function.entry.final_func_cname:
|
||||
+ code.putln("#pragma GCC diagnostic pop")
|
||||
if self.type.is_pyobject and self.result():
|
||||
self.generate_gotref(code)
|
||||
if self.has_optional_args:
|
||||
|
||||
From facecc5fe67feac147afa47008a06f766bfb8cd3 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Sat, 2 Mar 2024 08:54:26 +0100
|
||||
Subject: [PATCH 2/2] Do not generate pragma in C++ mode since it is only valid
|
||||
for gcc, not gpp.
|
||||
|
||||
---
|
||||
Cython/Compiler/ExprNodes.py | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
|
||||
index 62364edd1b1..7ee239ae579 100644
|
||||
--- a/Cython/Compiler/ExprNodes.py
|
||||
+++ b/Cython/Compiler/ExprNodes.py
|
||||
@@ -6498,12 +6498,17 @@ def generate_result_code(self, code):
|
||||
goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos)
|
||||
else:
|
||||
goto_error = ""
|
||||
- if self.function.is_attribute and self.function.entry and self.function.entry.final_func_cname:
|
||||
+ undo_gh2747_hack = False
|
||||
+ if (self.function.is_attribute and
|
||||
+ self.function.entry and self.function.entry.final_func_cname and
|
||||
+ not code.funcstate.scope.is_cpp()
|
||||
+ ):
|
||||
# Hack around https://github.com/cython/cython/issues/2747
|
||||
# Disable GCC warnings/errors for wrong self casts.
|
||||
code.putln('#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"')
|
||||
+ undo_gh2747_hack = True
|
||||
code.putln("%s%s; %s" % (lhs, rhs, goto_error))
|
||||
- if self.function.is_attribute and self.function.entry and self.function.entry.final_func_cname:
|
||||
+ if undo_gh2747_hack:
|
||||
code.putln("#pragma GCC diagnostic pop")
|
||||
if self.type.is_pyobject and self.result():
|
||||
self.generate_gotref(code)
|
||||
@ -5,7 +5,7 @@
|
||||
%bcond cython_compile 1
|
||||
|
||||
Name: Cython
|
||||
Version: 3.0.8
|
||||
Version: 3.0.9
|
||||
Release: %autorelease
|
||||
Summary: Language for writing Python extension modules
|
||||
|
||||
@ -13,13 +13,6 @@ License: Apache-2.0
|
||||
URL: http://www.cython.org
|
||||
Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
|
||||
|
||||
# Use Python 3.13.0a4 PyCFunctionFastWithKeywords
|
||||
Patch: https://github.com/cython/cython/pull/6003.patch
|
||||
|
||||
# Disable GCC warnings/errors about wrong self casts in final function calls
|
||||
# Upstream issue: https://github.com/cython/cython/issues/2747
|
||||
Patch: https://github.com/cython/cython/pull/6039.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%if %{with tests}
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (Cython-3.0.8.tar.gz) = 1070fc278401990595d177b0e6396bc1eba2ea8234a7c5bb26399b6b7284de7791ee5fa60ef74d06d0f4120b9c877bfd7703a7d701838f1634737526c614b860
|
||||
SHA512 (Cython-3.0.9.tar.gz) = 7899474882faab14716973783bbb46b981eab48192791acbbd06133efee83bfa9ace0e9a0272b0a44061a95ed94cdceaa98c4100f843220f5987791e36fa00e6
|
||||
|
||||
Loading…
Reference in New Issue
Block a user