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

On Windows IPPROTO_IPV6 may not be defined in socket #140

Merged
merged 6 commits into from
Oct 22, 2016

Conversation

digitalresistor
Copy link
Member

@digitalresistor digitalresistor commented Oct 14, 2016

Unfortunately due to some reshuffling of headers on Windows, and Python
defining the wrong Windows version, IPPROTO_IPV6 may not be defined on
Windows. If this is the case, we set them to some magic values.

If there is an OS out there that doesn't define those flags, and they
are not windows, we raise a RuntimeError because we need to add some
magic variables, waitress requires IPv6...

Closes #138, #139

Unfortunately due to some reshuffling of headers on Windows, and Python
defining the wrong Windows version, IPPROTO_IPV6 may not be defined on
Windows. If this is the case, we set them to some magic values.

If there is an OS out there that doesn't define those flags, and they
are not windows, we raise a RuntimeError because we need to add some
magic variables, waitress requires IPv6...
We can't use service names instead of port numbers on Windows, so
attempt to turn the port into an integer. If unable to do so, raise an
error.
However Python 3 apparently does, since we have a test for this, and
upon changing things tests started failing on Python 3 on Windows.
Disable IPv6 support if there is no IPv6 support on the platform
@digitalresistor digitalresistor force-pushed the bugfix/socket_flags_windows branch from 349a43b to 57ea838 Compare October 14, 2016 22:01
@digitalresistor
Copy link
Member Author

Pulled PR #141 into this one.

Copy link
Member

@mmerickel mmerickel left a comment

Choose a reason for hiding this comment

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

LGTM so long as the IPv6 support actually works on windows with those hardcoded constants.

@digitalresistor
Copy link
Member Author

That's the numbers for those constants defined in winsock. Going to spin up a windows VM and test it later.

@fschulze
Copy link

I've tried this patch and the issues I had are fixed with it.

@digitalresistor
Copy link
Member Author

Excellent. I'll spin a new release today with this patchset.

@digitalresistor digitalresistor merged commit 57ea838 into master Oct 22, 2016
@digitalresistor digitalresistor deleted the bugfix/socket_flags_windows branch October 22, 2016 19:35
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.

3 participants