From: Steve Sakoman <steve@sakoman.com>
To: bitbake-devel@lists.openembedded.org
Subject: [bitbake][kirkstone][2.0][PATCH 1/6] codeparser: replace deprecated ast.Str and 's'
Date: Tue, 27 Feb 2024 12:04:20 -1000 [thread overview]
Message-ID: <4591011449212c8e494ea42348acb2d27a82a51b.1709071317.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1709071317.git.steve@sakoman.com>
From: Chris Laplante <chris.laplante@agilent.com>
These have been deprecated since 3.8
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
lib/bb/codeparser.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py
index 9d66d3ae4..bb890dddd 100644
--- a/lib/bb/codeparser.py
+++ b/lib/bb/codeparser.py
@@ -225,8 +225,8 @@ class PythonParser():
def visit_Call(self, node):
name = self.called_node_name(node.func)
if name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs or name in self.containsanyfuncs):
- if isinstance(node.args[0], ast.Str):
- varname = node.args[0].s
+ if isinstance(node.args[0], ast.Constant) and isinstance(node.args[0].value, str):
+ varname = node.args[0].value
if name in self.containsfuncs and isinstance(node.args[1], ast.Str):
if varname not in self.contains:
self.contains[varname] = set()
--
2.34.1
next prev parent reply other threads:[~2024-02-27 22:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 22:04 [bitbake][kirkstone][2.0][PATCH 0/6] Patch review Steve Sakoman
2024-02-27 22:04 ` Steve Sakoman [this message]
2024-02-27 22:04 ` [bitbake][kirkstone][2.0][PATCH 2/6] bitbake/codeparser.py: address ast module deprecations in py 3.12 Steve Sakoman
2024-02-27 22:04 ` [bitbake][kirkstone][2.0][PATCH 3/6] bitbake/lib/bs4/tests/test_tree.py: python 3.12 regex Steve Sakoman
2024-02-27 22:04 ` [bitbake][kirkstone][2.0][PATCH 4/6] tests/fetch: git-lfs restore _find_git_lfs Steve Sakoman
2024-02-27 22:04 ` [bitbake][kirkstone][2.0][PATCH 5/6] tests/fetch: Add real git lfs tests and decorator Steve Sakoman
2024-02-27 22:04 ` [bitbake][kirkstone][2.0][PATCH 6/6] fetch2: Ensure that git LFS objects are available Steve Sakoman
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=4591011449212c8e494ea42348acb2d27a82a51b.1709071317.git.steve@sakoman.com \
--to=steve@sakoman.com \
--cc=bitbake-devel@lists.openembedded.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).