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
7 changes: 3 additions & 4 deletions aiohttp/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ async def resolve(
hosts: list[ResolveResult] = []
for node in resp.nodes:
address: tuple[bytes, int] | tuple[bytes, int, int, int] = node.addr
family = node.family
if family == socket.AF_INET6:
if node.family == socket.AF_INET6:
if len(address) > 3 and address[3]:
# This is essential for link-local IPv6 addresses.
# LL IPv6 is a VERY rare case. Strictly speaking, we should use
Expand All @@ -142,15 +141,15 @@ async def resolve(
resolved_host = address[0].decode("ascii")
port = address[1]
else: # IPv4
assert family == socket.AF_INET
assert node.family == socket.AF_INET
resolved_host = address[0].decode("ascii")
port = address[1]
hosts.append(
ResolveResult(
hostname=host,
host=resolved_host,
port=port,
family=family,
family=node.family,
proto=0,
flags=_NUMERIC_SOCKET_FLAGS,
)
Expand Down
4 changes: 2 additions & 2 deletions requirements/base-ft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/base-ft.txt --strip-extras requirements/base-ft.in
#
aiodns==3.6.1
aiodns==4.0.0
# via -r requirements/runtime-deps.in
aiohappyeyeballs==2.6.1
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -38,7 +38,7 @@ propcache==0.4.1
# via
# -r requirements/runtime-deps.in
# yarl
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/base.txt --strip-extras requirements/base.in
#
aiodns==3.6.1
aiodns==4.0.0
# via -r requirements/runtime-deps.in
aiohappyeyeballs==2.6.1
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -38,7 +38,7 @@ propcache==0.4.1
# via
# -r requirements/runtime-deps.in
# yarl
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/constraints.txt --strip-extras requirements/constraints.in
#
aiodns==3.6.1
aiodns==4.0.0
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in
Expand Down Expand Up @@ -151,7 +151,7 @@ propcache==0.4.1
# yarl
proxy-py==2.4.10
# via -r requirements/test-common.in
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
4 changes: 2 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/dev.txt --strip-extras requirements/dev.in
#
aiodns==3.6.1
aiodns==4.0.0
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in
Expand Down Expand Up @@ -148,7 +148,7 @@ propcache==0.4.1
# yarl
proxy-py==2.4.10
# via -r requirements/test-common.in
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
4 changes: 2 additions & 2 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/lint.txt --resolver=backtracking --strip-extras requirements/lint.in
#
aiodns==3.6.1
aiodns==4.0.0
# via -r requirements/lint.in
annotated-types==0.7.0
# via pydantic
Expand Down Expand Up @@ -65,7 +65,7 @@ pluggy==1.6.0
# via pytest
pre-commit==4.5.1
# via -r requirements/lint.in
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
4 changes: 2 additions & 2 deletions requirements/runtime-deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/runtime-deps.txt --strip-extras requirements/runtime-deps.in
#
aiodns==3.6.1
aiodns==4.0.0
# via -r requirements/runtime-deps.in
aiohappyeyeballs==2.6.1
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -34,7 +34,7 @@ propcache==0.4.1
# via
# -r requirements/runtime-deps.in
# yarl
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
4 changes: 2 additions & 2 deletions requirements/test-ft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/test-ft.txt --strip-extras requirements/test-ft.in
#
aiodns==3.6.1
aiodns==4.0.0
# via -r requirements/runtime-deps.in
aiohappyeyeballs==2.6.1
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -89,7 +89,7 @@ propcache==0.4.1
# yarl
proxy-py==2.4.10
# via -r requirements/test-common.in
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/test.txt --strip-extras requirements/test.in
#
aiodns==3.6.1
aiodns==4.0.0
# via -r requirements/runtime-deps.in
aiohappyeyeballs==2.6.1
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -89,7 +89,7 @@ propcache==0.4.1
# yarl
proxy-py==2.4.10
# via -r requirements/test-common.in
pycares==4.11.0
pycares==5.0.1
# via aiodns
pycparser==2.23
# via cffi
Expand Down
Loading