summaryrefslogtreecommitdiffstats
path: root/src/if_py_both.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h7
1 files changed, 3 insertions, 4 deletions
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 @@ 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);