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
bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio #32131
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
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.
- Please add NEWS entry (https://devguide.python.org/#quick-reference point 8)
- Python can be compiled without IPv6 support,
socket.AF_INET6
is not available. Please usebase_events._HAS_IPv6
.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
For other families, it may not make sense to resolve names. For example, with AF_BLUETOOTH, there is no name resolution and attempting to do so will trigger a "ai_family not supported". The bug report contains an example: ```python import asyncio import socket sock = socket.socket(family=socket.AF_BLUETOOTH, type=socket.SOCK_STREAM, proto=socket.BTPROTO_RFCOMM) sock.setblocking(False) addr = "00:12:34:56:78:99" loop = asyncio.get_event_loop() loop.run_until_complete(loop.sock_connect(sock, (addr, 1))) ``` https://bugs.python.org/issue27929
03ac021
to
ec9b502
Compare
Misc/NEWS.d/next/Library/2022-03-28-13-35-50.bpo-27929.j5mAmV.rst
Outdated
Show resolved
Hide resolved
Thanks @vincentbernat for the PR, and @asvetlov for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
Thanks! |
…onGH-32131) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit 5c30388) Co-authored-by: Vincent Bernat <vincent@bernat.ch>
…onGH-32131) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit 5c30388) Co-authored-by: Vincent Bernat <vincent@bernat.ch>
GH-32164 is a backport of this pull request to the 3.10 branch. |
GH-32165 is a backport of this pull request to the 3.9 branch. |
…onGH-32131) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit 5c30388) Co-authored-by: Vincent Bernat <vincent@bernat.ch>
For other families, it may not make sense to resolve names. For
example, with AF_BLUETOOTH, there is no name resolution and attempting
to do so will trigger a "ai_family not supported".
The bug report contains an example:
https://bugs.python.org/issue27929
https://bugs.python.org/issue27929