Skip to content

Correct return type of asyncio.AbstractEventLoop.getaddrinfo and analogs in subclasses#15788

Open
jonathandung wants to merge 2 commits into
python:mainfrom
jonathandung:patch-3
Open

Correct return type of asyncio.AbstractEventLoop.getaddrinfo and analogs in subclasses#15788
jonathandung wants to merge 2 commits into
python:mainfrom
jonathandung:patch-3

Conversation

@jonathandung
Copy link
Copy Markdown
Contributor

Both #13372 and #13596 forgot to include the async counterparts of socket.getaddrinfo, available as async methods on event loops.

@github-actions
Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/resolver.py:67:39: error: Incompatible types in assignment (expression has type "int", variable has type "str")  [assignment]
+ aiohttp/resolver.py:67:39: note: Error code "assignment" not covered by "type: ignore[misc]" comment
+ aiohttp/resolver.py:67:39: error: Incompatible types in assignment (expression has type "bytes", variable has type "int")  [assignment]

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/addons/dns_resolver.py:178: error: List comprehension has incompatible type List[str | int]; expected List[str]  [misc]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant