-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add missing multiprocessing.popen_fork type stubs #8420
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
Add missing multiprocessing.popen_fork type stubs #8420
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Since the module fails to import on Windows, you'll need to add an entry to the stubtest allowlist here: typeshed/tests/stubtest_allowlists/win32.txt Lines 39 to 57 in 804628d
(Add a comment explaining that it does "exist" on Windows, but it fails to import.) |
You should also put the entire module contents behind an |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
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.
Mostly looks good
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
X-Ref: #6799
This adds best-effort types to multiprocessing.popen_fork to continue to address issue #6799
The source file can be viewed here:
https://github.com/python/cpython/blob/main/Lib/multiprocessing/popen_fork.py
Popen attributes in some cases may not exist, such as
sentinel
which is set here but not initialized during the__init__
. As such, it may desirable for those attributes to be removed from the stub.