Whole file
jfhbrook/pyee
The author described this change as “Fix remove_all_listeners leaving stale empty event key”. It counts as a record because the check below fails on the code as it stood at 5980b924f and passes on 41f2cb8fc, with nothing else changed between the two runs.
Projectjfhbrook/pyee
Fix saved2026-08-13
Sharing licenceMIT · LICENSE
Change size+2 −1
What the code was meant to do, written into the code itself as a save note
Fix remove_all_listeners leaving stale empty event key
The change
| 275 | 275 | """ | |
| 276 | 276 | with self._lock: | |
| 277 | 277 | if event is not None: | |
| 278 | - | self._events[event] = OrderedDict() | |
| 278 | + | if event in self._events: | |
| 279 | + | del self._events[event] | |
| 279 | 280 | else: | |
| 280 | 281 | self._events = dict() | |
| 281 | 282 |
The check that tells the two apart
fail→pass·tests/test_sync.py::test_listener_removal
Check file tests/test_sync.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it5980b924fb9398204c1c71456630a457de038ded
Broken version dated2026-08-13
Modulepyee.base
Units changedEventEmitter
Fingerprint18e0333d2b348bc5
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.