Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .ci/assets/ci_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ azure-storage-blob!=12.28.*
# Apparently does not work with current azurite.


pycares<5
# older aiodns versions don't pin pycares UB, and are broken by pycares>=5
8 changes: 7 additions & 1 deletion pulpcore/download/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ def _make_aiohttp_session_from_remote(self):
# I don't see why...
# https://github.com/aio-libs/aiohttp/pull/3372
return aiohttp.ClientSession(
connector=aiohttp.TCPConnector(loop=asyncio.get_event_loop(), **tcp_conn_opts),
# ThreadedResolver uses getaddrinfo() which honors /etc/hosts and nsswitch.conf;
# the default AsyncResolver (c-ares) bypasses the system resolver entirely.
connector=aiohttp.TCPConnector(
loop=asyncio.get_event_loop(),
resolver=aiohttp.resolver.ThreadedResolver(loop=asyncio.get_event_loop()),
**tcp_conn_opts,
),
timeout=timeout,
headers=headers,
requote_redirect_url=False,
Expand Down
4 changes: 3 additions & 1 deletion pulpcore/download/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def __init__(
self._close_session_on_finalize = False
else:
timeout = aiohttp.ClientTimeout(total=None, sock_connect=600, sock_read=600)
conn = aiohttp.TCPConnector()
# ThreadedResolver uses getaddrinfo() which honors /etc/hosts and nsswitch.conf;
# the default AsyncResolver (c-ares) bypasses the system resolver entirely.
conn = aiohttp.TCPConnector(resolver=aiohttp.resolver.ThreadedResolver())
self.session = aiohttp.ClientSession(
connector=conn, timeout=timeout, headers=headers, requote_redirect_url=False
)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ classifiers=[
]
requires-python = ">=3.11"
dependencies = [
"aiodns>=3.3.0,<3.7", # Looks like only bugfixes in z-Stream.
"aiofiles>=22.1,<=25.1.0", # Uses sort of CalVer, luckily not released often https://github.com/Tinche/aiofiles/issues/144 .
"aiohttp>=3.10.10,<3.15", # SemVer https://docs.aiohttp.org/en/stable/faq.html#what-is-the-api-stability-and-deprecation-policy .
"asyncio-throttle>=1.0,<=1.0.2", # Unsure about versioning, but not released often anyway.
Expand Down
Loading