public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/pythran] rawhide: Fix test failure with Python 3.15.0b1
Date: Wed, 03 Jun 2026 10:05:24 GMT [thread overview]
Message-ID: <178048112484.1.7046990781042752527.rpms-pythran-34fbaa5862d6@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/pythran
Branch : rawhide
Commit : 34fbaa5862d61e67a55a25e8555bd5a6cb554643
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-05-26T16:56:48+02:00
Stats : +66/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/pythran/c/34fbaa5862d61e67a55a25e8555bd5a6cb554643?branch=rawhide
Log:
Fix test failure with Python 3.15.0b1
---
diff --git a/2431.patch b/2431.patch
new file mode 100644
index 0000000..b3be25c
--- /dev/null
+++ b/2431.patch
@@ -0,0 +1,63 @@
+From c812d05ee79fa95556e44b30d292a60baf5ac04f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Tue, 26 May 2026 16:53:48 +0200
+Subject: [PATCH] Fix typing of array.typecodes for Python 3.15
+
+Python 3.15 changed array.typecodes from str to tuple to support
+type codes longer than 1 character (Zf and Zd).
+See https://github.com/python/cpython/issues/148675
+
+Pythran's fill_constants_types() uses type() introspection on live
+Python constants to set signatures, which now produces tuple instead
+of str. Meanwhile, the explicit ConstantIntr(signature=str) was
+silently ignored because ConstantIntr.__init__ never stored it.
+
+Fix ConstantIntr to preserve an explicitly provided signature, and
+skip introspection in fill_constants_types when one is already set.
+
+Without the fix, pytest pythran/tests/test_array.py -k test_typecodes
+fails with:
+
+ else:
+> raise NotImplementedError(t)
+E NotImplementedError: <class 'tuple'>
+
+pythran/types/tog.py:480: NotImplementedError
+
+Assisted-By: Claude Opus 4.6
+---
+ pythran/intrinsic.py | 2 ++
+ pythran/tables.py | 7 ++++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/pythran/intrinsic.py b/pythran/intrinsic.py
+index f7566e4de..a5948c172 100644
+--- a/pythran/intrinsic.py
++++ b/pythran/intrinsic.py
+@@ -255,6 +255,8 @@ def __init__(self, **kwargs):
+ """ Forward arguments and remove arguments effects. """
+ kwargs["argument_effects"] = ()
+ super(ConstantIntr, self).__init__(**kwargs)
++ if 'signature' in kwargs:
++ self.signature = kwargs['signature']
+
+ def isliteral(self):
+ """ Mark this intrinsic as a literal. """
+diff --git a/pythran/tables.py b/pythran/tables.py
+index 64ca3d5c2..126656863 100644
+--- a/pythran/tables.py
++++ b/pythran/tables.py
+@@ -4731,9 +4731,10 @@ def fill_constants_types(module_name, elements):
+ if isinstance(intrinsic, dict): # Submodule case
+ fill_constants_types(module_name + (elem,), intrinsic)
+ elif isinstance(intrinsic, ConstantIntr):
+- # use introspection to get the Python constants types
+- cst = getattr(import_module(".".join(module_name)), elem)
+- intrinsic.signature = type(cst)
++ if not hasattr(intrinsic, 'signature'):
++ # use introspection to get the Python constants types
++ cst = getattr(import_module(".".join(module_name)), elem)
++ intrinsic.signature = type(cst)
+
+
+ fill_constants_types((), MODULES)
diff --git a/pythran.spec b/pythran.spec
index cdb5a0b..a6e36e9 100644
--- a/pythran.spec
+++ b/pythran.spec
@@ -58,6 +58,9 @@ Patch: https://github.com/serge-sans-paille/pythran/pull/2414.patch
# Resolved upstream
Patch: https://github.com/serge-sans-paille/pythran/pull/2415.patch
+# Fix typing of array.typecodes for Python 3.15
+Patch: https://github.com/serge-sans-paille/pythran/pull/2431.patch
+
# there is no actual arched content
# yet we want to test on all architectures
# and we also might need to skip some
reply other threads:[~2026-06-03 10: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=178048112484.1.7046990781042752527.rpms-pythran-34fbaa5862d6@fedoraproject.org \
--to=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