Skip to content
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

Add support for getaddrinfo #118

Merged
merged 3 commits into from
Mar 27, 2024
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Mar 26, 2024

The end goal is to be able to use this in aiohttp's resolver https://github.com/aio-libs/aiohttp/blob/aa014a9c1084368a01a79f09bb238486e0aa164a/aiohttp/resolver.py#L91 as the current implementation doesn't return both IPv6 and IPv4 addresses which provides different semantics than the threaded resolver which uses python's built-in getaddrinfo

fixes #23 #23 (comment)

We are going to be rolling out Happy Eyeballs support in aiohttp 3.10.x so it would be nice to be able to avoid the threads

Copy link
Contributor

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@saghul
Copy link
Contributor

saghul commented Mar 26, 2024

The CI is not happy 😅

@bdraco
Copy link
Member Author

bdraco commented Mar 26, 2024

Sorry about that. Should be ok now

@bdraco
Copy link
Member Author

bdraco commented Mar 26, 2024

Looks like macos can return more than one address so I adjusted the test as well.

I created a fork, enabled actions, and verified a clean run bdraco#1

@saghul saghul merged commit c77e97a into aio-libs:master Mar 27, 2024
19 checks passed
@saghul
Copy link
Contributor

saghul commented Mar 27, 2024

Cheers!

@saghul
Copy link
Contributor

saghul commented Mar 27, 2024

I'll cut a release tonight.

@bdraco
Copy link
Member Author

bdraco commented Mar 27, 2024

Thanks

@bdraco bdraco deleted the ares_getaddrinfo branch March 28, 2024 19:37
bdraco added a commit to aio-libs/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see #559
bdraco added a commit to bdraco/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see aio-libs#559
bdraco added a commit to aio-libs/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see #559
bdraco added a commit to bdraco/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see aio-libs#559
bdraco added a commit to aio-libs/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see #559
bdraco added a commit to bdraco/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see aio-libs#559
bdraco added a commit to aio-libs/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see #559
bdraco added a commit to bdraco/aiohttp that referenced this pull request Mar 30, 2024
AsyncResolver was disabled by default because it did not
implement all of functionality of ThreadedResolver because
aiodns did not support getaddrinfo until aio-libs/aiodns#118
see aio-libs#559
@bdraco
Copy link
Member Author

bdraco commented Mar 30, 2024

I just finished the testing for a PR to aiohttp to use this and everything is working great.

Looks like we need getnameinfo as well and since pycares already has its, I'll open a PR in a bit for that one as well

bdraco added a commit to bdraco/aiodns that referenced this pull request Mar 30, 2024
This is a followup to aio-libs#118 to add `getnameinfo` as well to support

aio-libs/aiohttp#8270
bdraco added a commit to bdraco/aiodns that referenced this pull request Mar 30, 2024
This is a followup to aio-libs#118 to add `getnameinfo` as well to support

aio-libs/aiohttp#8270
saghul pushed a commit that referenced this pull request Mar 30, 2024
This is a followup to #118 to add `getnameinfo` as well to support

aio-libs/aiohttp#8270
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.

gethostbyname defaults to ipv6
2 participants