mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.1.0916: with Python 3.7 "find_module" is not made available
Problem: With Python 3.7 "find_module" is not made available. Solution: Also add "find_module" with Python 3.7. (Joel Frederico, closes #3954)
This commit is contained in:
@@ -87,9 +87,9 @@ static PyObject *vim_special_path_object;
|
||||
#if PY_VERSION_HEX >= 0x030700f0
|
||||
static PyObject *py_find_spec;
|
||||
#else
|
||||
static PyObject *py_find_module;
|
||||
static PyObject *py_load_module;
|
||||
#endif
|
||||
static PyObject *py_find_module;
|
||||
|
||||
static PyObject *VimError;
|
||||
|
||||
@@ -6921,6 +6921,13 @@ populate_module(PyObject *m)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((py_find_module = PyObject_GetAttrString(cls, "find_module")))
|
||||
{
|
||||
// find_module() is deprecated, this may stop working in some later
|
||||
// version.
|
||||
ADD_OBJECT(m, "_find_module", py_find_module);
|
||||
}
|
||||
|
||||
Py_DECREF(imp);
|
||||
|
||||
ADD_OBJECT(m, "_find_spec", py_find_spec);
|
||||
|
@@ -783,6 +783,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
916,
|
||||
/**/
|
||||
915,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user