Compare commits
8 Commits
Author | SHA256 | Date | |
---|---|---|---|
ea4281ec84 | |||
36e8a72859 | |||
dccb9957e0 | |||
c96b71cb25 | |||
bccca7a53a | |||
c9b697b2c1 | |||
8e6cdd2091 | |||
b17ae36cee |
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:b53af98f6990c810edd9b56b87791021a8f54fd13db4edd1142438d44ba2263f
|
|
||||||
size 29806
|
|
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,65 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
||||||
|
|
||||||
|
- update to 12.1.1:
|
||||||
|
* Fixed ReadTheDocs build
|
||||||
|
* `build.os` is now a required parameter
|
||||||
|
* `python.version` is replaced by `build.tools`
|
||||||
|
* New features in `pyee.asyncio.AsyncIOEventEmitter`:
|
||||||
|
* `wait_for_complete` method to wait for all running handlers
|
||||||
|
to complete execution
|
||||||
|
* `cancel` method to cancel execution of all running handlers
|
||||||
|
* `complete` property that's `True` when no handlers are
|
||||||
|
currently running
|
||||||
|
* Updated changelog for v12 release to describe where to find
|
||||||
|
alternatives to deprecated and removed imports
|
||||||
|
* Add support for Python 3.13
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 26 21:02:27 UTC 2024 - Guang Yee <gyee@suse.com>
|
||||||
|
|
||||||
|
- Enable sle15_python_module_pythons.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 31 12:19:50 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 12.0.0:
|
||||||
|
* Remove deprecated imports:
|
||||||
|
`pyee.BaseEventEmitter`
|
||||||
|
`pyee.AsyncIOEventEmitter`
|
||||||
|
`pyee.TwistedEventEmitter`
|
||||||
|
`pyee.ExecutorEventEmitter`
|
||||||
|
`pyee.TrioEventEmitter`
|
||||||
|
* Add `PyeeError` which inherits from `PyeeException`, and use
|
||||||
|
throughout
|
||||||
|
* Deprecate direct use of `PyeeException`
|
||||||
|
* Add project URLs to pyproject.toml and PyPI
|
||||||
|
* Use ActionLint v2
|
||||||
|
* Fix GitHub release action
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 20 04:06:27 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
Tue Feb 20 04:06:27 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pyee
|
# spec file for package python-pyee
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -16,17 +16,19 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pyee
|
Name: python-pyee
|
||||||
Version: 11.1.0
|
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
|
||||||
@@ -44,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