From b179411cca378b72bc582d5eea477dd3431edea19d036d004be0090246b7e04f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 19 May 2025 06:20:12 +0000 Subject: [PATCH] Fix patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=133 --- CVE-2025-4516-DecodeError-handler.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CVE-2025-4516-DecodeError-handler.patch b/CVE-2025-4516-DecodeError-handler.patch index cf91b34..4a78d69 100644 --- a/CVE-2025-4516-DecodeError-handler.patch +++ b/CVE-2025-4516-DecodeError-handler.patch @@ -136,7 +136,7 @@ Index: Python-3.12.10/Lib/test/test_codeccallbacks.py Index: Python-3.12.10/Lib/test/test_codecs.py =================================================================== --- Python-3.12.10.orig/Lib/test/test_codecs.py 2025-05-17 12:00:00.357214034 +0000 -+++ Python-3.12.10/Lib/test/test_codecs.py 2025-05-19 00:48:39.370396727 +0000 ++++ Python-3.12.10/Lib/test/test_codecs.py 2025-05-19 06:18:25.842127040 +0000 @@ -1196,23 +1196,39 @@ check(br"[\1010]", b"[A0]") check(br"[\x41]", b"[A]") @@ -173,10 +173,10 @@ Index: Python-3.12.10/Lib/test/test_codecs.py check(rb'\%o' % i, bytes([i & 0o377])) + with self.assertWarnsRegex(DeprecationWarning, -+ r'"\\z" is an invalid escape sequence'): ++ r'invalid escape sequence'): + self.assertEqual(decode(br'\x\z', 'ignore'), (b'\\z', 4)) + with self.assertWarnsRegex(DeprecationWarning, -+ r'"\\501" is an invalid octal escape sequence'): ++ r'invalid octal escape sequence'): + self.assertEqual(decode(br'\x\501', 'ignore'), (b'A', 6)) + def test_errors(self): @@ -219,10 +219,10 @@ Index: Python-3.12.10/Lib/test/test_codecs.py check(rb'\%o' % i, chr(i)) + with self.assertWarnsRegex(DeprecationWarning, -+ r'"\\z" is an invalid escape sequence'): ++ r'invalid escape sequence'): + self.assertEqual(decode(br'\x\z', 'ignore'), ('\\z', 4)) + with self.assertWarnsRegex(DeprecationWarning, -+ r'"\\501" is an invalid octal escape sequence'): ++ r'invalid octal escape sequence'): + self.assertEqual(decode(br'\x\501', 'ignore'), ('\u0141', 6)) + def test_decode_errors(self): @@ -231,13 +231,13 @@ Index: Python-3.12.10/Lib/test/test_codecs.py Index: Python-3.12.10/Lib/test/test_codeop.py =================================================================== --- Python-3.12.10.orig/Lib/test/test_codeop.py 2025-05-17 12:00:00.359727062 +0000 -+++ Python-3.12.10/Lib/test/test_codeop.py 2025-05-18 18:20:04.585744723 +0000 ++++ Python-3.12.10/Lib/test/test_codeop.py 2025-05-19 06:18:55.725935227 +0000 @@ -282,7 +282,7 @@ # Test that the warning is only returned once. with warnings_helper.check_warnings( ('"is" with \'str\' literal', SyntaxWarning), - ("invalid escape sequence", SyntaxWarning), -+ ('"\\\\e" is an invalid escape sequence', SyntaxWarning), ++ ('invalid escape sequence', SyntaxWarning), ) as w: compile_command(r"'\e' is 0") self.assertEqual(len(w.warnings), 2)