ipython / ipython/traitlets

Define Notification Types With Sentinels?

Open
#387 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
653
Forks
217
Avg merge
2d 21h
Merged PRs (30d)
2

Description

A notification which catches a `"change"` should also intuitively catch a `"special change"`.

I see two ways to accomplish this kind of behavior:

1. Split type strings at each `" "` similarly to how html classes are handled by css selectors.
2. Key notifiers on `type(sentinel)` and trace `type(sentinel).mro()` when triggering them.

Either way, I think that we could leverage [`EventReport`](https://github.com/ipython/traitlets/pull/251) types to do this.

Contributor guide

Open the contributing guide

Research direction

Start by reading the notification and notifier behavior described in the issue, then review the linked EventReport pull request for the proposed event types. Compare the two suggested approaches and determine how notification matching should work for sentinel types. Done means the behavior is specified and implemented with coverage for a general change notification catching a special change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.