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 9359afb..9b41b9d 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -990,8 +990,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() @@ -47,6 +47,8 @@ Core and Builtins 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. |