add a replacement API for PyCObject, PyCapsule #5630
All stdlib modules with C-APIs now use this.
Patch by Larry Hastings
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index ac118b4..ae09893 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -2809,7 +2809,7 @@
#if defined(USE_PYEXPAT_CAPI)
/* link against pyexpat, if possible */
- capi = PyCObject_Import("pyexpat", "expat_CAPI");
+ capi = PyCapsule_Import(PyExpat_CAPSULE_NAME, 0);
if (capi &&
strcmp(capi->magic, PyExpat_CAPI_MAGIC) == 0 &&
capi->size <= sizeof(*expat_capi) &&