public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-astroquery] rawhide: Fix build with Python 3.15
@ 2026-07-06 10:40 Mamoru TASAKA
  0 siblings, 0 replies; only message in thread
From: Mamoru TASAKA @ 2026-07-06 10:40 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-astroquery
Branch : rawhide
Commit : 2d9ce573b0e067ddcbe25e63275f8f6a56c6d455
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date   : 2026-07-02T13:34:46+09:00
Stats  : +38/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-astroquery/c/2d9ce573b0e067ddcbe25e63275f8f6a56c6d455?branch=rawhide

Log:
Fix build with Python 3.15

---
diff --git a/astroquery-0.4.11-astropy_helpers-fix-module-loading-for-python-3.15.patch b/astroquery-0.4.11-astropy_helpers-fix-module-loading-for-python-3.15.patch
new file mode 100644
index 0000000..d9607ae
--- /dev/null
+++ b/astroquery-0.4.11-astropy_helpers-fix-module-loading-for-python-3.15.patch
@@ -0,0 +1,37 @@
+From 3b9aadcc2f08dd805a238fe1a7860531b6b9ecc7 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Thu, 2 Jul 2026 11:42:23 +0900
+Subject: [PATCH] astropy_helpers: fix module loading for python 3.15
+
+python 3.15 removes importlib.abc.Loader.load_module.loader.load_module .
+https://docs.python.org/3.15/whatsnew/3.15.html#zipimport
+https://docs.python.org/ja/3/library/importlib.html#importlib.abc.Loader.load_module
+
+Replace with exec_module()
+
+Note that astropy_helpers is removed on astroquery-0.4.12:
+https://github.com/astropy/astroquery/pull/3521
+
+So this patch will never be upstreamed.
+---
+ astropy_helpers/astropy_helpers/utils.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/astropy_helpers/astropy_helpers/utils.py b/astropy_helpers/astropy_helpers/utils.py
+index 83da415..4d562ac 100644
+--- a/astropy_helpers/astropy_helpers/utils.py
++++ b/astropy_helpers/astropy_helpers/utils.py
+@@ -217,7 +217,9 @@ def import_file(filename, name=None):
+         raise ImportError('Could not import file {0}'.format(filename))
+ 
+     loader = import_machinery.SourceFileLoader(name, filename)
+-    mod = loader.load_module()
++    spec = importlib.util.spec_from_loader(name, loader)
++    mod = importlib.util.module_from_spec(spec)
++    loader.exec_module(mod)
+ 
+     return mod
+ 
+-- 
+2.55.0
+

diff --git a/python-astroquery.spec b/python-astroquery.spec
index 3b47611..c705904 100644
--- a/python-astroquery.spec
+++ b/python-astroquery.spec
@@ -8,6 +8,7 @@ Summary:        Python module to access astronomical online data resources
 License:        BSD-3-Clause
 URL:            http://pypi.python.org/pypi/%{srcname}
 Source0:        %{pypi_source}
+Patch0:         astroquery-0.4.11-astropy_helpers-fix-module-loading-for-python-3.15.patch
 
 BuildArch:      noarch
 BuildRequires:  python3-devel

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

only message in thread, other threads:[~2026-07-06 10:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-06 10:40 [rpms/python-astroquery] rawhide: Fix build with Python 3.15 Mamoru TASAKA

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