Skip to content

Commit

Permalink
fix type for multiprocessing.log_to_stderr(): allow int level (#9334)
Browse files Browse the repository at this point in the history
Co-authored-by: AlexWaygood <[email protected]>
  • Loading branch information
mikepii and AlexWaygood authored Dec 5, 2022
1 parent 0c3cf8f commit 89fb1d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stdlib/multiprocessing/context.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ctypes
import sys
from collections.abc import Callable, Iterable, Sequence
from ctypes import _CData
from logging import Logger
from logging import Logger, _Level as _LoggingLevel
from multiprocessing import popen_fork, popen_forkserver, popen_spawn_posix, popen_spawn_win32, queues, synchronize
from multiprocessing.managers import SyncManager
from multiprocessing.pool import Pool as _Pool
Expand Down Expand Up @@ -107,7 +107,7 @@ class BaseContext:
) -> Any: ...
def freeze_support(self) -> None: ...
def get_logger(self) -> Logger: ...
def log_to_stderr(self, level: str | None = ...) -> Logger: ...
def log_to_stderr(self, level: _LoggingLevel | None = ...) -> Logger: ...
def allow_connection_pickling(self) -> None: ...
def set_executable(self, executable: str) -> None: ...
def set_forkserver_preload(self, module_names: list[str]) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions stdlib/multiprocessing/util.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import threading
from _typeshed import Incomplete, ReadableBuffer, SupportsTrunc
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
from logging import Logger
from logging import Logger, _Level as _LoggingLevel
from typing import Any, SupportsInt
from typing_extensions import SupportsIndex

Expand Down Expand Up @@ -37,7 +37,7 @@ def debug(msg: object, *args: object) -> None: ...
def info(msg: object, *args: object) -> None: ...
def sub_warning(msg: object, *args: object) -> None: ...
def get_logger() -> Logger: ...
def log_to_stderr(level: int | None = ...) -> Logger: ...
def log_to_stderr(level: _LoggingLevel | None = ...) -> Logger: ...
def is_abstract_socket_namespace(address: str | bytes | None) -> bool: ...

abstract_sockets_supported: bool
Expand Down

0 comments on commit 89fb1d5

Please sign in to comment.