-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-106078: Isolate decimal module #107287
gh-106078: Isolate decimal module #107287
Conversation
🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit 50d5243 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Following this PR, I now get a warning printed to my terminal whenever I run
(I bisected the warning to this PR) |
@@ -5857,7 +5876,7 @@ PyInit__decimal(void) | |||
mpd_free = PyMem_Free; | |||
mpd_setminalloc(_Py_DEC_MINALLOC); |
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.
Yes. The warning occures here, which is caused by the multi-phase initialization of decimal
module. @AlexWaygood
This warning does not affect the module, because a static flag is used in mpd_setminalloc
to ensure that MPD_MINALLOC
can only be initialized once.
Maybe we can also add a static flag to the _decimal_exec
to suppress this warning. But I'm not sure if it makes sense to do so (we add a static variable just to tell the compiler that we know a warning will be raised here). :)
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 think it is reasonable. Warnings are disrupting.
Convert decimal global state to true module state.
_decimal
extension module #106078