From 76cc36aa694a3e25626d99a64e10e76838bb627799ef078c0dff63e0d0dcf488 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 11 Nov 2025 12:06:48 +1100 Subject: [PATCH] - Refresh patch py314-fix-tests.patch * Ignore DeprecationWarning about asyncio event loop policies. --- py314-fix-tests.patch | 43 ++++++++++++++++++++++++++++---- python-pytest-subprocess.changes | 6 +++++ 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/py314-fix-tests.patch b/py314-fix-tests.patch index d092dbd..8b5ee6e 100644 --- a/py314-fix-tests.patch +++ b/py314-fix-tests.patch @@ -8,16 +8,16 @@ This is basically a followup of https://github.com/aklajnert/pytest-subprocess/p tests/test_examples.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) -diff --git a/tests/test_examples.py b/tests/test_examples.py -index 5a27604..df849f3 100644 ---- a/tests/test_examples.py -+++ b/tests/test_examples.py +Index: pytest-subprocess-1.5.3/tests/test_examples.py +=================================================================== +--- pytest-subprocess-1.5.3.orig/tests/test_examples.py ++++ pytest-subprocess-1.5.3/tests/test_examples.py @@ -1,3 +1,4 @@ +import sys from pathlib import Path import pytest -@@ -39,18 +40,21 @@ def test_documentation(testdir, rst_file): +@@ -39,18 +40,21 @@ def test_documentation(testdir, rst_file " os.chdir(os.path.dirname(__file__))\n\n" ) @@ -51,3 +51,36 @@ index 5a27604..df849f3 100644 code_blocks = "\n".join(get_code_blocks(ROOT_DIR / rst_file)) testdir.makepyfile( +Index: pytest-subprocess-1.5.3/tests/test_asyncio.py +=================================================================== +--- pytest-subprocess-1.5.3.orig/tests/test_asyncio.py ++++ pytest-subprocess-1.5.3/tests/test_asyncio.py +@@ -2,6 +2,7 @@ import asyncio + import os + import sys + import time ++import warnings + + import anyio + import pytest +@@ -13,12 +14,14 @@ PYTHON = sys.executable + + @pytest.fixture() + def event_loop_policy(request): +- if sys.platform.startswith("win"): +- if request.node.name.startswith("test_invalid_event_loop"): +- return asyncio.WindowsSelectorEventLoopPolicy() +- else: +- return asyncio.WindowsProactorEventLoopPolicy() +- return asyncio.DefaultEventLoopPolicy() ++ with warnings.catch_warnings(): ++ warnings.simplefilter('ignore', DeprecationWarning) ++ if sys.platform.startswith("win"): ++ if request.node.name.startswith("test_invalid_event_loop"): ++ return asyncio.WindowsSelectorEventLoopPolicy() ++ else: ++ return asyncio.WindowsProactorEventLoopPolicy() ++ return asyncio.DefaultEventLoopPolicy() + + + if sys.platform.startswith("win") and sys.version_info < (3, 8): diff --git a/python-pytest-subprocess.changes b/python-pytest-subprocess.changes index 6764c32..a487cdf 100644 --- a/python-pytest-subprocess.changes +++ b/python-pytest-subprocess.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 11 00:43:47 UTC 2025 - Steve Kowalik + +- Refresh patch py314-fix-tests.patch: + * Ignore DeprecationWarning about asyncio event loop policies. + ------------------------------------------------------------------- Mon Sep 15 09:11:10 UTC 2025 - Dirk Müller