| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
FYI, force pushed to kick off stalled checks. |
Sorry, something went wrong.
I tested the path on Catalina and its works well. Thanks! |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
From macOS SDK netinet6/in6.h: RFC 3542 define the following socket options in a manner incompatible with RFC 2292: IPV6_PKTINFO IPV6_HOPLIMIT IPV6_NEXTHOP IPV6_HOPOPTS IPV6_DSTOPTS IPV6_RTHDR To use the new IPv6 Sockets options introduced by RFC 3542 the constant __APPLE_USE_RFC_3542 must be defined before including <netinet/in.h> [...] Note that eventually RFC 3542 is going to be the default and RFC 2292 will be obsolete.
|
I have made the requested changes; please review again. FYI: test_peg_generator fails on my machine (master HEAD => 4044c84). I pushed this to GitHub to see if the CI also fails. |
Sorry, something went wrong.
|
Thanks for making the requested changes! @ned-deily: please review the changes made to this pull request. |
Sorry, something went wrong.
|
Ref. my previous comment (and completely irrelevant to this PR): I see that the CI has no problems with test_peg_generator, so that problem is on my side. |
Sorry, something went wrong.
|
BTW, detect_socket() in setup.py could be restructured a little bit. Something like this would be cleaner: def detect_socket(self):
# socket(2)
kwargs = {'depends': ['socketmodule.h']}
if VXWORKS:
kwargs['libraries'] = ['net']
elif MACOS:
# Issue #35569: Expose RFC 3542 socket options.
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
I guess that would need to go in a separate issue? |
Sorry, something went wrong.
|
Your restructered detect_socket() looks nicer but, unless I'm missing something, it doesn't seem to behave the same as the original code. The current code doesn't attempt to build _socket on VxWorks if it can't find the net lib directory, no? Let's go with how the PR stands currently. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, thanks! That's a lot cleaner.
Sorry, something went wrong.
|
Thanks, @ned-deily !
You're right, I mistook the elif for an else! This should do the trick: def detect_socket(self):
# socket(2)
if VXWORKS:
if not self.compiler.find_library_file(self.lib_dirs, 'net'):
return
kwargs = {'libraries': ['net']}
elif MACOS:
# Issue #35569: Expose RFC 3542 socket options.
kwargs = {'extra_compile_args': ['-D__APPLE_USE_RFC_3542']}
else:
kwargs = {}
kwargs['depends'] = ['socketmodule.h']
self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
Or we could just initialize kwargs first, and drop the last else |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
From macOS SDK netinet6/in6.h:
RFC 3542 define the following socket options in a manner incompatible with RFC 2292: IPV6_PKTINFO IPV6_HOPLIMIT IPV6_NEXTHOP IPV6_HOPOPTS IPV6_DSTOPTS IPV6_RTHDR To use the new IPv6 Sockets options introduced by RFC 3542 the constant __APPLE_USE_RFC_3542 must be defined before including <netinet/in.h> [...] Note that eventually RFC 3542 is going to be the default and RFC 2292 will be obsolete.https://bugs.python.org/issue35569