public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyscipopt] rawhide: Fix Cython 3.3 compatibility
@ 2026-08-27 7:05 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-08-27 7:05 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pyscipopt
Branch : rawhide
Commit : ec2c6ae82287071590ec6283b86c99fe9d0227f7
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-08-27T08:00:52+01:00
Stats : +55/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pyscipopt/c/ec2c6ae82287071590ec6283b86c99fe9d0227f7?branch=rawhide
Log:
Fix Cython 3.3 compatibility
---
diff --git a/1248.patch b/1248.patch
new file mode 100644
index 0000000..1670a97
--- /dev/null
+++ b/1248.patch
@@ -0,0 +1,46 @@
+From 1b965e958db864b45fb2cf2fbc5ac3023a6683bf Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Thu, 27 Aug 2026 07:52:39 +0100
+Subject: [PATCH] Fix Cython 3.3 compatibility
+
+Do not redeclare variables with different types. Use new names rather
+than redeclaring/shadowing the old ones.
+
+Fixes #1247.
+---
+ src/pyscipopt/matrix.pxi | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/pyscipopt/matrix.pxi b/src/pyscipopt/matrix.pxi
+index d1d4ad793..b60e23c99 100644
+--- a/src/pyscipopt/matrix.pxi
++++ b/src/pyscipopt/matrix.pxi
+@@ -233,10 +233,10 @@ def _core_sum(
+ a np.ndarray.
+
+ """
+- axis: Tuple[int, ...] = normalize_axis_tuple(
++ axis_tuple: Tuple[int, ...] = normalize_axis_tuple(
+ range(a.ndim) if axis is None else axis, a.ndim
+ )
+- if len(axis) == a.ndim:
++ if len(axis_tuple) == a.ndim:
+ res = quicksum(a.flat)
+ return (
+ np.array([res], dtype=object).reshape([1] * a.ndim)
+@@ -244,12 +244,12 @@ def _core_sum(
+ else res
+ )
+
+- keep_axes = tuple(i for i in range(a.ndim) if i not in axis)
++ keep_axes = tuple(i for i in range(a.ndim) if i not in axis_tuple)
+ shape = (
+- tuple(1 if i in axis else a.shape[i] for i in range(a.ndim))
++ tuple(1 if i in axis_tuple else a.shape[i] for i in range(a.ndim))
+ if keepdims
+ else tuple(a.shape[i] for i in keep_axes)
+ )
+ return np.apply_along_axis(
+- quicksum, -1, a.transpose(keep_axes + axis).reshape(shape + (-1,))
++ quicksum, -1, a.transpose(keep_axes + axis_tuple).reshape(shape + (-1,))
+ )
diff --git a/python-pyscipopt.spec b/python-pyscipopt.spec
index 7a8c659..61f1007 100644
--- a/python-pyscipopt.spec
+++ b/python-pyscipopt.spec
@@ -15,6 +15,15 @@ Source: %{url}/archive/v%{version}/PySCIPOpt-%{version}.tar.gz
# Cherry-picked on v6.2.1
Patch: 0001-Make-test_markDoNotAggrVar_and_getStatus-robust-to-S.patch
+# Fix Cython 3.3 compatibility
+# https://github.com/scipopt/PySCIPOpt/pull/1248
+#
+# Fixes:
+#
+# Error compiling/Cythonizing with Cython 3.3.0: 'axis' redeclared
+# https://github.com/scipopt/PySCIPOpt/issues/1247
+Patch: %{url}/pull/1248.patch
+
BuildSystem: pyproject
BuildOption(install): --assert-license pyscipopt
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-27 7:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27 7:05 [rpms/python-pyscipopt] rawhide: Fix Cython 3.3 compatibility Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox