Debian Codegraph @

debian/patches/py314.patch

raw
1 From: Sam James <[email protected]>
2 Date: Sat, 31 May 2025 18:52:45 +0100
3 Subject: Menu: handle Python 3.14 ast.Str changes
4
5 ast.Str is gone and replaced by ast.Constant.
6
7 Origin: upstream, https://gitlab.freedesktop.org/xdg/pyxdg/-/commit/9291d419017263c922869d79ac1fe8d423e5f929
8 Bug-Debian: https://bugs.debian.org/1121095
9 Last-Update: 2025-11-30
10 ---
11 xdg/Menu.py | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
13
14 diff --git a/xdg/Menu.py b/xdg/Menu.py
15 index 1ec9e28..3d4f3b8 100644
16 --- a/xdg/Menu.py
17 +++ b/xdg/Menu.py
18 @@ -411,7 +411,7 @@ class Rule:
19 def fromFilename(cls, type, filename):
20 tree = ast.Expression(
21 body=ast.Compare(
22 - left=ast.Str(filename),
23 + left=ast.Constant(filename),
24 ops=[ast.Eq()],
25 comparators=[ast.Attribute(
26 value=ast.Name(id='menuentry', ctx=ast.Load()),
27 @@ -808,7 +808,7 @@ class XMLMenuBuilder(object):
28 elif tag == 'Category':
29 category = node.text
30 return ast.Compare(
31 - left=ast.Str(category),
32 + left=ast.Constant(category),
33 ops=[ast.In()],
34 comparators=[ast.Attribute(
35 value=ast.Name(id='menuentry', ctx=ast.Load()),
36 @@ -819,7 +819,7 @@ class XMLMenuBuilder(object):
37 elif tag == 'Filename':
38 filename = node.text
39 return ast.Compare(
40 - left=ast.Str(filename),
41 + left=ast.Constant(filename),
42 ops=[ast.Eq()],
43 comparators=[ast.Attribute(
44 value=ast.Name(id='menuentry', ctx=ast.Load()),