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.

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

275275 """
276276 with self._lock:
277277 if event is not None:
278- self._events[event] = OrderedDict()
278+ if event in self._events:
279+ del self._events[event]
279280 else:
280281 self._events = dict()
281282

The check that tells the two apart

failpass·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.