Skip to content

Commit b7d5b1d

Browse files
donBarbossrittau
andauthored
Update logging.handlers.SysLogHandler for 3.14 (#14058)
* Update `logging.handlers.SysLogHandler` for 3.14 * Fix method name --------- Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
1 parent ceb4cb4 commit b7d5b1d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ importlib.machinery.__all__
7373
importlib.machinery.AppleFrameworkLoader
7474
importlib.util.__all__
7575
importlib.util.Loader
76-
logging.handlers.SysLogHandler.__init__
7776
multiprocessing.forkserver.main
7877
multiprocessing.managers.BaseListProxy.clear
7978
multiprocessing.managers.BaseListProxy.copy

stdlib/logging/handlers.pyi

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,19 @@ class SysLogHandler(Handler):
144144
priority_names: ClassVar[dict[str, int]] # undocumented
145145
facility_names: ClassVar[dict[str, int]] # undocumented
146146
priority_map: ClassVar[dict[str, str]] # undocumented
147-
def __init__(
148-
self, address: tuple[str, int] | str = ("localhost", 514), facility: str | int = 1, socktype: SocketKind | None = None
149-
) -> None: ...
147+
if sys.version_info >= (3, 14):
148+
timeout: float | None
149+
def __init__(
150+
self,
151+
address: tuple[str, int] | str = ("localhost", 514),
152+
facility: str | int = 1,
153+
socktype: SocketKind | None = None,
154+
timeout: float | None = None,
155+
) -> None: ...
156+
else:
157+
def __init__(
158+
self, address: tuple[str, int] | str = ("localhost", 514), facility: str | int = 1, socktype: SocketKind | None = None
159+
) -> None: ...
150160
if sys.version_info >= (3, 11):
151161
def createSocket(self) -> None: ...
152162

0 commit comments

Comments
 (0)