diff options
-rw-r--r-- | Lib/logging/__init__.py | 4 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 4cef66f..7f94e39 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -976,8 +976,10 @@ class FileHandler(StreamHandler): 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() @@ -13,6 +13,8 @@ Core and Builtins Library ------- +- Issue #19523: Closed FileHandler leak which occurred when delay was set. + - Issue #13674: Prevented time.strftime from crashing on Windows when given a year before 1900 and a format of %y. |