summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/logging/__init__.py4
-rw-r--r--Misc/NEWS2
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()
diff --git a/Misc/NEWS b/Misc/NEWS
index 70988fe..dddf7ca 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.