File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 11import asyncio
2- from typing import TYPE_CHECKING , Final , final
3- from weakref import ProxyType , proxy
2+ import weakref
3+ from typing import Final , final
44
55import a_sync
66
77from dank_mids .types import T
88
9- if TYPE_CHECKING :
10- from dank_mids ._requests import _RequestBase , _Response
11-
129
1310_get_running_loop : Final = asyncio .get_running_loop
1411_super_init : Final = a_sync .Event .__init__
1714
1815@final
1916class RequestEvent (a_sync .Event ):
20- _owner : Final [ProxyType [T ]]
17+ _owner : Final [weakref . ProxyType [T ]]
2118 _owner_in_repr : Final [bool ]
2219
2320 def __init__ (self , owner : T ) -> None :
2421 _super_init (self , debug_daemon_interval = 300 )
2522 if self .debug_logs_enabled :
2623 self ._owner_in_repr = True
27- self ._owner = proxy (owner )
24+ self ._owner = weakref . proxy (owner )
2825 else :
2926 self ._owner_in_repr = False
3027
You can’t perform that action at this time.
0 commit comments