public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pyscipopt] rawhide: Fix Cython 3.3 compatibility
Date: Thu, 27 Aug 2026 07:05:54 GMT	[thread overview]
Message-ID: <178781435418.1.4999470513278300383.rpms-python-pyscipopt-ec2c6ae82287@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-08-27  7:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178781435418.1.4999470513278300383.rpms-python-pyscipopt-ec2c6ae82287@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox