diff --git a/python-vdirsyncer.changes b/python-vdirsyncer.changes index 3629eaa..a2d2353 100644 --- a/python-vdirsyncer.changes +++ b/python-vdirsyncer.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 22 04:29:15 UTC 2025 - Steve Kowalik + +- Add patch support-new-pytest-asyncio.patch: + * Support changes required by pytest-asyncio 1.0. + ------------------------------------------------------------------- Tue Dec 17 00:59:32 UTC 2024 - Steve Kowalik diff --git a/python-vdirsyncer.spec b/python-vdirsyncer.spec index ed82b71..473b0c7 100644 --- a/python-vdirsyncer.spec +++ b/python-vdirsyncer.spec @@ -1,7 +1,7 @@ # # spec file for package python-vdirsyncer # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,8 @@ URL: https://github.com/pimutils/vdirsyncer Source0: https://files.pythonhosted.org/packages/source/v/vdirsyncer/vdirsyncer-%{version}.tar.gz Source1: vdirsyncer.service Source2: vdirsyncer.timer +# PATCH-FIX-OPENSUSE Support pytest-asyncio 1.0 changes. +Patch0: support-new-pytest-asyncio.patch BuildRequires: %{python_module atomicwrites} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools_scm} diff --git a/support-new-pytest-asyncio.patch b/support-new-pytest-asyncio.patch new file mode 100644 index 0000000..cb689df --- /dev/null +++ b/support-new-pytest-asyncio.patch @@ -0,0 +1,47 @@ +Index: vdirsyncer-0.19.3/tests/conftest.py +=================================================================== +--- vdirsyncer-0.19.3.orig/tests/conftest.py ++++ vdirsyncer-0.19.3/tests/conftest.py +@@ -59,12 +59,12 @@ else: + + + @pytest_asyncio.fixture +-async def aio_session(event_loop): ++async def aio_session(): + async with aiohttp.ClientSession() as session: + yield session + + + @pytest_asyncio.fixture +-async def aio_connector(event_loop): ++async def aio_connector(): + async with aiohttp.TCPConnector(limit_per_host=16) as conn: + yield conn +Index: vdirsyncer-0.19.3/tests/unit/test_metasync.py +=================================================================== +--- vdirsyncer-0.19.3.orig/tests/unit/test_metasync.py ++++ vdirsyncer-0.19.3/tests/unit/test_metasync.py +@@ -1,4 +1,5 @@ + from __future__ import annotations ++import asyncio + + import hypothesis.strategies as st + import pytest +@@ -57,7 +58,7 @@ async def test_basic(monkeypatch): + + @pytest_asyncio.fixture + @pytest.mark.asyncio +-async def conflict_state(request, event_loop): ++async def conflict_state(request): + a = MemoryStorage() + b = MemoryStorage() + status = {} +@@ -70,7 +71,7 @@ async def conflict_state(request, event_ + assert await b.get_meta("foo") == "baz" + assert not status + +- event_loop.run_until_complete(do_cleanup()) ++ asyncio.new_event_loop().run_until_complete(do_cleanup()) + + request.addfinalizer(cleanup) +