diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 15:07:36 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 15:07:36 +0200 |
commit | 57e011b18062844b9bedcd83ff8a61c252869cb8 (patch) | |
tree | 3a1f055c5e762c4e8bc52154eb2fe3da99d583f6 /Lib/selectors.py | |
parent | b299a50f09f8c9125bf25266364a44d208d50104 (diff) | |
parent | 65ceb387404beabce7a1a1d512cd4095900cf6b4 (diff) | |
download | cpython-57e011b18062844b9bedcd83ff8a61c252869cb8.tar.gz |
Issue #25725: Fixed a reference leak in pickle.loads() when unpickling
invalid data including tuple instructions.
Diffstat (limited to 'Lib/selectors.py')
-rw-r--r-- | Lib/selectors.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/selectors.py b/Lib/selectors.py index 6d569c30ad..ecd8632d70 100644 --- a/Lib/selectors.py +++ b/Lib/selectors.py @@ -43,9 +43,17 @@ def _fileobj_to_fd(fileobj): SelectorKey = namedtuple('SelectorKey', ['fileobj', 'fd', 'events', 'data']) -"""Object used to associate a file object to its backing file descriptor, -selected event mask and attached data.""" +SelectorKey.__doc__ = """SelectorKey(fileobj, fd, events, data) + + Object used to associate a file object to its backing + file descriptor, selected event mask, and attached data. +""" +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): """Mapping of file objects to selector keys.""" |