public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/autowrap] rawhide: Fix Cython 3.3 compatibility
@ 2026-11-04 10:24 Lumir Balhar
  0 siblings, 0 replies; only message in thread
From: Lumir Balhar @ 2026-11-04 10:24 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/autowrap
Branch : rawhide
Commit : 45c425f67eb21f77834bae132e7b8f50ccdcc256
Author : Lumir Balhar <lbalhar@redhat.com>
Date   : 2026-11-04T08:12:36+01:00
Stats  : +35/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/autowrap/c/45c425f67eb21f77834bae132e7b8f50ccdcc256?branch=rawhide

Log:
Fix Cython 3.3 compatibility

---
diff --git a/251.patch b/251.patch
new file mode 100644
index 0000000..fce0445
--- /dev/null
+++ b/251.patch
@@ -0,0 +1,32 @@
+From 0f68f11eb36ab74685c57f9743a6afb93aaba1a9 Mon Sep 17 00:00:00 2001
+From: Lumir Balhar <lbalhar@redhat.com>
+Date: Wed, 4 Nov 2026 07:57:56 +0100
+Subject: [PATCH] Fix Cython 3.3 compatibility: use CQualifierTypeNode instead
+ of CConstOrVolatileTypeNode
+
+Cython 3.3.0 renamed CConstOrVolatileTypeNode to CQualifierTypeNode (also
+adding is_restrict support). Update _check_type_constness() to try the new
+name first, keeping fallbacks for older Cython versions.
+---
+ autowrap/PXDParser.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/autowrap/PXDParser.py b/autowrap/PXDParser.py
+index 5a8aa1f..fb6fc28 100644
+--- a/autowrap/PXDParser.py
++++ b/autowrap/PXDParser.py
+@@ -66,9 +66,12 @@
+ def _check_type_constness(ctype: Nodes.CBaseTypeNode) -> bool:
+     """Regardless of Cython version, checks whether the passed Cython type is const"""
+     try:
+-        return isinstance(ctype, Nodes.CConstTypeNode)
++        return isinstance(ctype, Nodes.CQualifierTypeNode) and ctype.is_const
+     except AttributeError:
+-        return isinstance(ctype, Nodes.CConstOrVolatileTypeNode) and ctype.is_const
++        try:
++            return isinstance(ctype, Nodes.CConstOrVolatileTypeNode) and ctype.is_const
++        except AttributeError:
++            return isinstance(ctype, Nodes.CConstTypeNode)
+ 
+ 
+ def parse_class_annotations(node, lines: Collection[str]) -> AnnotDict:

diff --git a/autowrap.spec b/autowrap.spec
index c99bcf2..26c1f1a 100644
--- a/autowrap.spec
+++ b/autowrap.spec
@@ -8,6 +8,8 @@ License: BSD-3-Clause
 URL: https://pypi.org/project/autowrap/
 Source0: https://github.com/OpenMS/autowrap/archive/refs/tags/release/%{version}/%{name}-release-%{version}.tar.gz
 Patch0:  %{name}-fix_configuration_for_old_setuptools.patch
+# Fix Cython 3.3 compatibility: CConstOrVolatileTypeNode renamed to CQualifierTypeNode
+Patch1:  https://github.com/OpenMS/autowrap/pull/251.patch
 BuildArch: noarch
 
 ## For testing
@@ -39,6 +41,7 @@ Obsoletes: python2-autowrap < 0:%{version}-%{release}
 %if 0%{?fedora} < 43
 %patch -P 0 -p1
 %endif
+%patch -P 1 -p1
 
 ##Remove bundled files
 rm -rf %{name}-release-%{version}/autowrap/data_files/boost

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-04 10:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 10:24 [rpms/autowrap] rawhide: Fix Cython 3.3 compatibility Lumir Balhar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox