public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mattias Ellert <mattias.ellert@physics.uu.se>
To: git-commits@fedoraproject.org
Subject: [rpms/root] f43: Compatibility with Python 3.15
Date: Mon, 29 Jun 2026 18:08:38 GMT	[thread overview]
Message-ID: <178275651862.1.12651001255745773976.rpms-root-3cd581f0e016@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/root
Branch : f43
Commit : 3cd581f0e0166c914e47c488d19d93e3e8fd7100
Author : Mattias Ellert <mattias.ellert@physics.uu.se>
Date   : 2026-04-05T07:49:26+02:00
Stats  : +53/-6 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/root/c/3cd581f0e0166c914e47c488d19d93e3e8fd7100?branch=f43

Log:
Compatibility with Python 3.15

---
diff --git a/root-python-3.15.patch b/root-python-3.15.patch
new file mode 100644
index 0000000..a40cf3f
--- /dev/null
+++ b/root-python-3.15.patch
@@ -0,0 +1,38 @@
+From 4171724228a849959542fcb0b0c1ec10d8e94999 Mon Sep 17 00:00:00 2001
+From: Jonas Rembser <jonas.rembser@cern.ch>
+Date: Fri, 3 Apr 2026 22:56:04 +0200
+Subject: [PATCH] [Python] Set `__spec__` attribute and not `__cached__` for
+ ROOT facade
+
+The Python documentation [1] says:
+
+> It is strongly recommended that you use module.__spec__.cached instead
+  of module.__cached__.
+
+So this commit suggests to transfer the full `__spec__` attribute from
+the ROOT module to the facade, instead of `__cached__`.
+
+This also avoids errors when importing ROOT with Python 3.15, where
+`__cached__` will cease to be set or taken into consideration by the
+import system or standard library.
+
+Closes #21787.
+
+[1] https://docs.python.org/3/reference/datamodel.html#module.__cached__
+---
+ bindings/pyroot/pythonizations/python/ROOT/_facade.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bindings/pyroot/pythonizations/python/ROOT/_facade.py b/bindings/pyroot/pythonizations/python/ROOT/_facade.py
+index c22ae40da4c2d..da8b6681ec2f2 100644
+--- a/bindings/pyroot/pythonizations/python/ROOT/_facade.py
++++ b/bindings/pyroot/pythonizations/python/ROOT/_facade.py
+@@ -142,7 +142,7 @@ def __init__(self, module, is_ipython):
+         self.__all__ = module.__all__
+         self.__name__ = module.__name__
+         self.__file__ = module.__file__
+-        self.__cached__ = module.__cached__
++        self.__spec__ = module.__spec__
+         self.__path__ = module.__path__
+         self.__doc__ = module.__doc__
+         self.__package__ = module.__package__

diff --git a/root.spec b/root.spec
index 8c7a55d..6b745ef 100644
--- a/root.spec
+++ b/root.spec
@@ -34,7 +34,7 @@
 Name:		root
 Version:	6.38.04
 %global libversion %(cut -d. -f 1-2 <<< %{version})
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Numerical data analysis framework
 
 License:	LGPL-2.1-or-later
@@ -80,6 +80,10 @@ Patch6:		%{name}-Save-memory-Do-not-link-to-LLVM-libraries-in-parallel.patch
 #		https://github.com/root-project/root/pull/21604
 #		https://github.com/root-project/root/pull/21605
 Patch7:		%{name}-Avoid-additional-python-version-file-to-wrong-location.patch
+#		Compatibility with Python 3.15
+#		https://github.com/root-project/root/issues/21787
+#		https://github.com/root-project/root/pull/21790
+Patch8:		%{name}-python-3.15.patch
 
 BuildRequires:	gcc-c++
 BuildRequires:	gcc-gfortran
@@ -1878,6 +1882,7 @@ This package contains a library for histogramming in ROOT 7.
 %patch -P5 -p1
 %patch -P6 -p1
 %patch -P7 -p1
+%patch -P8 -p1
 
 # Remove bundled sources in order to be sure they are not used
 #  * afterimage
@@ -2191,10 +2196,8 @@ sed -e 's!/usr/bin/env python3!%{__python3}!' \
     -e '/import sys/d' \
     -e '/import cmdLineUtils/iimport sys' \
     -e '/import cmdLineUtils/isys.path.insert(0, "%{_datadir}/%{name}/cli")' \
-    -i %{buildroot}%{_bindir}/rootbrowse \
-       %{buildroot}%{_bindir}/rootcp \
+    -i %{buildroot}%{_bindir}/rootcp \
        %{buildroot}%{_bindir}/rooteventselector \
-       %{buildroot}%{_bindir}/rootls \
        %{buildroot}%{_bindir}/rootmkdir \
        %{buildroot}%{_bindir}/rootmv \
        %{buildroot}%{_bindir}/rootprint \
@@ -2407,13 +2410,16 @@ tmva-sofie-test-TestCustomModelsFromONNX\$\$"
 
 %ifarch %{power64}
 %if %{?fedora}%{!?fedora:0} >= 42
-# - gtest-tree-ntuple-ntuple-emulated
 # - gtest-tree-ntuple-ntuple-evolution-shape
 #   waitpid() failed
 excluded="${excluded}|\
-gtest-tree-ntuple-ntuple-emulated|\
 gtest-tree-ntuple-ntuple-evolution-shape"
 %endif
+
+# - gtest-tree-ntuple-ntuple-emulated
+¤   Random failures
+excluded="${excluded}|\
+gtest-tree-ntuple-ntuple-emulated"
 %endif
 
 %ifarch s390x
@@ -3442,6 +3448,9 @@ fi
 %endif
 
 %changelog
+* Sun Apr 05 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.38.04-2
+- Compatibility with Python 3.15
+
 * Fri Mar 13 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.38.04-1
 - Update to 6.38.04
 - Rebuild for pythia8 8.3.17

                 reply	other threads:[~2026-06-29 18:08 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=178275651862.1.12651001255745773976.rpms-root-3cd581f0e016@fedoraproject.org \
    --to=mattias.ellert@physics.uu.se \
    --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