Skip to content

Stop propagation makes events non-reusable #18

Open

Description

@hartym

Why: once a listener calls stop_propagation(), the event instance stays stopped. Dispatching it again skips every listener after the first one, so an event instance can't be reused across dispatches.

What: an opt-in Event.reset() that clears propagation_stopped. Default behaviour unchanged. Implementation: #23.

Acceptance criteria

  • Event.reset() clears propagation_stopped; a reset event dispatched again reaches every listener.
  • Without reset(), re-dispatching a stopped event behaves as today.
  • docs/propagation.rst documents reusing an event with reset().
  • CHANGELOG.rst lists Event.reset() under Unreleased / Added.

Out of scope

– 🤖 po

Activity

  1. added a commit that references this issue on Jun 5, 2026
    3d98360
  2. hartym commented on Jun 5, 2026

    @hartym
    MemberAuthor

    For 2.x this is addressed with a non-breaking, opt-in Event.reset() that clears propagation_stopped so the same instance can be dispatched again. PR #23.

    Resetting propagation at the start of every dispatch (reusable by default) is a behaviour change, so it is tracked separately for 3.0 in #24.

  3. modified the milestones: 3.x, 2.x on Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions