forked from pool/python-vdirsyncer
Accepting request 1294923 from devel:languages:python
- Add patch support-new-pytest-asyncio.patch: * Support changes required by pytest-asyncio 1.0. OBS-URL: https://build.opensuse.org/request/show/1294923 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-vdirsyncer?expand=0&rev=21
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 22 04:29:15 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- 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 <steven.kowalik@suse.com>
|
Tue Dec 17 00:59:32 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-vdirsyncer
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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
|
Source0: https://files.pythonhosted.org/packages/source/v/vdirsyncer/vdirsyncer-%{version}.tar.gz
|
||||||
Source1: vdirsyncer.service
|
Source1: vdirsyncer.service
|
||||||
Source2: vdirsyncer.timer
|
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 atomicwrites}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
|
47
support-new-pytest-asyncio.patch
Normal file
47
support-new-pytest-asyncio.patch
Normal file
@@ -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)
|
||||||
|
|
Reference in New Issue
Block a user