|
37 | 37 | RootLogger, |
38 | 38 | StreamHandler, |
39 | 39 | ) |
40 | | -from typing import TYPE_CHECKING, Any, Mapping, TypeVar, overload |
41 | | - |
42 | | -from typing_extensions import TypeAlias |
| 40 | +from typing import TYPE_CHECKING, Any, Mapping, TypeVar, Union, overload |
43 | 41 |
|
44 | 42 | __all__ = [ |
45 | 43 | "DEBUG", |
|
60 | 58 | from types import TracebackType |
61 | 59 |
|
62 | 60 | # see https://github.com/python/typeshed/blob/main/stdlib/logging/__init__.pyi |
63 | | - _SysExcInfoType: TypeAlias = ( |
64 | | - tuple[type[BaseException], BaseException, TracebackType | None] |
65 | | - | tuple[None, None, None] |
66 | | - ) |
67 | | - _ExcInfoType: TypeAlias = None | bool | _SysExcInfoType | BaseException |
68 | | - _ArgsType: TypeAlias = tuple[object, ...] | Mapping[str, object] |
| 61 | + _SysExcInfoType = Union[ |
| 62 | + tuple[type[BaseException], BaseException, Union[TracebackType, None]], |
| 63 | + tuple[None, None, None], |
| 64 | + ] |
| 65 | + _ExcInfoType = Union[None, bool, _SysExcInfoType, BaseException] |
| 66 | + _ArgsType = Union[tuple[object, ...], Mapping[str, object]] |
69 | 67 |
|
70 | 68 |
|
71 | 69 | def _logsafe(val: T) -> str | T: |
|
0 commit comments