Skip to contentSkip to conversation

license.py: drop visit_Str

PATCH New [email protected] 1 participant 1 message Aug 29, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 license.py: drop visit_Str

From: Martin Jansa <[email protected]>

In https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=abc93390a3f19bc4cc159c5690a478b9e2270906
visit_Constant was added for compatibility with Python 3.8 and newer, but
visit_Str was kept, because at that time bitbake did require Python 3.6.

Now latest bitbake requires 3.9 and even version 2.4 used in mickledore builds requires 3.8 since:
https://git.openembedded.org/bitbake/commit/?h=2.4&id=744310f360d2288ac2ef07745abc86852126b5b9
so we can safely remove these.

---
 meta/lib/oe/license.py | 6 ------
 1 file changed, 6 deletions(-)
meta/lib/oe/license.py +0 -6
index ca779d3d83..bd28a247c9 100644
@@ -84,9 +84,6 @@ class FlattenVisitor(LicenseVisitor):
         self.licenses = []
         LicenseVisitor.__init__(self)
 
-    def visit_Str(self, node):
-        self.licenses.append(node.s)
-
     def visit_Constant(self, node):
         self.licenses.append(node.value)
 
@@ -240,9 +237,6 @@ class ListVisitor(LicenseVisitor):
     def __init__(self):
         self.licenses = set()
 
-    def visit_Str(self, node):
-        self.licenses.add(node.s)
-
     def visit_Constant(self, node):
         self.licenses.add(node.value)