Updated patch without the Ubuntu change to debian/control
diff -Nru lirc-0.10.2/debian/changelog lirc-0.10.2/debian/changelog
--- lirc-0.10.2/debian/changelog        2024-11-27 02:31:50.000000000 +0100
+++ lirc-0.10.2/debian/changelog        2026-03-07 08:18:52.000000000 +0100
@@ -1,3 +1,10 @@
+lirc (0.10.2-0.11) unstable; urgency=medium
+
+  * debian/patches/new-python-event-loop-error.patch:
+    - fix the build with python 3.14, patch from Fedora
+
+ -- Sebastien Bacher <[email protected]>  Sat, 07 Mar 2026 08:18:52 +0100
+
 lirc (0.10.2-0.10) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru lirc-0.10.2/debian/patches/new-python-event-loop-error.patch 
lirc-0.10.2/debian/patches/new-python-event-loop-error.patch
--- lirc-0.10.2/debian/patches/new-python-event-loop-error.patch        
1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.10.2/debian/patches/new-python-event-loop-error.patch        
2026-03-07 08:18:26.000000000 +0100
@@ -0,0 +1,33 @@
+From c9fe0e691a50854be864f6198906d245a855aa52 Mon Sep 17 00:00:00 2001
+From: Sean Young <[email protected]>
+Date: Thu, 26 Jun 2025 21:11:11 +0100
+Subject: [PATCH] asyncio.get_event_loop() can return an error in python 3.14
+
+---
+ python-pkg/tests/test_client.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/python-pkg/tests/test_client.py b/python-pkg/tests/test_client.py
+index cb47aa67..ed613d4f 100644
+--- a/python-pkg/tests/test_client.py
++++ b/python-pkg/tests/test_client.py
+@@ -54,10 +54,16 @@ def event_loop(suppress=[]):
+                 return
+         ex.append(context['exception'])
+ 
+-    loop = asyncio.get_event_loop()
++    try:
++        loop = asyncio.get_running_loop()
++    except RuntimeError:
++        loop = asyncio.new_event_loop()
++        asyncio.set_event_loop(loop)
++
+     if loop.is_closed():
+         loop = asyncio.new_event_loop()
+         asyncio.set_event_loop(loop)
++
+     loop.set_exception_handler(exception_handler)
+ 
+     try:
+-- 
+2.50.0
diff -Nru lirc-0.10.2/debian/patches/series lirc-0.10.2/debian/patches/series
--- lirc-0.10.2/debian/patches/series   2024-11-27 02:31:50.000000000 +0100
+++ lirc-0.10.2/debian/patches/series   2026-03-07 08:18:52.000000000 +0100
@@ -9,3 +9,4 @@
 include_media_lirc.h.diff
 fix-ftbfs-32bit-arches-64bit-time_t.patch
 python-dist-packages.patch
+new-python-event-loop-error.patch

Reply via email to