Package: src:python-openstacksdk
Version: 4.10.0-2
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Hi!
While rebuilding the python related packages against the Python 3.15rc1
version we found that python-openstacksdk fails to build from source
[1].
The issue happens because it fails to match ValueError message with the
expected text. Python 3.15 updated the text in some of the exceptions to
make them clearer, this affected the tests in openstacksdk as they
expect some specific wordings.
Upstream already includes a fix for this in Commit 405e2d7 [2]: fix
hashlib ValueError message check for py3.15
I applied the upstream fix in the sandbox [3] to be able to build the
packages that depend on python-openstacksdk, please consider applying
the patch to support the upcoming 3.15 version.
Happy hacking,
[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4578106/
[2]:
https://github.com/openstack/openstacksdk/commit/405e2d7836a2777eb59f06f95f4025faa058f166
[3]: https://debusine.debian.net/debian/r-python-python3.15/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
From 405e2d7836a2777eb59f06f95f4025faa058f166 Mon Sep 17 00:00:00 2001
From: Steve Traylen <[email protected]>
Date: Sat, 18 Apr 2026 11:48:49 +0200
Subject: [PATCH] fix hashlib ValueError message check for py3.15
I realise python3.15 is is not supported yet but this allows tests
to pass on 3.15a8.
Python 3.15 changed the ValueError message raised by hashlib.new() for
unknown algorithms from "unsupported hash type <name>" to "unsupported
hash algorithm <name>",
Replace the prefix check with a test for the algorithm name in
the exception message
Python change:
https://github.com/python/cpython/commit/6be49ee517258281357aa6846d2564bc5626b7ca
Change-Id: I404e47f5a4f2ec3b1b4bbb81f6a676c1921ff3c4
Signed-off-by: Steve Traylen <[email protected]>
---
openstack/image/_download.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: python-openstacksdk/openstack/image/_download.py
===================================================================
--- python-openstacksdk.orig/openstack/image/_download.py
+++ python-openstacksdk/openstack/image/_download.py
@@ -119,7 +119,7 @@ class DownloadMixin:
expected_hash = meta_hash_value
hash_algo = meta_hash_algo
except ValueError as ve:
- if not str(ve).startswith('unsupported hash type'):
+ if str(meta_hash_algo) not in str(ve):
raise exceptions.SDKException(
f"Unsupported hash algorithm '{meta_hash_algo}': {ve}"
)