From fe58da13930638037283f9a96fc103835b15f919 Mon Sep 17 00:00:00 2001 From: Adrian Freihofer Date: Sat, 10 Feb 2024 14:15:58 +0100 Subject: meta/lib/patchtest: python 3.12 regex Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 329a555f7b8f00c648c44b01f423e6da33a46245) Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie --- meta/lib/patchtest/tests/base.py | 4 ++-- meta/lib/patchtest/utils.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'meta/lib') diff --git a/meta/lib/patchtest/tests/base.py b/meta/lib/patchtest/tests/base.py index aecbbc4aae..424e61b5be 100644 --- a/meta/lib/patchtest/tests/base.py +++ b/meta/lib/patchtest/tests/base.py @@ -34,8 +34,8 @@ class PatchtestOEError(Exception): class Base(unittest.TestCase): # if unit test fails, fail message will throw at least the following JSON: {"id": } - endcommit_messages_regex = re.compile('\(From \w+-\w+ rev:|(?