forked from pool/python-aiorpcX
Compare commits
7 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| f686432c04 | |||
| 8d70d39f66 | |||
| ab5a25cce2 | |||
| e92fe95b84 | |||
| 4ba6b1b21e | |||
| 2e0f035698 | |||
| 7040199954 |
BIN
0.23.1.tar.gz
LFS
BIN
0.23.1.tar.gz
LFS
Binary file not shown.
BIN
0.25.0.tar.gz
LFS
Normal file
BIN
0.25.0.tar.gz
LFS
Normal file
Binary file not shown.
119
event_loop.patch
Normal file
119
event_loop.patch
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
From: Jiri Slaby <jslaby@suse.cz>
|
||||||
|
Date: Mon, 30 Sep 2024 08:42:26 +0200
|
||||||
|
Subject: don't use event_loop pytest-asyncio fixture
|
||||||
|
References: build-fix
|
||||||
|
Patch-mainline: reported, https://github.com/kyuupichan/aiorpcX/issues/55
|
||||||
|
|
||||||
|
event_loop fixture was deprecated and removed from pytest-asyncio 1.0.0.
|
||||||
|
Use the internal _function_event_loop for the time being. Hopefully this
|
||||||
|
will be fixed upstream eventually...
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||||
|
---
|
||||||
|
tests/test_session.py | 24 ++++++++++++------------
|
||||||
|
tests/test_socks.py | 6 +++---
|
||||||
|
tests/test_unixsocket.py | 10 +++++-----
|
||||||
|
3 files changed, 20 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
--- a/tests/test_session.py
|
||||||
|
+++ b/tests/test_session.py
|
||||||
|
@@ -86,21 +86,21 @@ def caplog_count(caplog, message):
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
-def server_port(unused_tcp_port, event_loop):
|
||||||
|
- coro = serve_rs(MyServerSession, 'localhost', unused_tcp_port, loop=event_loop)
|
||||||
|
- server = event_loop.run_until_complete(coro)
|
||||||
|
+def server_port(unused_tcp_port, _function_event_loop):
|
||||||
|
+ coro = serve_rs(MyServerSession, 'localhost', unused_tcp_port, loop=_function_event_loop)
|
||||||
|
+ server = _function_event_loop.run_until_complete(coro)
|
||||||
|
yield unused_tcp_port
|
||||||
|
if hasattr(asyncio, 'all_tasks'):
|
||||||
|
- tasks = asyncio.all_tasks(event_loop)
|
||||||
|
+ tasks = asyncio.all_tasks(_function_event_loop)
|
||||||
|
else:
|
||||||
|
- tasks = asyncio.Task.all_tasks(loop=event_loop)
|
||||||
|
+ tasks = asyncio.Task.all_tasks(loop=_function_event_loop)
|
||||||
|
|
||||||
|
async def close_all():
|
||||||
|
server.close()
|
||||||
|
await server.wait_closed()
|
||||||
|
if tasks:
|
||||||
|
await asyncio.wait(tasks)
|
||||||
|
- event_loop.run_until_complete(close_all())
|
||||||
|
+ _function_event_loop.run_until_complete(close_all())
|
||||||
|
|
||||||
|
|
||||||
|
class TestRPCSession:
|
||||||
|
@@ -765,21 +765,21 @@ class MessageServer(MessageSession):
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
-def msg_server_port(event_loop, unused_tcp_port):
|
||||||
|
- coro = serve_rs(MessageServer, 'localhost', unused_tcp_port, loop=event_loop)
|
||||||
|
- server = event_loop.run_until_complete(coro)
|
||||||
|
+def msg_server_port(_function_event_loop, unused_tcp_port):
|
||||||
|
+ coro = serve_rs(MessageServer, 'localhost', unused_tcp_port, loop=_function_event_loop)
|
||||||
|
+ server = _function_event_loop.run_until_complete(coro)
|
||||||
|
yield unused_tcp_port
|
||||||
|
if hasattr(asyncio, 'all_tasks'):
|
||||||
|
- tasks = asyncio.all_tasks(event_loop)
|
||||||
|
+ tasks = asyncio.all_tasks(_function_event_loop)
|
||||||
|
else:
|
||||||
|
- tasks = asyncio.Task.all_tasks(loop=event_loop)
|
||||||
|
+ tasks = asyncio.Task.all_tasks(loop=_function_event_loop)
|
||||||
|
|
||||||
|
async def close_all():
|
||||||
|
server.close()
|
||||||
|
await server.wait_closed()
|
||||||
|
if tasks:
|
||||||
|
await asyncio.wait(tasks)
|
||||||
|
- event_loop.run_until_complete(close_all())
|
||||||
|
+ _function_event_loop.run_until_complete(close_all())
|
||||||
|
|
||||||
|
|
||||||
|
def connect_message_session(host, port, proxy=None, framer=None):
|
||||||
|
--- a/tests/test_socks.py
|
||||||
|
+++ b/tests/test_socks.py
|
||||||
|
@@ -482,10 +482,10 @@ localhosts = ['127.0.0.1', '::1', 'local
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(params=localhosts)
|
||||||
|
-def proxy_address(request, event_loop, unused_tcp_port):
|
||||||
|
+def proxy_address(request, _function_event_loop, unused_tcp_port):
|
||||||
|
host = request.param
|
||||||
|
- coro = event_loop.create_server(FakeServer, host=host, port=unused_tcp_port)
|
||||||
|
- server = event_loop.run_until_complete(coro)
|
||||||
|
+ coro = _function_event_loop.create_server(FakeServer, host=host, port=unused_tcp_port)
|
||||||
|
+ server = _function_event_loop.run_until_complete(coro)
|
||||||
|
yield NetAddress(host, unused_tcp_port)
|
||||||
|
server.close()
|
||||||
|
|
||||||
|
--- a/tests/test_unixsocket.py
|
||||||
|
+++ b/tests/test_unixsocket.py
|
||||||
|
@@ -11,20 +11,20 @@ if sys.platform.startswith("win"):
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
-def us_server(event_loop):
|
||||||
|
+def us_server(_function_event_loop):
|
||||||
|
with tempfile.TemporaryDirectory() as tmp_folder:
|
||||||
|
socket_path = path.join(tmp_folder, 'test.socket')
|
||||||
|
- coro = serve_us(MyServerSession, socket_path, loop=event_loop)
|
||||||
|
- server = event_loop.run_until_complete(coro)
|
||||||
|
+ coro = serve_us(MyServerSession, socket_path, loop=_function_event_loop)
|
||||||
|
+ server = _function_event_loop.run_until_complete(coro)
|
||||||
|
yield socket_path
|
||||||
|
- tasks = asyncio.all_tasks(event_loop)
|
||||||
|
+ tasks = asyncio.all_tasks(_function_event_loop)
|
||||||
|
|
||||||
|
async def close_all():
|
||||||
|
server.close()
|
||||||
|
await server.wait_closed()
|
||||||
|
if tasks:
|
||||||
|
await asyncio.wait(tasks)
|
||||||
|
- event_loop.run_until_complete(close_all())
|
||||||
|
+ _function_event_loop.run_until_complete(close_all())
|
||||||
|
|
||||||
|
|
||||||
|
class TestUSTransport:
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 29 07:18:50 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||||
|
|
||||||
|
- update to 0.25:
|
||||||
|
* rawsocket: allow using custom transport class
|
||||||
|
- add event_loop.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 25 06:51:46 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
|
||||||
|
|
||||||
|
- dist-info can now be lowercase, handle that
|
||||||
|
- package docs
|
||||||
|
- remove X perms for docs
|
||||||
|
- update to 0.24:
|
||||||
|
* bump websockets library to >=14.0 and Python version to >=3.9
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 20 13:39:09 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Sat Apr 20 13:39:09 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-aiorpcX
|
# spec file for package python-aiorpcX
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -18,13 +18,14 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-aiorpcX
|
Name: python-aiorpcX
|
||||||
Version: 0.23.1
|
Version: 0.25.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Generic async RPC implementation, including JSON-RPC
|
Summary: Generic async RPC implementation, including JSON-RPC
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/kyuupichan/aiorpcX
|
URL: https://github.com/kyuupichan/aiorpcX
|
||||||
Source: https://github.com/kyuupichan/aiorpcX/archive/%{version}.tar.gz
|
Source: https://github.com/kyuupichan/aiorpcX/archive/%{version}.tar.gz
|
||||||
|
Patch0: event_loop.patch
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
@@ -48,8 +49,12 @@ Generic async RPC implementation, including JSON-RPC
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n aiorpcX-%{version}
|
%setup -q -n aiorpcX-%{version}
|
||||||
|
%if 0%{?suse_version} > 1600
|
||||||
|
%autopatch -p1
|
||||||
|
%endif
|
||||||
# needs network
|
# needs network
|
||||||
rm tests/test_websocket.py
|
rm tests/test_websocket.py
|
||||||
|
chmod a-x LICENCE README.rst docs/*
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
@@ -68,9 +73,9 @@ SKIP_TESTS="$SKIP_TESTS or test_cancel_remaining_on_group_with_stubborn_task"
|
|||||||
%pytest -k "not ($SKIP_TESTS)"
|
%pytest -k "not ($SKIP_TESTS)"
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst docs/*.rst
|
||||||
%license LICENCE
|
%license LICENCE
|
||||||
%{python_sitelib}/aiorpcx
|
%{python_sitelib}/aiorpcx
|
||||||
%{python_sitelib}/aiorpcX-%{version}.dist-info
|
%{python_sitelib}/aiorpc[xX]-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user