-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
gh-90980: skip getaddrinfo thread if host is already resolved, using socket.AI_NUMERIC... #31497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -856,6 +797,15 @@ async def getaddrinfo(self, host, port, *, | |||
else: | |||
getaddr_func = socket.getaddrinfo | |||
|
|||
try: | |||
return getaddr_func( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is inspired by the implementation from trio https://github.com/python-trio/trio/blob/4edfd41bd5519a2e626e87f6c6ca9fb32b90a6f4/trio/_socket.py#L125-L192
3ff77cd
to
feffb88
Compare
test_create_connection_ipv6_scope is failing because
eg what should |
feffb88
to
5c37749
Compare
5c37749
to
3a87238
Compare
3a87238
to
d305816
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets hope comments on slow Mac back in 2015 are resolved. Otherwise a nice optimisation.
#90980
https://bugs.python.org/issue46824