mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Add context manager support for QueueListener (3.14) (#13996)
This commit is contained in:
@@ -399,8 +399,6 @@ io.__all__
|
||||
io.Reader
|
||||
io.Writer
|
||||
ipaddress._IPAddressBase.version
|
||||
logging.handlers.QueueListener.__enter__
|
||||
logging.handlers.QueueListener.__exit__
|
||||
logging.handlers.SysLogHandler.__init__
|
||||
marshal.dump
|
||||
marshal.dumps
|
||||
|
||||
@@ -8,7 +8,9 @@ from logging import FileHandler, Handler, LogRecord
|
||||
from re import Pattern
|
||||
from socket import SocketKind, socket
|
||||
from threading import Thread
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, Final, Protocol, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -237,3 +239,9 @@ class QueueListener:
|
||||
def stop(self) -> None: ...
|
||||
def enqueue_sentinel(self) -> None: ...
|
||||
def handle(self, record: LogRecord) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user