Skip to content

Releases

Eventic [0.0.2]

Choose a tag to compare

@TechnoBro03 TechnoBro03 released this 27 Oct 19:35

Reworks how events are defined, adds error reporting for handlers, and bumps the version to 0.0.2.

What's Changed

Full Changelog: v0.0.1...0.0.2

Breaking changes

  • Event(func) is replaced by the event() decorator (@event / event(func)). Use @event(method=True) for events defined as methods, so self is 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_error option: handler exceptions are passed to a callback instead of being silently ignored. This works for sync handlers, async handlers and fire().
  • 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 the event() decorator, signature rules and on_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.py is split into one test file per category.

Eventic [v0.0.1]

Choose a tag to compare

@TechnoBro03 TechnoBro03 released this 15 Jan 18:01

Welcome to Eventic!

Python Version: >= 3.10