public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-aiohappyeyeballs] rawhide: Patch tests for Python 3.16
Date: Fri, 06 Nov 2026 06:13:27 GMT [thread overview]
Message-ID: <179394560732.1.17724496626736844183.rpms-python-aiohappyeyeballs-ed9962a0422a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-aiohappyeyeballs
Branch : rawhide
Commit : ed9962a0422a354576a85bb8f22a2f830ca262ea
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-11-06T06:05:21+00:00
Stats : +68/-5 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-aiohappyeyeballs/c/ed9962a0422a354576a85bb8f22a2f830ca262ea?branch=rawhide
Log:
Patch tests for Python 3.16
---
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 1933bb8..8fb7cd5 100644
--- a/0001-Downstream-only-remove-pytest-options-for-coverage-a.patch
+++ b/0001-Downstream-only-remove-pytest-options-for-coverage-a.patch
@@ -1,7 +1,8 @@
-From af5511bd42ac6c8ad6827d8eb8539276affcc31c Mon Sep 17 00:00:00 2001
+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] Downstream-only: remove pytest options for coverage analysis
+Subject: [PATCH 1/2] Downstream-only: remove pytest options for coverage
+ analysis
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
---
@@ -9,10 +10,10 @@ https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
-index 554d949..268a62f 100644
+index 342f40a..effc8e0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
-@@ -80,7 +80,7 @@ match = "(?!main$)"
+@@ -88,7 +88,7 @@ match = "(?!main$)"
prerelease = true
[tool.pytest.ini_options]
@@ -22,5 +23,5 @@ index 554d949..268a62f 100644
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
--
-2.48.1
+2.56.0
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
new file mode 100644
index 0000000..5823e01
--- /dev/null
+++ b/0002-Do-not-restore-the-default-event-loop-policy-in-test.patch
@@ -0,0 +1,48 @@
+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/python-aiohappyeyeballs.spec b/python-aiohappyeyeballs.spec
index 798f9b4..eb505b6 100644
--- a/python-aiohappyeyeballs.spec
+++ b/python-aiohappyeyeballs.spec
@@ -12,6 +12,20 @@ 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.
+#
+# 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
BuildSystem: pyproject
BuildOption(install): --assert-license aiohappyeyeballs
reply other threads:[~2026-11-06 6:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179394560732.1.17724496626736844183.rpms-python-aiohappyeyeballs-ed9962a0422a@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox