[New-bugs-announce] [issue46583] Modernize `selectors.py` by removing unused `sys.version_info` check

Nikita Sobolev report at bugs.python.org
Sun Jan 30 09:38:15 EST 2022

New submission from Nikita Sobolev <mail at sobolevn.me>:

Right now `selectors.py` contains this check on module-level:

if sys.version_info >= (3, 5):

Source: https://github.com/python/cpython/blame/8fb36494501aad5b0c1d34311c9743c60bb9926c/Lib/selectors.py#L53

Learning from other modules, we tend to remove lines like this when some python version reaches EOL. And since 3.4 is not support for a long time now, this condition is always true.

I propose to delete it.

components: Library (Lib)
messages: 412148
nosy: asvetlov, sobolevn, yselivanov
priority: normal
severity: normal
status: open
title: Modernize `selectors.py` by removing unused `sys.version_info` check
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list