Issue #20331: Fixed possible FD leaks in various modules:
http.server, imghdr, mailcap, mimetypes, xml.etree.
diff --git a/Lib/xml/etree/ElementInclude.py b/Lib/xml/etree/ElementInclude.py
index 6cc1b44..71eeb05 100644
--- a/Lib/xml/etree/ElementInclude.py
+++ b/Lib/xml/etree/ElementInclude.py
@@ -76,14 +76,13 @@
 
 def default_loader(href, parse, encoding=None):
     if parse == "xml":
-        file = open(href, 'rb')
-        data = ElementTree.parse(file).getroot()
+        with open(href, 'rb') as file:
+            data = ElementTree.parse(file).getroot()
     else:
         if not encoding:
             encoding = 'UTF-8'
-        file = open(href, 'r', encoding=encoding)
-        data = file.read()
-    file.close()
+        with open(href, 'r', encoding=encoding) as file:
+            data = file.read()
     return data
 
 ##