GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — gh-116664: Ensure thread-safe dict access in _warnings by erlend-aasland · Pull Request #116768 · python/cpython Conversation
|
| goto handle_error; | ||
| } | ||
| else { | ||
| assert(Py_IsNone(*module) || PyUnicode_Check(*module)); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think we need to handle the case where *module (i.e., __name__) is not None and not a unicode object because Python code can set __name__ arbitrarily.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
4f3cd02 should fix that case:
If None or a unicode object, return successfully; else decref and fall through to the no-key case.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Note, there is no test case for this in the test suite.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the review! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…116768) Replace _PyDict_GetItemWithError() with PyDict_GetItemRef().
…116768) Replace _PyDict_GetItemWithError() with PyDict_GetItemRef().
…116768) Replace _PyDict_GetItemWithError() with PyDict_GetItemRef().
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Make_warnings.c thread-safe in free-threaded build
There was an error while loading. Please reload this page.