8000 fix type for multiprocessing.log_to_stderr(): allow int level by mikepii · Pull Request #9334 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

fix type for multiprocessing.log_to_stderr(): allow int level #9334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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