-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improve __all__
definitions for threading
and _dummy_threading
modules
#7135
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
Conversation
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks, can you tell me what triggered the allowlist changes? |
There were a large number of "unused allowlist" complaints on 3.6-3.8 due to adding Ideally we'd fix these problems (and I can do so in this PR if you like), but it felt out of scope for this PR. |
"stack_size", | ||
"excepthook", | ||
"ExceptHookArgs", | ||
"gettrace", |
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.
I don't see these last two in the code on 3.9.
I do see get_native_id
, though it looks like it's absent on some OSes: https://docs.python.org/3.10/library/threading.html#threading.get_native_id
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.
Oops, this is a 3.10 block and gettrace and getprofile were only added in 3.10. Sorry for that.
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.
Good catch on get_native_id
. I was copy-pasting __all__
from the source code, and didn't spot that it was conditionally appended to __all__
lower down.
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.
I have added get_native_id
to threading.__all__
, and I have deleted get_native_id
from _dummy_threading.pyi
, as stubtest correctly points out that it doesn't exist in the dummy_threading
at runtime on Python 3.8.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Refs PyCQA/flake8-pyi#176