Package: src:cheetah Version: 3.4.0-1 User: [email protected] Usertags: python3.15
Hi! While rebuilding packages with python 3.15 we found that cheetah fails to build because load_module was removed. I'm attaching a debdiff with the upstream patch that replaces the call to load_module. Please consider fixing this before python 3.15 is in unstable. I've also prepared a merge request in salsa, https://salsa.debian.org/jcfp/cheetah/-/merge_requests/1 which might be easier to work with depending on your workflow. Happy hacking, --"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science."
-- Donald Knuth Saludos /\/\ /\ >< `/
diff -Nru cheetah-3.4.0/debian/changelog cheetah-3.4.0/debian/changelog --- cheetah-3.4.0/debian/changelog 2024-12-03 13:00:33.000000000 +0100 +++ cheetah-3.4.0/debian/changelog 2026-08-05 15:29:42.000000000 +0200 @@ -1,3 +1,11 @@ +cheetah (3.4.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload + * Add upstream patch to fix build with Python 3.15: + - Stop using load_module() in compat (f935b58) + + -- Maximiliano Curia <[email protected]> Wed, 05 Aug 2026 15:29:42 +0200 + cheetah (3.4.0-1) unstable; urgency=medium * Watch: revert back to tracking tagged releases. diff -Nru cheetah-3.4.0/debian/patches/python3.15-load-module.patch cheetah-3.4.0/debian/patches/python3.15-load-module.patch --- cheetah-3.4.0/debian/patches/python3.15-load-module.patch 1970-01-01 01:00:00.000000000 +0100 +++ cheetah-3.4.0/debian/patches/python3.15-load-module.patch 2026-08-05 15:29:42.000000000 +0200 @@ -0,0 +1,28 @@ +commit f935b58cdf47570b288e59a8a19e157d5909f7ac +Author: Steve Kowalik <[email protected]> +Date: Fri Jul 17 15:07:49 2026 +1000 + + Stop using load_module() in compat + + load_module() has been deprecated effectively since it was added, + replaced by exec_module in Python 3.5, switch to using that, since + load_module() was removed in Python 3.15. + + Note this effectively removes support for Python 3.4, but I can reenable + that if you prefer. + +diff --git a/Cheetah/compat.py b/Cheetah/compat.py +index 78cfcdd..7810506 100644 +--- a/Cheetah/compat.py ++++ b/Cheetah/compat.py +@@ -53,7 +53,9 @@ else: + + def load_module_from_file(base_name, module_name, filename): + specs = importlib.util.spec_from_file_location(module_name, filename) +- return specs.loader.load_module() ++ module = importlib.util.module_from_spec(specs) ++ specs.loader.exec_module(module) ++ return module + + new_module = types.ModuleType + diff -Nru cheetah-3.4.0/debian/patches/series cheetah-3.4.0/debian/patches/series --- cheetah-3.4.0/debian/patches/series 2024-03-19 10:12:04.000000000 +0100 +++ cheetah-3.4.0/debian/patches/series 2026-08-05 15:29:42.000000000 +0200 @@ -1 +1,2 @@ python3-tests.patch +python3.15-load-module.patch
signature.asc
Description: PGP signature

