forked from pool/python312
Fix patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=134
This commit is contained in:
@@ -17,14 +17,14 @@ with _PyUnicode_DecodeUnicodeEscapeInternal().
|
||||
Include/internal/pycore_unicodeobject.h | 16 +++
|
||||
Lib/test/test_codeccallbacks.py | 39 +++++++
|
||||
Lib/test/test_codecs.py | 52 ++++++++--
|
||||
Lib/test/test_codeop.py | 2
|
||||
Lib/test/test_codeop.py | 4
|
||||
Lib/test/test_string_literals.py | 8 -
|
||||
Lib/test/test_unparse.py | 2
|
||||
Misc/NEWS.d/next/Security/2025-05-09-20-22-54.gh-issue-133767.kN2i3Q.rst | 2
|
||||
Objects/bytesobject.c | 43 ++++----
|
||||
Objects/unicodeobject.c | 46 +++++---
|
||||
Parser/string_parser.c | 32 +++---
|
||||
11 files changed, 181 insertions(+), 66 deletions(-)
|
||||
11 files changed, 182 insertions(+), 67 deletions(-)
|
||||
|
||||
Index: Python-3.12.10/Include/internal/pycore_bytesobject.h
|
||||
===================================================================
|
||||
@@ -231,13 +231,15 @@ 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-19 06:18:55.725935227 +0000
|
||||
@@ -282,7 +282,7 @@
|
||||
+++ Python-3.12.10/Lib/test/test_codeop.py 2025-05-19 14:39:26.700464317 +0000
|
||||
@@ -281,8 +281,8 @@
|
||||
def test_warning(self):
|
||||
# Test that the warning is only returned once.
|
||||
with warnings_helper.check_warnings(
|
||||
('"is" with \'str\' literal', SyntaxWarning),
|
||||
- ('"is" with \'str\' literal', SyntaxWarning),
|
||||
- ("invalid escape sequence", SyntaxWarning),
|
||||
+ ('invalid escape sequence', SyntaxWarning),
|
||||
+ (r'"is" with.*literal', SyntaxWarning),
|
||||
+ (r'invalid escape sequence', SyntaxWarning),
|
||||
) as w:
|
||||
compile_command(r"'\e' is 0")
|
||||
self.assertEqual(len(w.warnings), 2)
|
||||
|
||||
Reference in New Issue
Block a user