mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-45855: Replaced deprecated PyImport_ImportModuleNoBlock with PyImport_ImportModule (GH-30046)
This commit is contained in:
parent
e6fe10d340
commit
41026c3155
12 changed files with 17 additions and 16 deletions
|
|
@ -895,7 +895,7 @@ time_strptime(PyObject *self, PyObject *args)
|
|||
PyObject *module, *func, *result;
|
||||
_Py_IDENTIFIER(_strptime_time);
|
||||
|
||||
module = PyImport_ImportModuleNoBlock("_strptime");
|
||||
module = PyImport_ImportModule("_strptime");
|
||||
if (!module)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -1075,7 +1075,7 @@ time_tzset(PyObject *self, PyObject *unused)
|
|||
{
|
||||
PyObject* m;
|
||||
|
||||
m = PyImport_ImportModuleNoBlock("time");
|
||||
m = PyImport_ImportModule("time");
|
||||
if (m == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue