[Python-checkins] cpython (merge 3.3 -> default): Closes #19523: Merged fix from 3.3.

vinay.sajip python-checkins at python.org
Fri Nov 15 21:43:04 CET 2013


http://hg.python.org/cpython/rev/a3640822c3e6
changeset:   87122:a3640822c3e6
parent:      87119:b9c9c4b2effe
parent:      87121:058810fe1b98
user:        Vinay Sajip <vinay_sajip at yahoo.co.uk>
date:        Fri Nov 15 20:42:47 2013 +0000
summary:
  Closes #19523: Merged fix from 3.3.

files:
  Lib/logging/__init__.py |  4 +++-
  Misc/NEWS               |  2 ++
  2 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -990,8 +990,10 @@
                 self.flush()
                 if hasattr(self.stream, "close"):
                     self.stream.close()
-                StreamHandler.close(self)
                 self.stream = None
+            # Issue #19523: call unconditionally to
+            # prevent a handler leak when delay is set
+            StreamHandler.close(self)
         finally:
             self.release()
 
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -47,6 +47,8 @@
 Library
 -------
 
+- Issue #19523: Closed FileHandler leak which occurred when delay was set.
+
 - Issue #19544 and #6516: Restore support for --user and --group parameters to
   sdist command accidentally rolled back as part of the distutils2 rollback.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list