In the above function, the _events[event] dictionary is emptied, but the event itself is not deleted from the _events dictionary. Consequently, in socket applications, the _events dictionary can swell up over time.
New version:
def _remove_listener(self, event: str, f: Callable) -> None:
"""Naked unprotected removal."""
self._events[event].pop(f)
if not len(self._events[event]):
del self._events[event]
The latest version of Pyee has resolved this issue. However, I am unable to utilize the new version due to the package requirements of bitfinex-api-py, which requires pyee~=8.0. Could you please update the requirements to include the new version?
Issue type
Brief description
Performance issue of outdated pyee package.
Steps to reproduce
Old version:
In the above function, the _events[event] dictionary is emptied, but the event itself is not deleted from the _events dictionary. Consequently, in socket applications, the _events dictionary can swell up over time.
New version:
docs: https://pyee.readthedocs.io/en/latest/_modules/pyee/base.html#EventEmitter.remove_listener
The latest version of Pyee has resolved this issue. However, I am unable to utilize the new version due to the package requirements of bitfinex-api-py, which requires pyee~=8.0. Could you please update the requirements to include the new version?