-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gh-71587: Clear cached strptime module #101783
base: main
Are you sure you want to change the base?
Conversation
abalkin
commented
Feb 10, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Datetime NoneType after calling Py_Finalize and Py_Initialize #71587
The following commit authors need to sign the Contributor License Agreement: |
Modules/_datetimemodule.c
Outdated
@@ -6863,12 +6864,17 @@ _datetime_exec(PyObject *module) | |||
return 0; | |||
} | |||
|
|||
static void module_free(void*) { | |||
strptime_module = NULL; |
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.
We should call Py_CLEAR
here to avoid leaking a reference.
This approach isn't going to be any better than the existing one. It needs to be written in a way that doesn't use global variables at all ( |
This can be closed, the issue is complete. |
The following commit authors need to sign the Contributor License Agreement: |