Skip to content

Commit

Permalink
Finish backporting aiohttp 3.10 bump
Browse files Browse the repository at this point in the history
Bumping this req broke Pulp, but only when using the downloader outside of
a coroutine, which some plugins do (pulp_container).
(from commit 3b0d218)

(cherry picked from commit 386c0b9)
  • Loading branch information
gerrod3 authored and patchback[bot] committed Nov 11, 2024
1 parent b690040 commit ed95f64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pulpcore/download/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ def _make_aiohttp_session_from_remote(self):
sock_read=self._remote.sock_read_timeout,
connect=self._remote.connect_timeout,
)
# TCPConnector is supposed to be instanciated in a running loop.
# I don't see why...
# https://github.com/aio-libs/aiohttp/pull/3372
return aiohttp.ClientSession(
connector=aiohttp.TCPConnector(**tcp_conn_opts),
connector=aiohttp.TCPConnector(loop=asyncio.get_event_loop(), **tcp_conn_opts),
timeout=timeout,
headers=headers,
requote_redirect_url=False,
Expand Down

0 comments on commit ed95f64

Please sign in to comment.