import sys
from typing import Union, Protocol

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

_File = Union[_HasFileno, int]

def cancel_dump_traceback_later() -> None: ...
def disable() -> None: ...
def dump_traceback(file: _File = ..., all_threads: bool = ...) -> None: ...
def dump_traceback_later(timeout: float, 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: ...
