Skip to content

Commit eeb8daa

Browse files
msullivansrittau
authored andcommitted
Remove some spurious version checks in logging (#3292)
PR #3269 added some version checks for the argument type to setLevel and the existence of NullHandler. While these features weren't present in early versions of Python 3, they *are* present in Python 2.7, which leads to false positives.
1 parent 455f25a commit eeb8daa

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

stdlib/2and3/logging/__init__.pyi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ else:
1818
_ExcInfoType = Union[None, bool, _SysExcInfoType]
1919
_ArgsType = Union[Tuple[Any, ...], Mapping[str, Any]]
2020
_FilterType = Union[Filter, Callable[[LogRecord], int]]
21-
if sys.version_info >= (3, 2):
22-
_Level = Union[int, Text]
23-
else:
24-
_Level = int
21+
_Level = Union[int, Text]
2522
if sys.version_info >= (3, 6):
2623
from os import PathLike
2724
_Path = Union[str, PathLike[str]]
@@ -403,8 +400,7 @@ class FileHandler(StreamHandler):
403400
encoding: Optional[str] = ..., delay: bool = ...) -> None: ...
404401

405402

406-
if sys.version_info >= (3, 1):
407-
class NullHandler(Handler): ...
403+
class NullHandler(Handler): ...
408404

409405

410406
class PlaceHolder:

0 commit comments

Comments
 (0)