Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 0aa1ebb..4311ba2 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -3059,7 +3059,7 @@
 
 #if defined(USE_PYEXPAT_CAPI)
     /* link against pyexpat, if possible */
-    expat_capi = PyCObject_Import("pyexpat", "expat_CAPI");
+    expat_capi = PyCapsule_Import(PyExpat_CAPSULE_NAME, 0);
     if (expat_capi) {
         /* check that it's usable */
         if (strcmp(expat_capi->magic, PyExpat_CAPI_MAGIC) != 0 ||