From 1a3f01cad47b67fe326bc690103bf347f587f99a Mon Sep 17 00:00:00 2001 From: Adrian Freihofer Date: Sat, 10 Feb 2024 14:15:55 +0100 Subject: bitbake: bitbake/lib/bs4/tests/test_tree.py: 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. (Bitbake rev: a5f1bc69ef2e456bd163303a07cfb73825b01576) Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie --- bitbake/lib/bs4/tests/test_tree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bs4/tests/test_tree.py b/bitbake/lib/bs4/tests/test_tree.py index 8e5c66426e..cf0f1abe0c 100644 --- a/bitbake/lib/bs4/tests/test_tree.py +++ b/bitbake/lib/bs4/tests/test_tree.py @@ -585,7 +585,7 @@ class SiblingTest(TreeTest): ''' # All that whitespace looks good but makes the tests more # difficult. Get rid of it. - markup = re.compile("\n\s*").sub("", markup) + markup = re.compile(r"\n\s*").sub("", markup) self.tree = self.soup(markup) -- cgit v1.2.3-54-g00ecf