diff -rup libxml2-2.9.4/python/types.c libxml2-2.9.4-new/python/types.c
--- libxml2-2.9.4/python/types.c	2016-02-09 02:17:33.000000000 -0800
+++ libxml2-2.9.4-new/python/types.c	2017-10-02 14:35:58.021494879 -0700
@@ -31,8 +31,12 @@ libxml_PyFileGet(PyObject *f) {
     const char *mode;
 
     fd = PyObject_AsFileDescriptor(f);
-    if (!_PyVerify_fd(fd))
-        return(NULL);
+    /*
+     * https://bugzilla.gnome.org/show_bug.cgi?id=776815
+     * if (!_PyVerify_fd(fd))
+     *   return(NULL);
+    */
+
     /*
      * Get the flags on the fd to understand how it was opened
      */