From a76978b28ffb3a23eac7b7a9c5d51c4541895a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Fri, 22 Sep 2023 00:54:19 +0200 Subject: [PATCH] Add _thread attribute for logging.handlers.QueueListener (#10747) --- stdlib/logging/handlers.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/logging/handlers.pyi b/stdlib/logging/handlers.pyi index ad5bf392b..2280dbad4 100644 --- a/stdlib/logging/handlers.pyi +++ b/stdlib/logging/handlers.pyi @@ -7,6 +7,7 @@ from collections.abc import Callable from logging import FileHandler, Handler, LogRecord from re import Pattern from socket import SocketKind, socket +from threading import Thread from typing import Any, ClassVar, Protocol, TypeVar _T = TypeVar("_T") @@ -264,6 +265,7 @@ class QueueListener: handlers: tuple[Handler, ...] # undocumented respect_handler_level: bool # undocumented queue: _QueueLike[Any] # undocumented + _thread: Thread | None # undocumented def __init__(self, queue: _QueueLike[Any], *handlers: Handler, respect_handler_level: bool = False) -> None: ... def dequeue(self, block: bool) -> LogRecord: ... def prepare(self, record: LogRecord) -> Any: ...