0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.1.0417: if_py: find_module has been removed in Python 3.12.0a7

Problem:  if_py: find_module has been removed in Python 3.12.0a7
          (@Ghost-LZW)
Solution: Do not include find_module for Python >= 3.12.0a7

fixes: #14776
closes: #14781

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-05-17 18:30:01 +02:00
parent 2e642734f4
commit f0905a8613
4 changed files with 13 additions and 8 deletions

View File

@@ -7325,12 +7325,11 @@ populate_module(PyObject *m)
return -1;
}
# if PY_VERSION_HEX < 0x30c00a7
// find_module has been removed as of Python 3.12.0a7
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);
}
# endif
Py_DECREF(imp);