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: 7efed7bc09c56e41d3074a26388581a62f145625)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Adrian Freihofer authored and Steve Sakoman committed 2024-03-01 08:00:58 -10:00
1 parent d4ad54a401
commit d1299791a5
1 file changed
+1 -1
+1 -1
View File
@@ -585,7 +585,7 @@ class SiblingTest(TreeTest):
</html>'''
# 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)