($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Adrian Freihofer <adrian.freihofer@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@gmail.com>,
	Adrian Freihofer <adrian.freihofer@siemens.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: [2.0][kirkstone][PATCH 3/3] bitbake/lib/bs4/tests/test_tree.py: python 3.12 regex
Date: Thu, 15 Feb 2024 21:44:52 +0100	[thread overview]
Message-ID: <20240215204524.320874-4-adrian.freihofer@siemens.com> (raw)
In-Reply-To: <20240215204524.320874-1-adrian.freihofer@siemens.com>

From: Adrian Freihofer <adrian.freihofer@gmail.com>

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.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bs4/tests/test_tree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bs4/tests/test_tree.py b/lib/bs4/tests/test_tree.py
index 8e5c6642..cf0f1abe 100644
--- a/lib/bs4/tests/test_tree.py
+++ b/lib/bs4/tests/test_tree.py
@@ -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)
 
 
-- 
2.43.1



      parent reply	other threads:[~2024-02-15 20:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 20:44 [2.0][kirkstone][PATCH 0/3] pick python 3.12 fixes Adrian Freihofer
2024-02-15 20:44 ` [2.0][kirkstone][PATCH 1/3] codeparser: replace deprecated ast.Str and 's' Adrian Freihofer
2024-02-15 20:44 ` [2.0][kirkstone][PATCH 2/3] bitbake/codeparser.py: address ast module deprecations in py 3.12 Adrian Freihofer
2024-02-15 20:44 ` Adrian Freihofer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240215204524.320874-4-adrian.freihofer@siemens.com \
    --to=adrian.freihofer@gmail.com \
    --cc=adrian.freihofer@siemens.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).