Skip to content

Overhaul socket stubs on Windows and MacOS #8106

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

Merged
merged 5 commits into from
Jun 20, 2022

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jun 19, 2022

Helps with #8101.

This PR reduces the (_)socket allowlists for win32 and darwin to only a handful of missing constants/functions.

@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood requested a review from hauntsaninja June 19, 2022 16:48
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks, this is a pretty heroic PR. I'd want to double check there aren't any Linux regressions before merging.

Can confirm stubtest also looks good on my Mac laptop (in case there were OS version or hardware specific things we're missing). For what it's worth, I have socket.MSG_NOSIGNAL on 3.8 and above — curious what you were seeing.

@AlexWaygood
Copy link
Member Author

AlexWaygood commented Jun 20, 2022

For what it's worth, I have socket.MSG_NOSIGNAL on 3.8 and above — curious what you were seeing.

I was using GH Actions on my fork to run stubtest on macos, and it seemed like it varied from one stubtest run to the next as to whether it existed at runtime.

@AlexWaygood
Copy link
Member Author

AlexWaygood commented Jun 20, 2022

I'd want to double check there aren't any Linux regressions before merging.

Here's a failing Ubuntu stubtest run from yesterday on my fork, before I added the allowlist back for linux, if that's helpful: https://github.com/AlexWaygood/typeshed/runs/6955971392?check_suite_focus=true

I'd rather not make any linux-specific changes in this PR, if at all possible, since (1) I don't have a linux machine, and (2) I know very little about linux and the various linux operating systems.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Jun 20, 2022

Confirmed that we didn't accidentally regress availability of any constants on Linux on Python 3.9 (same set of "is not present in stub" errors)

@AlexWaygood
Copy link
Member Author

Confirmed that we didn't accidentally regress availability of any constants on Linux on Python 3.9 (same set of "is not present in stub" errors)

Awesome, thanks for checking!

@AlexWaygood AlexWaygood merged commit c6de37d into python:master Jun 20, 2022
@AlexWaygood AlexWaygood deleted the socket branch June 20, 2022 19:11
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.

2 participants