python-oslo.i18n: FTBFS against python 3.15rc1

Maximiliano Curia <[email protected]>
Newsgroups gmane.linux.debian.devel.python
Message-ID <[email protected]>
Package: src:python-oslo.i18n
Version: python-oslo.i18n
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-oslo.i18n fails to build from source [1].

The error is caused by a change in the exception message in 3.15,
upstream already fixed the issue with the commit 938eab9 "tests: fix
TypeError message for Python 3.15" [2].

I applied the upstream fix in the sandbox [3] to be able to build the
packages that depend on python-oslo.i18n, please consider applying the
patch to support the upcoming 3.15 version.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/work-request/1158549/
[2]: https://github.com/openstack/oslo.i18n/commit/938eab963b9462959ee33d913214e697659ab98b
[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 /\/\ /\ >< `/
tests-fix-TypeError-message-for-Python-3.15.patch (text/x-diff, 1.6 KB)
From 938eab963b9462959ee33d913214e697659ab98b Mon Sep 17 00:00:00 2001
From: Steve Traylen <[email protected]>
Date: Fri, 5 Jun 2026 14:32:00 +0200
Subject: [PATCH] tests: fix TypeError message for Python 3.15

Python 3.15 improved printf-style formatting error messages
to include the argument count):

  "not enough arguments for format string (got 1)"

Only match the "not enough arguments for format string" part always.

Change-Id: I25872781dfaa239b72a75cc4345df1bca24fd702
Signed-off-by: Steve Traylen <[email protected]>
---
 oslo_i18n/tests/test_message.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/oslo_i18n/tests/test_message.py b/oslo_i18n/tests/test_message.py
index ee140d5..7d85c86 100644
--- a/oslo_i18n/tests/test_message.py
+++ b/oslo_i18n/tests/test_message.py
@@ -407,7 +407,7 @@ class MessageTestCase(test_base.BaseTestCase):
             self.assertEqual(default_translation, msg.translation('es'))
 
             self.assertEqual(1, len(w))
-            self.assertEqual(
+            self.assertIn(
                 "Failed to insert replacement values into "
                 "translated message A message in Spanish: %s %s "
                 "(Original: 'A message: %s'): "
@@ -446,7 +446,7 @@ class MessageTestCase(test_base.BaseTestCase):
             warnings.simplefilter("always")
             msg = msg % param
             self.assertEqual(1, len(w))
-            self.assertEqual(
+            self.assertIn(
                 "Failed to insert replacement values into "
                 "translated message A message in Spanish: %s %s "
                 "(Original: 'A message: %s'): "
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.