You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CookieJar.__init__ requires a running loop in the constructor, but that is only needed/used for expiration.
I think the loop should still get passed in, but not required to be running (checked via get_running_loop in AbstractCookieJar), and only retrieved when during expiration (via a property maybe?).
This would make it less difficult to debug issues with it / prototyping - where getting a loop is always a bit cumbersome.
Prototyping to look how it (mis)behaves (#2502 (comment)).
So not really a real-world use case, but thought it could be made simpler to use in this regard.
Feel free to close this though - I can also see that using a property etc would make it more complicated code-wise.
CookieJar.__init__
requires a running loop in the constructor, but that is only needed/used for expiration.I think the loop should still get passed in, but not required to be running (checked via
get_running_loop
inAbstractCookieJar
), and only retrieved when during expiration (via a property maybe?).This would make it less difficult to debug issues with it / prototyping - where getting a
loop
is always a bit cumbersome.Code reference:
aiohttp/aiohttp/cookiejar.py
Lines 53 to 60 in 9504fe2
The text was updated successfully, but these errors were encountered: