From ab3cd644dcd9404aef045110cbcca59ac1a0e928 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sun, 20 Jun 2021 08:09:18 -0700 Subject: [PATCH] add temporary ignore for FileHandler stream close --- src/_pytest/logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py index 4ab7b5e97..8b4865b5d 100644 --- a/src/_pytest/logging.py +++ b/src/_pytest/logging.py @@ -626,7 +626,8 @@ class LoggingPlugin: finally: self.log_file_handler.release() if old_stream: - old_stream.close() + # https://github.com/python/typeshed/pull/5663 + old_stream.close() # type:ignore[attr-defined] def _log_cli_enabled(self): """Return whether live logging is enabled."""