[Python-checkins] bpo-46583: remove unused `sys.version_info` check from `selectors` (GH-31023)

asvetlov webhook-mailer at python.org
Wed Feb 2 03:15:30 EST 2022


https://github.com/python/cpython/commit/3483aa65dfebfc60a87ea9db3f20da84be41f606
commit: 3483aa65dfebfc60a87ea9db3f20da84be41f606
branch: main
author: Nikita Sobolev <mail at sobolevn.me>
committer: asvetlov <andrew.svetlov at gmail.com>
date: 2022-02-02T10:15:02+02:00
summary:

bpo-46583: remove unused `sys.version_info` check from `selectors` (GH-31023)

files:
M Lib/selectors.py

diff --git a/Lib/selectors.py b/Lib/selectors.py
index bb15a1cb1bada..af6a4f94b5008 100644
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -50,12 +50,11 @@ def _fileobj_to_fd(fileobj):
     Object used to associate a file object to its backing
     file descriptor, selected event mask, and attached data.
 """
-if sys.version_info >= (3, 5):
-    SelectorKey.fileobj.__doc__ = 'File object registered.'
-    SelectorKey.fd.__doc__ = 'Underlying file descriptor.'
-    SelectorKey.events.__doc__ = 'Events that must be waited for on this file object.'
-    SelectorKey.data.__doc__ = ('''Optional opaque data associated to this file object.
-    For example, this could be used to store a per-client session ID.''')
+SelectorKey.fileobj.__doc__ = 'File object registered.'
+SelectorKey.fd.__doc__ = 'Underlying file descriptor.'
+SelectorKey.events.__doc__ = 'Events that must be waited for on this file object.'
+SelectorKey.data.__doc__ = ('''Optional opaque data associated to this file object.
+For example, this could be used to store a per-client session ID.''')
 
 
 class _SelectorMapping(Mapping):



More information about the Python-checkins mailing list