public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-asn1tools] f44: Fix for Python 3.15
@ 2026-08-31 13:14 Peter Lemenkov
  0 siblings, 0 replies; only message in thread
From: Peter Lemenkov @ 2026-08-31 13:14 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-asn1tools
            Branch : f44
            Commit : 2c0d8d9fa0b5ccadc8246ed835eba9b1c46d64e5
            Author : Peter Lemenkov <lemenkov@gmail.com>
            Date   : 2026-04-15T15:31:28+02:00
            Stats  : +31/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-asn1tools/c/2c0d8d9fa0b5ccadc8246ed835eba9b1c46d64e5?branch=f44

            Log:
            Fix for Python 3.15

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

---
diff --git a/python-asn1tools-0001-Fix-test-compatibility-with-Python-3.15.patch b/python-asn1tools-0001-Fix-test-compatibility-with-Python-3.15.patch
new file mode 100644
index 0000000..7fa79af
--- /dev/null
+++ b/python-asn1tools-0001-Fix-test-compatibility-with-Python-3.15.patch
@@ -0,0 +1,29 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Wed, 15 Apr 2026 15:29:23 +0200
+Subject: [PATCH] Fix test compatibility with Python 3.15
+
+Python 3.15 changed the error message raised by binascii.unhexlify() for
+odd-length hex strings from "Odd-length string" to "Odd number of
+hexadecimal digits". Update the test expectation accordingly.
+
+Resolves: rhbz#2458660
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Assisted-by: Claude (Anthropic) <https://claude.ai>
+
+diff --git a/tests/test_command_line.py b/tests/test_command_line.py
+index d594dee..b9bd177 100644
+--- a/tests/test_command_line.py
++++ b/tests/test_command_line.py
+@@ -440,8 +440,8 @@ ff0e0201011609497320312b313d333f
+                 with self.assertRaises(SystemExit) as cm:
+                     asn1tools._main()
+ 
+-                self.assertEqual(str(cm.exception),
+-                                 "error: '012': Odd-length string")
++                self.assertRegex(str(cm.exception),
++                                 r"error: '012': Odd.*(length string|number of hexadecimal digits)")
+ 
+     def test_command_line_convert_py(self):
+         # Preparations.

diff --git a/python-asn1tools.spec b/python-asn1tools.spec
index a3c2a93..1801538 100644
--- a/python-asn1tools.spec
+++ b/python-asn1tools.spec
@@ -8,7 +8,8 @@ Summary:       ASN.1 parsing, encoding and decoding
 License:       MIT
 URL:           https://github.com/eerimoq/%{pypi_name}
 VCS:           git:%{url}.git
-Source0:       %{pypi_source %{pypi_name}}
+Source:        %{pypi_source %{pypi_name}}
+Patch:         python-asn1tools-0001-Fix-test-compatibility-with-Python-3.15.patch
 BuildRequires: python3-diskcache
 BuildRequires: python3-prompt-toolkit
 BuildRequires: python3-pytest

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

only message in thread, other threads:[~2026-08-31 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 13:14 [rpms/python-asn1tools] f44: Fix for Python 3.15 Peter Lemenkov

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