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 ggainey committed Nov 12, 2024
1 parent 95bca62 commit 1282675
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 @@ -135,8 +135,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 1282675

Please sign in to comment.