Open sbesson opened 2 years ago
cc: @martindurant any ideas?
I suppose the way to go will be to post a callback (loop.call_soon_threadsafe
) which creates the client and attaches it to the file system instance.
On second thoughts, get_client
always runs as a coroutine, so I'm not sure its possible for it to run anywhere except the current event loop; so removing the argument may be all that we need.
See https://github.com/ome/ome-zarr-py/pull/127 for the original discussion.
The CI pre-releases workflow running on
ome-zarr-py
, a downstream consumer offsspec
identified an incompatibility betweenfsspec
and the next major version ofaiohttp
where theloop
keyword for theClientSession
constructor has been dropped:aiohttp 4
is still in alpha mode so this won't impact consumers yet but this will likely be something to deal with whenaiohttp 4.0.0
is releasedLooking quickly at the how-to guides https://docs.aiohttp.org/en/stable/client_quickstart.html and https://docs.aiohttp.org/en/stable/client_advanced.html, it looks like it should be possible to anticipate this breaking change and refactor the way
ClientSession
are created with an event loop.