Repository navigation
Releases
Releases · TechnoBro03/Eventic
Eventic [0.0.2]
Reworks how events are defined, adds error reporting for handlers, and bumps the version to 0.0.2.
What's Changed
- [0.0.2] Improvements, fixes, and more! by @TechnoBro03 in #4
Full Changelog: v0.0.1...0.0.2
Breaking changes
Event(func)is replaced by theevent()decorator (@event/event(func)). Use@event(method=True)for events defined as methods, soselfis not part of the event signature.- Event signatures are now validated when the event is defined: parameters must be positional-only or keyword-only, with no defaults and no
*args/**kwargs. - Python 3.11 or newer is now required.
New features
on_erroroption: handler exceptions are passed to a callback instead of being silently ignored. This works for sync handlers, async handlers andfire().- The event function's name, docstring and signature are copied onto the
Event. - Event parameters can be named
self. Event()with no type arguments is typed as a synchronous event with no parameters.
Fixes
- Handlers are called in the order they subscribed.
- Each per-instance event is created only once and then reused.
Docs
- README screenshots are replaced with code examples, and README now covers event options, signature rules and handler exceptions.
docs/is updated for theevent()decorator, signature rules andon_error.
CI / tests
- CI runs on Python 3.11, and the TestPyPI publish only runs when a version tag is pushed (no longer on PRs).
tests/event_test.pyis split into one test file per category.
Eventic [v0.0.1]
Welcome to Eventic!
Python Version: >= 3.10