forked from pool/python-pyee
Accepting request 1291951 from home:crameleon:branches:devel:languages:python
- Update to 13.0.0 - Add gh-pr184_tests.patch OBS-URL: https://build.opensuse.org/request/show/1291951 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyee?expand=0&rev=31
This commit is contained in:
98
gh-pr184_tests.patch
Normal file
98
gh-pr184_tests.patch
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
From 1b229fadbadf3c5d94b0a9a53461ea7157bb1bff Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Holbrook <josh.holbrook@gmail.com>
|
||||||
|
Date: Mon, 26 May 2025 11:18:43 -0800
|
||||||
|
Subject: [PATCH 1/2] Remove fixture from trio test
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_trio.py | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_trio.py b/tests/test_trio.py
|
||||||
|
index 4ac814c..3edc54f 100644
|
||||||
|
--- a/tests/test_trio.py
|
||||||
|
+++ b/tests/test_trio.py
|
||||||
|
@@ -12,7 +12,7 @@ class PyeeTestError(Exception):
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.trio
|
||||||
|
-async def test_trio_emit():
|
||||||
|
+async def test_trio_emit() -> None:
|
||||||
|
"""Test that the trio event emitter can handle wrapping
|
||||||
|
coroutines
|
||||||
|
"""
|
||||||
|
@@ -35,7 +35,7 @@ async def event_handler():
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.trio
|
||||||
|
-async def test_trio_once_emit():
|
||||||
|
+async def test_trio_once_emit() -> None:
|
||||||
|
"""Test that trio event emitters also wrap coroutines when
|
||||||
|
using once
|
||||||
|
"""
|
||||||
|
@@ -58,7 +58,7 @@ async def event_handler():
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.trio
|
||||||
|
-async def test_trio_error():
|
||||||
|
+async def test_trio_error() -> None:
|
||||||
|
"""Test that trio event emitters can handle errors when
|
||||||
|
wrapping coroutines
|
||||||
|
"""
|
||||||
|
@@ -86,7 +86,7 @@ async def handle_error(exc):
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.trio
|
||||||
|
-async def test_sync_error(event_loop):
|
||||||
|
+async def test_sync_error() -> None:
|
||||||
|
"""Test that regular functions have the same error handling as coroutines"""
|
||||||
|
|
||||||
|
async with TrioEventEmitter() as ee:
|
||||||
|
|
||||||
|
From b1624101d42df56177f6b6461e73c20039cb9b92 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Holbrook <josh.holbrook@gmail.com>
|
||||||
|
Date: Mon, 26 May 2025 11:24:41 -0800
|
||||||
|
Subject: [PATCH 2/2] Type check trio tests
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_trio.py | 10 ++++++----
|
||||||
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_trio.py b/tests/test_trio.py
|
||||||
|
index 3edc54f..5c42ec8 100644
|
||||||
|
--- a/tests/test_trio.py
|
||||||
|
+++ b/tests/test_trio.py
|
||||||
|
@@ -1,5 +1,7 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
+from typing import NoReturn
|
||||||
|
+
|
||||||
|
import pytest
|
||||||
|
import pytest_trio.plugin # type: ignore # noqa
|
||||||
|
import trio
|
||||||
|
@@ -64,7 +66,7 @@ async def test_trio_error() -> None:
|
||||||
|
"""
|
||||||
|
|
||||||
|
async with TrioEventEmitter() as ee:
|
||||||
|
- send, rcv = trio.open_memory_channel(1)
|
||||||
|
+ send, rcv = trio.open_memory_channel[PyeeTestError](1)
|
||||||
|
|
||||||
|
@ee.on("event")
|
||||||
|
async def event_handler():
|
||||||
|
@@ -90,14 +92,14 @@ async def test_sync_error() -> None:
|
||||||
|
"""Test that regular functions have the same error handling as coroutines"""
|
||||||
|
|
||||||
|
async with TrioEventEmitter() as ee:
|
||||||
|
- send, rcv = trio.open_memory_channel(1)
|
||||||
|
+ send, rcv = trio.open_memory_channel[PyeeTestError](1)
|
||||||
|
|
||||||
|
@ee.on("event")
|
||||||
|
- def sync_handler():
|
||||||
|
+ def sync_handler() -> NoReturn:
|
||||||
|
raise PyeeTestError()
|
||||||
|
|
||||||
|
@ee.on("error")
|
||||||
|
- async def handle_error(exc):
|
||||||
|
+ async def handle_error(exc) -> None:
|
||||||
|
async with send:
|
||||||
|
await send.send(exc)
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:bbc33c09e2ff827f74191e3e5bbc6be7da02f627b7ec30d86f5ce1a6fb2424a3
|
|
||||||
size 30915
|
|
3
pyee-13.0.0.tar.gz
Normal file
3
pyee-13.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b391e3c5a434d1f5118a25615001dbc8f669cf410ab67d04c4d4e07c55481c37
|
||||||
|
size 31250
|
@@ -1,3 +1,26 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 11 10:38:21 UTC 2025 - Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
|
||||||
|
|
||||||
|
- Add gh-pr184_tests.patch to repair failing tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jun 28 07:30:03 UTC 2025 - Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
|
||||||
|
|
||||||
|
- update to 13.0.0:
|
||||||
|
* Type checking improvements
|
||||||
|
* Introduce overloads for ee.on
|
||||||
|
* Add None return type for functions as appropriate
|
||||||
|
* Type self as Any in all methods
|
||||||
|
* Local and CI tasks for type checking with mypy
|
||||||
|
* mypy type checking passes
|
||||||
|
* pyright type checking passes
|
||||||
|
* Addition of mypy to development dependencies
|
||||||
|
* Removed conditional import of iscoroutine
|
||||||
|
* This was implemented to support Python 3.3, which was dropped long ago
|
||||||
|
* Removed type stub for twisted.python.Failure
|
||||||
|
* This was to address a typing issue in unsupported versions of Twisted
|
||||||
|
* Export Handler type in pyee/__init__.py
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 25 20:36:45 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
Tue Feb 25 20:36:45 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -18,16 +18,17 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pyee
|
Name: python-pyee
|
||||||
Version: 12.1.1
|
Version: 13.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A port of node.js's EventEmitter to python
|
Summary: A port of node.js's EventEmitter to python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/jfhbrook/pyee
|
URL: https://github.com/jfhbrook/pyee
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pyee/pyee-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pyee/pyee-%{version}.tar.gz
|
||||||
|
# https://github.com/jfhbrook/pyee/pull/184
|
||||||
|
Patch0: gh-pr184_tests.patch
|
||||||
BuildRequires: %{python_module base >= 3.8}
|
BuildRequires: %{python_module base >= 3.8}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module vcversioner}
|
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -45,7 +46,7 @@ pyee supplies an ``EventEmitter`` object similar to the ``EventEmitter``
|
|||||||
from Node.js.
|
from Node.js.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pyee-%{version}
|
%autosetup -n pyee-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
Reference in New Issue
Block a user