summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2024-05-17 18:30:01 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-17 18:30:26 +0200
commitf0905a86130c431eb29395b0eee68867e0c1c2dd (patch)
treeee76732fff873301e89b15f6b9df9c9475236b5e /src
parent2e642734f4be506483315b8881748a7ef45854f4 (diff)
patch 9.1.0417: if_py: find_module has been removed in Python 3.12.0a7v9.1.0417
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>
Diffstat (limited to 'src')
-rw-r--r--src/if_py_both.h7
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 3e5993bb64..e0fd3eafb0 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -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);
diff --git a/src/version.c b/src/version.c
index cd4c1af65e..682a46873a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 417,
+/**/
416,
/**/
415,