diff options
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index 7f04b1aa609..71cce8e4f62 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2439,6 +2439,12 @@ PyImport_ImportModule(const char *name) PyObject * PyImport_ImportModuleNoBlock(const char *name) { + if (PyErr_WarnEx(PyExc_DeprecationWarning, + "PyImport_ImportModuleNoBlock() is deprecated and scheduled for " + "removal in Python 3.15. Use PyImport_ImportModule() instead.", 1)) + { + return NULL; + } return PyImport_ImportModule(name); } |