import sys
from typing import Union, Protocol


class _HasFileno(Protocol):
    def fileno(self) -> int: ...


if sys.version_info >= (3, 5):
    _File = Union[_HasFileno, int]
else:
    _File = _HasFileno


def cancel_dump_traceback_later() -> None: ...
def disable() -> None: ...
def dump_traceback(file: _File = ..., all_threads: bool = ...) -> None: ...
def dump_traceback_later(timeout: int, repeat: bool = ..., file: _File = ..., exit: bool = ...) -> None: ...
def enable(file: _File = ..., all_threads: bool = ...) -> None: ...
def is_enabled() -> bool: ...
if sys.platform != "win32":
    def register(signum: int, file: _File = ..., all_threads: bool = ..., chain: bool = ...) -> None: ...
    def unregister(signum: int) -> None: ...
