-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
datetime_strptime is 'NoneType' when restart cpython #117914
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
Labels
type-bug
An unexpected behavior, bug, or error
Comments
Is it Python 3.11 only issue? Is it reproduced in 3.12 or in the main branch? |
Python 3.12 and main branch seems to be worse, it crashes on import after restart. #include "Python.h"
#include <iostream>
void py_test() {
Py_Initialize();
auto pName = PyUnicode_DecodeFSDefault("datetime");
auto pModule = PyImport_Import(pName);
Py_Finalize();
}
int main() {
py_test();
std::cout << "========" << std::endl;
py_test();
return 0;
} ========
a.out(39618,0x7ff8589827c0) malloc: *** error for object 0x10bffedc0: pointer being freed was not allocated
a.out(39618,0x7ff8589827c0) malloc: *** set a breakpoint in malloc_error_break to debug
[1] 39618 abort ./a.out |
If the bug is not 3.11 specific, the PR should be created for the |
This appears to be a duplicate of gh-71587. If I'm mistaken, please re-open. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
When executing the following code, it will appear
TypeError: 'NoneType' object is not callable
CPython versions tested on:
3.11
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: