From f6aa17c2dd82ffe8c37fd6bfea505d9e686b322d Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Mon, 23 Oct 2023 12:46:13 -0400 Subject: [PATCH] bitbake: codegen: cleanup deprecated AST usages This code is just completely dead as of Python 3.8, like the comment says. (Bitbake rev: 92be21cde6fa40d6ba5768bd09dcc77b2efe3df8) Signed-off-by: Chris Laplante Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- bitbake/lib/codegen.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/bitbake/lib/codegen.py b/bitbake/lib/codegen.py index 6955a7ada5..018b283177 100644 --- a/bitbake/lib/codegen.py +++ b/bitbake/lib/codegen.py @@ -392,19 +392,7 @@ class SourceGenerator(NodeVisitor): def visit_Name(self, node): self.write(node.id) - def visit_Str(self, node): - self.write(repr(node.s)) - - def visit_Bytes(self, node): - self.write(repr(node.s)) - - def visit_Num(self, node): - self.write(repr(node.n)) - def visit_Constant(self, node): - # Python 3.8 deprecated visit_Num(), visit_Str(), visit_Bytes(), - # visit_NameConstant() and visit_Ellipsis(). They can be removed once we - # require 3.8+. self.write(repr(node.value)) def visit_Tuple(self, node):