diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-20 21:52:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-20 21:52:45 +0200 |
commit | 0b0ad35c339b8ad156df493bebeb77e02b32b120 (patch) | |
tree | 989e5e77fb25cc09844b36802e5914f01aea817f /src | |
parent | 80341bcd89764d96f87859a3aac8bc00aad1d762 (diff) |
patch 8.1.1361: Python setuptools don't work with Python 3v8.1.1361
Problem: Python setuptools don't work with Python 3.
Solution: Add dummy implementation for find_module. (Joel Frederico,
closes #4402, closes #3984
Diffstat (limited to 'src')
-rw-r--r-- | src/if_py_both.h | 11 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index cc0450c13b..e36f4fdee3 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -1222,6 +1222,14 @@ FinderFindSpec(PyObject *self, PyObject *args) return spec; } + + static PyObject * +FinderFindModule(PyObject* self UNUSED, PyObject* args UNUSED) +{ + // Apparently returning None works. + Py_INCREF(Py_None); + return Py_None; +} #else static PyObject * call_load_module(char *name, int len, PyObject *find_module_result) @@ -1400,9 +1408,8 @@ static struct PyMethodDef VimMethods[] = { {"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"}, #if PY_VERSION_HEX >= 0x030700f0 {"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"}, -#else - {"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"}, #endif + {"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"}, {"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"}, {"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"}, { NULL, NULL, 0, NULL} diff --git a/src/version.c b/src/version.c index 01a0b0d622..de5ffc6e64 100644 --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1361, +/**/ 1360, /**/ 1359, |