Package: src:pypdf
Version: 6.9.2-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 pypdf fails to build from source [1].

Upstream's commit 96ee6d5d6431396c0e88383fc338ce966b829d89 [2] updates
the tests to support Python 3.15.

I applied the upstream fix in the sandbox [3] to be able to build the
packages that depend on pypdf, 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/4421257/
[2]: 
https://github.com/py-pdf/pypdf/pull/3793/changes/96ee6d5d6431396c0e88383fc338ce966b829d89
[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 96ee6d5d6431396c0e88383fc338ce966b829d89 Mon Sep 17 00:00:00 2001
From: stefan6419846 <[email protected]>
Date: Thu, 21 May 2026 13:06:31 +0200
Subject: [PATCH] TST: Update tests for support Python 3.15

---
 tests/test_cmap.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Index: pypdf/tests/test_cmap.py
===================================================================
--- pypdf.orig/tests/test_cmap.py
+++ pypdf/tests/test_cmap.py
@@ -1,4 +1,5 @@
 """Test the pypdf_cmap module."""
+import sys
 from io import BytesIO
 
 import pytest
@@ -291,7 +292,10 @@ def test_binascii_odd_length_string(capl
 
     page = reader.pages[0]
     assert "\n(Many other theorems may\n" in page.extract_text()
-    assert "Skipping broken line b'143f   143f   10300': Odd-length string\n" in caplog.text
+    if sys.version_info >= (3, 15):
+        assert "Skipping broken line b'143f   143f   10300': Odd number of hexadecimal digits\n" in caplog.text
+    else:
+        assert "Skipping broken line b'143f   143f   10300': Odd-length string\n" in caplog.text
 
 
 @pytest.mark.enable_socket
@@ -335,7 +339,10 @@ def test_parse_bfchar(caplog):
 
     assert map_dict == {-1: 2, "ծ": "", "վ": "ጷ"}
     assert int_entry == [1406, 1390]
-    assert caplog.messages == ["Got invalid hex string: Odd-length string (b'1f310')"]
+    if sys.version_info >= (3, 15):
+        assert caplog.messages == ["Got invalid hex string: Odd number of hexadecimal digits (b'1f310')"]
+    else:
+        assert caplog.messages == ["Got invalid hex string: Odd-length string (b'1f310')"]
 
 
 def test_parse_bfrange__iteration_limit():

Reply via email to