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>
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 3e5993b..e0fd3ea 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -7325,12 +7325,11 @@
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);
diff --git a/src/version.c b/src/version.c
index cd4c1af..682a468 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 417,
+/**/
416,
/**/
415,