public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-aiohappyeyeballs] rawhide: Updated patch for Python 3.16 based on an open upstream PR
@ 2026-11-11 14:12 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-11-11 14:12 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-aiohappyeyeballs
Branch : rawhide
Commit : a8c844e3e561c8c9f2306f7ceececf655bb9f36c
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-11-11T14:10:35+00:00
Stats : +46/-59 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/python-aiohappyeyeballs/c/a8c844e3e561c8c9f2306f7ceececf655bb9f36c?branch=rawhide
Log:
Updated patch for Python 3.16 based on an open upstream PR
---
diff --git a/0001-Downstream-only-remove-pytest-options-for-coverage-a.patch b/0001-Downstream-only-remove-pytest-options-for-coverage-a.patch
index 8fb7cd5..b8f2f0b 100644
--- a/0001-Downstream-only-remove-pytest-options-for-coverage-a.patch
+++ b/0001-Downstream-only-remove-pytest-options-for-coverage-a.patch
@@ -1,8 +1,7 @@
From 7fa9b58c7ccde5c9da2130f78eb8c5100ca28166 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sat, 17 Aug 2024 11:02:13 -0400
-Subject: [PATCH 1/2] Downstream-only: remove pytest options for coverage
- analysis
+Subject: [PATCH] Downstream-only: remove pytest options for coverage analysis
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
---
diff --git a/0002-Do-not-restore-the-default-event-loop-policy-in-test.patch b/0002-Do-not-restore-the-default-event-loop-policy-in-test.patch
deleted file mode 100644
index 5823e01..0000000
--- a/0002-Do-not-restore-the-default-event-loop-policy-in-test.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0313a16e430916765433c90f4108a6b080b9ae9e Mon Sep 17 00:00:00 2001
-From: "Benjamin A. Beasley" <code@musicinmybrain.net>
-Date: Fri, 6 Nov 2026 05:58:41 +0000
-Subject: [PATCH 2/2] Do not restore the default event loop policy in test
- module teardowns
-
-The event loop policy system, deprecated since Python 3.14, is removed
-in Python 3.16. See https://docs.python.org/dev/whatsnew/3.16.html#id3.
-
-Fixes #266.
----
- tests/test_staggered_cpython.py | 4 ----
- tests/test_staggered_cpython_eager_task_factory.py | 4 ----
- 2 files changed, 8 deletions(-)
-
-diff --git a/tests/test_staggered_cpython.py b/tests/test_staggered_cpython.py
-index f41038c..ede10fa 100644
---- a/tests/test_staggered_cpython.py
-+++ b/tests/test_staggered_cpython.py
-@@ -11,10 +11,6 @@ import unittest
- from aiohappyeyeballs._staggered import staggered_race
-
-
--def tearDownModule():
-- asyncio.set_event_loop_policy(None)
--
--
- class StaggeredTests(unittest.IsolatedAsyncioTestCase):
- async def test_empty(self):
- winner, index, excs = await staggered_race(
-diff --git a/tests/test_staggered_cpython_eager_task_factory.py b/tests/test_staggered_cpython_eager_task_factory.py
-index 8d3cf28..6809b4a 100644
---- a/tests/test_staggered_cpython_eager_task_factory.py
-+++ b/tests/test_staggered_cpython_eager_task_factory.py
-@@ -12,10 +12,6 @@ import unittest
- from aiohappyeyeballs._staggered import staggered_race
-
-
--def tearDownModule():
-- asyncio.set_event_loop_policy(None)
--
--
- class EagerTaskFactoryLoopTests(unittest.TestCase):
- def close_loop(self, loop):
- loop.close()
---
-2.56.0
-
diff --git a/270.patch b/270.patch
new file mode 100644
index 0000000..d822d99
--- /dev/null
+++ b/270.patch
@@ -0,0 +1,42 @@
+From 7f01087cadc2afe7f371cc77ba15989008dd5f13 Mon Sep 17 00:00:00 2001
+From: Abhinav Maurya <owner@wegenz.in>
+Date: Sat, 7 Nov 2026 14:06:09 +0530
+Subject: [PATCH] test: handle event loop policy removal in Python 3.16
+
+---
+ tests/test_staggered_cpython.py | 5 ++++-
+ tests/test_staggered_cpython_eager_task_factory.py | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_staggered_cpython.py b/tests/test_staggered_cpython.py
+index f41038c..09a4488 100644
+--- a/tests/test_staggered_cpython.py
++++ b/tests/test_staggered_cpython.py
+@@ -12,7 +12,10 @@
+
+
+ def tearDownModule():
+- asyncio.set_event_loop_policy(None)
++ if hasattr(asyncio, "set_event_loop_policy"):
++ asyncio.set_event_loop_policy(None)
++ else:
++ asyncio.set_event_loop(None)
+
+
+ class StaggeredTests(unittest.IsolatedAsyncioTestCase):
+diff --git a/tests/test_staggered_cpython_eager_task_factory.py b/tests/test_staggered_cpython_eager_task_factory.py
+index 8d3cf28..e886d1e 100644
+--- a/tests/test_staggered_cpython_eager_task_factory.py
++++ b/tests/test_staggered_cpython_eager_task_factory.py
+@@ -13,7 +13,10 @@
+
+
+ def tearDownModule():
+- asyncio.set_event_loop_policy(None)
++ if hasattr(asyncio, "set_event_loop_policy"):
++ asyncio.set_event_loop_policy(None)
++ else:
++ asyncio.set_event_loop(None)
+
+
+ class EagerTaskFactoryLoopTests(unittest.TestCase):
diff --git a/python-aiohappyeyeballs.spec b/python-aiohappyeyeballs.spec
index eb505b6..1be4b45 100644
--- a/python-aiohappyeyeballs.spec
+++ b/python-aiohappyeyeballs.spec
@@ -12,20 +12,14 @@ Source: %{url}/archive/v%{version}/aiohappyeyeballs-%{version}.tar.gz
# Downstream-only: remove pytest options for coverage analysis
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
Patch: 0001-Downstream-only-remove-pytest-options-for-coverage-a.patch
-# Do not restore the default event loop policy in test module teardowns
-#
-# The event loop policy system, deprecated since Python 3.14, is removed
-# in Python 3.16. See https://docs.python.org/dev/whatsnew/3.16.html#id3.
+# test: handle event loop policy removal in Python 3.16
+# https://github.com/aio-libs/aiohappyeyeballs/pull/270
#
# Fixes:
#
# Tests affected by event loop policy system removal in Python 3.16
# https://github.com/aio-libs/aiohappyeyeballs/issues/266
-#
-# Raised as a potential solution in the upstream issue, but not yet offered as
-# a PR because feedback is wanted. Still, this is good enough for a downstream
-# patch.
-Patch: 0002-Do-not-restore-the-default-event-loop-policy-in-test.patch
+Patch: %{url}/pull/270.patch
BuildSystem: pyproject
BuildOption(install): --assert-license aiohappyeyeballs
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-11 14:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 14:12 [rpms/python-aiohappyeyeballs] rawhide: Updated patch for Python 3.16 based on an open upstream PR Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox