#11767: use context manager to close file in __getitem__ to prevent FD leak
All of the other methods in mailbox that create message objects take care to
close the file descriptors they use, so it seems to make sense to have
__getitem__ do so as well.
Patch by Filip GruszczyĆski.
diff --git a/Misc/NEWS b/Misc/NEWS
index 6cc0f03..ec8b72e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,6 +25,8 @@
Library
-------
+- Issue #11767: Correct file descriptor leak in mailbox's __getitem__ method.
+
- Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
connection if its getresponse() method fails with a socket error. Patch
written by Ezio Melotti.