forked from pool/python-autocommand
Compare commits
2 Commits
Author | SHA256 | Date | |
---|---|---|---|
f1fabe09e3 | |||
df8658937a |
28
py314.patch
Normal file
28
py314.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 70ea508aedcc72a19d992a2fa33c34fb3930b577 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Tue, 27 May 2025 21:36:55 +0200
|
||||
Subject: [PATCH] Fix tests for Python 3.14+
|
||||
|
||||
asyncio.get_event_loop() now raises when there is no event loop.
|
||||
|
||||
Fixes https://github.com/Lucretiel/autocommand/issues/39
|
||||
---
|
||||
test/test_autoasync.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/test_autoasync.py b/test/test_autoasync.py
|
||||
index 02a820a..c98923e 100644
|
||||
--- a/test/test_autoasync.py
|
||||
+++ b/test/test_autoasync.py
|
||||
@@ -32,7 +32,10 @@ def temporary_context_loop(loop):
|
||||
Set the given loop as the context loop (that is, the loop returned by
|
||||
asyncio.get_event_loop() for the duration of the context)
|
||||
'''
|
||||
- old_loop = asyncio.get_event_loop()
|
||||
+ try:
|
||||
+ old_loop = asyncio.get_event_loop()
|
||||
+ except RuntimeError:
|
||||
+ old_loop = None
|
||||
asyncio.set_event_loop(loop)
|
||||
try:
|
||||
yield loop
|
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 8 12:51:14 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add py314.patch to fix tests with Python 3.14
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 22 13:12:16 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-autocommand
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -26,6 +26,8 @@ URL: https://github.com/Lucretiel/autocommand
|
||||
Source: https://files.pythonhosted.org/packages/source/a/autocommand/autocommand-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM setuptools-dynamic-license.patch gh#Lucretiel/autocommand#31
|
||||
Patch0: setuptools-dynamic-license.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/Lucretiel/autocommand/pull/40 Fix tests for Python 3.14+
|
||||
Patch1: py314.patch
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
|
Reference in New Issue
Block a user