Source: pyxdg
Version: 0.28-2
Severity: important
Tags: ftbfs patch
User:[email protected]
Usertags: python3.14

Hi Maintainer

pyxdg will FTBFS once Python 3.14 is added as a supported version in Debian.

The issue has been fixed upstream 
inhttps://gitlab.freedesktop.org/xdg/pyxdg/-/commit/9291d419

I've cherry-picked that patch for Ubuntu and I'm attaching the change as a 
debdiff

Cheers,
diff -Nru pyxdg-0.28/debian/changelog pyxdg-0.28/debian/changelog
--- pyxdg-0.28/debian/changelog 2022-12-11 07:16:54.000000000 +0100
+++ pyxdg-0.28/debian/changelog 2025-11-20 23:01:08.000000000 +0100
@@ -1,3 +1,10 @@
+pyxdg (0.28-3) UNRELEASED; urgency=medium
+
+  * debian/patches/git-python314-compat.patch:
+    - cherry pick an upstream fix for python 3.14
+
+ -- Sebastien Bacher <[email protected]>  Thu, 20 Nov 2025 23:01:08 +0100
+
 pyxdg (0.28-2) unstable; urgency=medium
 
   * Team upload
diff -Nru pyxdg-0.28/debian/patches/git-python314-compat.patch 
pyxdg-0.28/debian/patches/git-python314-compat.patch
--- pyxdg-0.28/debian/patches/git-python314-compat.patch        1970-01-01 
01:00:00.000000000 +0100
+++ pyxdg-0.28/debian/patches/git-python314-compat.patch        2025-11-20 
22:59:24.000000000 +0100
@@ -0,0 +1,41 @@
+From 9291d419017263c922869d79ac1fe8d423e5f929 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Sat, 31 May 2025 18:52:45 +0100
+Subject: [PATCH] Menu: handle Python 3.14 ast.Str changes
+
+ast.Str is gone and replaced by ast.Constant.
+---
+ xdg/Menu.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: pyxdg-0.28/xdg/Menu.py
+===================================================================
+--- pyxdg-0.28.orig/xdg/Menu.py        2025-11-20 22:59:24.057479564 +0100
++++ pyxdg-0.28/xdg/Menu.py     2025-11-20 22:59:24.077746392 +0100
+@@ -411,7 +411,7 @@
+     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 @@
+         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 @@
+         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()),
diff -Nru pyxdg-0.28/debian/patches/series pyxdg-0.28/debian/patches/series
--- pyxdg-0.28/debian/patches/series    2022-12-11 07:16:54.000000000 +0100
+++ pyxdg-0.28/debian/patches/series    2025-11-20 22:58:54.000000000 +0100
@@ -3,3 +3,4 @@
 test-Skip-mimetype-symlink-tests.patch
 Add-an-xdg-5-compatibility-layer.patch
 test-Use-importlib-instead-of-imp.patch
+git-python314-compat.patch

Reply via email to