@@ 5,7 5,6 @@ import json
import logging
import pathlib
import typing
-import weakref
from aio_mpv_ipc.exceptions import (
AioMpvIPCException,
@@ 79,12 78,10 @@ class MpvClient:
self._request_counter = 0
- self._futures: "weakref.WeakValueDictionary[str, asyncio.Future]" = (
- weakref.WeakValueDictionary()
- )
+ self._futures: typing.Dict[str, asyncio.Future] = {}
self._event_subscribers: typing.Dict[
- str, "weakref.WeakSet[asyncio.Queue]"
- ] = collections.defaultdict(weakref.WeakSet)
+ str, typing.Set[asyncio.Queue]
+ ] = collections.defaultdict(set)
@property
def socket_path(self) -> pathlib.Path: