bpo-31425: Expose AF_QIPCRTR in socket module by andersson · Pull Request #3706 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation21 Commits3 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Hello, and thanks for your contribution!
I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).
Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.
Thanks again to your contribution and we look forward to looking at it!
The CLA is signed, but unfortunately I did not have the "Github name" filled in on my account. This is corrected now.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests and maybe an example, too.
#if defined(AF_QIPCRTR) |
---|
case AF_QIPCRTR: |
{ |
*len_ret = sizeof (struct sockaddr_qrtr); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the extra space after sizeof
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, I'm ignoring this to follow the coding style in this function.
@@ -54,6 +54,15 @@ typedef int socklen_t; |
---|
# undef AF_NETLINK |
#endif |
#ifdef HAVE_LINUX_QRTR_H |
# ifdef HAVE_ASM_TYPES_H |
# include <asm/types.h> |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must add the new addr type to the large sock_addr_t
union.
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 I have made the requested changes; please review again
. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
The AF_QIPCRTR address family was introduced in Linux v4.7, expose this in the Python socket module to allow applications to operate on sockets of this type.
Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks fine to me
@vstinner @serhiy-storchaka Can you have a look, please? We don't have a dedicated expert for the socket module. You have touched some code recently, too.
tiran removed their assignment
@andersson I'm sorry that your PR didn't make it into Python 3.7.
Please rebase your PR on master and address @serhiy-storchaka's comments.
Conflicts:
Doc/library/socket.rst
Lib/test/test_socket.py
Due to this being nearly ready to go but untouched for over 6 months, I've gone ahead and addressed @serhiy-storchaka's latest review comments, and merged the latest master branch in.
@serhiy-storchaka, @tiran, please consider reviewing again.
Thank you @taleinat! All my comments have been addressed.
family is represented as a ``(node, port)`` tuple where the *node* and *port* |
---|
are non-negative integers. |
.. versionadded:: 3.7 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 3.8, not 3.7.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!