From: Sam James Date: Sat, 31 May 2025 18:52:45 +0100 Subject: Menu: handle Python 3.14 ast.Str changes ast.Str is gone and replaced by ast.Constant. Origin: upstream, https://gitlab.freedesktop.org/xdg/pyxdg/-/commit/9291d419017263c922869d79ac1fe8d423e5f929 Bug-Debian: https://bugs.debian.org/1121095 Last-Update: 2025-11-30 --- xdg/Menu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xdg/Menu.py b/xdg/Menu.py index 1ec9e28..3d4f3b8 100644 --- a/xdg/Menu.py +++ b/xdg/Menu.py @@ -411,7 +411,7 @@ class Rule: def fromFilename(cls, type, filename): tree = ast.Expression( body=ast.Compare( - left=ast.Str(filename), + left=ast.Constant(filename), ops=[ast.Eq()], comparators=[ast.Attribute( value=ast.Name(id='menuentry', ctx=ast.Load()), @@ -808,7 +808,7 @@ class XMLMenuBuilder(object): elif tag == 'Category': category = node.text return ast.Compare( - left=ast.Str(category), + left=ast.Constant(category), ops=[ast.In()], comparators=[ast.Attribute( value=ast.Name(id='menuentry', ctx=ast.Load()), @@ -819,7 +819,7 @@ class XMLMenuBuilder(object): elif tag == 'Filename': filename = node.text return ast.Compare( - left=ast.Str(filename), + left=ast.Constant(filename), ops=[ast.Eq()], comparators=[ast.Attribute( value=ast.Name(id='menuentry', ctx=ast.Load()),