forked from pool/python-pyee
- Update to 13.0.0
- Add gh-pr184_tests.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyee?expand=0&rev=31
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
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)
|
||||
|
3
pyee-11.1.0.tar.gz
Normal file
3
pyee-11.1.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b53af98f6990c810edd9b56b87791021a8f54fd13db4edd1142438d44ba2263f
|
||||
size 29806
|
3
pyee-12.0.0.tar.gz
Normal file
3
pyee-12.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c480603f4aa2927d4766eb41fa82793fe60a82cbfdb8d688e0d08c55a534e145
|
||||
size 29675
|
3
pyee-12.1.1.tar.gz
Normal file
3
pyee-12.1.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
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
|
260
python-pyee.changes
Normal file
260
python-pyee.changes
Normal file
@@ -0,0 +1,260 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
- Update to 11.1.0:
|
||||
* Support Python 3.12
|
||||
* Require Python >= 3.8
|
||||
* Update classifiers in `pyproject.toml`
|
||||
* Remove package.json/package-lock.json
|
||||
* Switch from `setup.py` to `pyproject.toml` (still using setuptools)
|
||||
* Minor type annotation bugfixes
|
||||
* Store AsyncIO Futures in a set
|
||||
* `EventEmitter` supports pickling
|
||||
* Dependency on mock removed in favor of unittest.mock
|
||||
* Drop 3.7 support
|
||||
- Switch to pyproject macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 5 00:02:22 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
- Update to 2022/02/04 Version 9.0.4
|
||||
Add py.typed file to MANIFEST.in (ensures mypy actually respects the type annotations)
|
||||
|
||||
- Update to 2022/01/18 Version 9.0.3
|
||||
Improve type safety of EventEmitter#on, EventEmitter#add_listener and EventEmitter#listens_to by parameterizing the Handler
|
||||
Minor fixes to documentation
|
||||
|
||||
- Update to 2022/01/17 Version 9.0.2
|
||||
Add tests_require to setup.py, fixing COPR build
|
||||
Install as an editable package in environment.yml and requirements_docs.txt, fixing Conda workflows and ReadTheDocs respectively
|
||||
|
||||
- Update to 2022/01/17 Version 9.0.1
|
||||
Fix regression where EventEmitter#listeners began crashing when called with uninitialized listeners
|
||||
|
||||
- Update to 2022/01/17 Version 9.0.0
|
||||
Compatibility:
|
||||
Drop 3.6 support
|
||||
New features:
|
||||
New EventEmitter.event_names() method (see PR #96)
|
||||
Type annotations and type checking with pyright
|
||||
Exprimental pyee.cls module exposing an @evented class decorator and a @on method decorator (see PR #84)
|
||||
Moved/deprecated interfaces:
|
||||
pyee.TwistedEventEmitter -> pyee.twisted.TwistedEventEmitter
|
||||
pyee.AsyncIOEventEmitter -> pyee.asyncio.AsyncIOEventEmitter
|
||||
pyee.ExecutorEventEmitter -> pyee.executor.ExecutorEventEmitter
|
||||
pyee.TrioEventEmitter -> pyee.trio.TrioEventEmitter
|
||||
Removed interfaces:
|
||||
pyee.CompatEventEmitter
|
||||
Documentation fixes:
|
||||
Add docstring to BaseEventEmitter
|
||||
Update docstrings to reference EventEmitter instead of BaseEventEmitter throughout
|
||||
Developer Setup & CI:
|
||||
Migrated builds from Travis to GitHub Actions
|
||||
Refactor developer setup to use a local virtualenv
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 19 11:43:43 UTC 2021 - pgajdos@suse.com
|
||||
|
||||
- version update to 8.2.2
|
||||
2021/8/14 Version 8.2.1
|
||||
-----------
|
||||
- Add .readthedocs.yaml file
|
||||
- Remove vcversioner dependency from docs build
|
||||
2021/8/14 Version 8.2.0
|
||||
-----------------------
|
||||
- Remove test_requires and setup_requires directives from setup.py (closing #82)
|
||||
- Remove vcversioner from dependencies
|
||||
- Streamline requirements.txt and environment.yml files
|
||||
- Update and extend CONTRIBUTING.rst
|
||||
- CI with GitHub Actions instead of Travis (closing #56)
|
||||
- Format all code with black
|
||||
- Switch default branch to ``main``
|
||||
- Add the CHANGELOG to Sphinx docs (closing #51)
|
||||
- Updated copyright information
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 31 14:14:22 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- make build requirement specification fit for python39 flavor
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 18 22:37:12 UTC 2021 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 8.1.0
|
||||
* Improved thread safety in base EventEmitter
|
||||
* Documentation fix in ExecutorEventEmitter
|
||||
- Changelog for Version 8.0.1
|
||||
* Update README to reflect new API
|
||||
- Changelog for Version 8.0.0
|
||||
* Drop support for Python 2.7
|
||||
* Remove CompatEventEmitter and rename BaseEventEmitter to
|
||||
EventEmitter
|
||||
* Create an alias for BaseEventEmitter with a deprecation warning
|
||||
- Changelog for Version 7.0.4
|
||||
* setup_requires vs tests_require now correct
|
||||
* tests_require updated to pass in tox
|
||||
* 3.7 testing removed from tox
|
||||
* 2.7 testing removed from Travis
|
||||
- Changelog for Version 7.0.3
|
||||
* Tag license as MIT in setup.py
|
||||
* Update requirements and environment to pip -e the package
|
||||
- Changelog for Version 7.0.2
|
||||
* Support Python 3.8 by attempting to import TimeoutError from
|
||||
asyncio.exceptions
|
||||
* Add LICENSE to package manifest
|
||||
* Add trio testing to tox
|
||||
* Add Python 3.8 to tox
|
||||
* Fix Python 2.7 in tox
|
||||
- Clarify test requirements for different python versions
|
||||
- Drop python-pyee-import-asyncio.exceptions.patch merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 26 14:04:57 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- version update to 7.0.1
|
||||
- Some tweaks to the docs
|
||||
- Added a ``TrioEventEmitter`` class for intended use with trio
|
||||
- ``AsyncIOEventEmitter`` now correctly handles cancellations
|
||||
- Add a new experimental ``pyee.uplift`` API for adding new functionality to
|
||||
existing event emitters
|
||||
- deleted patches
|
||||
- fix-build-requirements.patch (upstreamed)
|
||||
- Add patch python-pyee-import-asyncio.exceptions.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 25 07:50:21 UTC 2019 - pgajdos@suse.com
|
||||
|
||||
- version update to 6.0.0
|
||||
* Added a ``BaseEventEmitter`` class which is entirely synchronous and
|
||||
intended for simple use and for subclassing
|
||||
* Added an ``AsyncIOEventEmitter`` class for intended use with asyncio
|
||||
* Added a ``TwistedEventEmitter`` class for intended use with twisted
|
||||
* Added an ``ExecutorEventEmitter`` class which runs events in an executor
|
||||
* Deprecated ``EventEmitter`` (use one of the new classes)
|
||||
- modified patches
|
||||
% fix-build-requirements.patch (refreshed)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 12:52:10 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Remove superfluous devel dependency for noarch package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 29 15:22:46 UTC 2018 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
- python-hamcrest was renamed to python-PyHamcrest
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 19 15:54:33 UTC 2018 - mcepl@suse.com
|
||||
|
||||
- Clean up SPEC
|
||||
- Add missing BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 4 20:12:00 UTC 2018 - alarrosa@suse.com
|
||||
|
||||
- Fix LICENSE url
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 07:55:56 UTC 2018 - alarrosa@suse.com
|
||||
|
||||
- pytest-asyncio was build requirement by pyee's setup.py file, but
|
||||
it was only used for tests. On top of that, the python-pytest-asyncio
|
||||
package is only available for python3, so now we only do tests on
|
||||
python3 and a patch was added to fix the requirements:
|
||||
* fix-build-requirements.patch
|
||||
|
||||
- Since the tests require at least python 3.5, only run the tests when
|
||||
suse_version >= 1500
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 5 09:29:54 UTC 2018 - alarrosa@suse.com
|
||||
|
||||
- Update to version 5.0.0
|
||||
* CHANGELOG.md reformatted to CHANGELOG.rst
|
||||
* Added CONTRIBUTORS.rst
|
||||
* The listeners method no longer returns the raw list of listeners, and
|
||||
instead returns a list of unwrapped listeners; This means that mutating
|
||||
listeners on the EventEmitter by mutating the list returned by this method
|
||||
isn't possible anymore, and that for once handlers this method returns the
|
||||
unwrapped handler rather than the wrapped handler
|
||||
* once API now returns the unwrapped handler in both decorator and
|
||||
non-decorator cases
|
||||
* Possible to remove once handlers with unwrapped handlers
|
||||
* Internally, listeners are now stored on a OrderedDict rather than a list
|
||||
* Minor stylistic tweaks to make code more pythonic
|
||||
|
||||
- Update to version 4.0.1
|
||||
* Fix bug in setup.py; Now publishable
|
||||
|
||||
- Update to version 4.0.0
|
||||
* Coroutines now work with .once Wrapped listener is removed prior to hook
|
||||
* execution rather than after for synchronous .once handlers
|
||||
- Add LICENSE file from upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 5 15:17:34 UTC 2017 - alarrosa@suse.com
|
||||
|
||||
- Initial release of python-pyee 3.0.3
|
67
python-pyee.spec
Normal file
67
python-pyee.spec
Normal file
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# spec file for package python-pyee
|
||||
#
|
||||
# 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
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-pyee
|
||||
Version: 13.0.0
|
||||
Release: 0
|
||||
Summary: A port of node.js's EventEmitter to python
|
||||
License: MIT
|
||||
URL: https://github.com/jfhbrook/pyee
|
||||
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 pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-typing_extensions
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module Twisted}
|
||||
BuildRequires: %{python_module pytest-asyncio}
|
||||
BuildRequires: %{python_module pytest-trio}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
pyee supplies an ``EventEmitter`` object similar to the ``EventEmitter``
|
||||
from Node.js.
|
||||
|
||||
%prep
|
||||
%autosetup -n pyee-%{version} -p1
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/pyee
|
||||
%{python_sitelib}/pyee-%{version}.dist-info
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user