Uh oh!
There was an error while loading. Please reload this page.
Improve __all__ definitions for threading and _dummy_threading modules - #7135
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.
JelleZijlstra
commented
Feb 5, 2022
Thanks, can you tell me what triggered the allowlist changes? |
AlexWaygood
commented
Feb 5, 2022
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.
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.
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.
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.
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