[Python-checkins] cpython (3.5): asyncio, selectors: Update to the upstream version
yury.selivanov
python-checkins at python.org
Wed Mar 2 10:41:56 EST 2016
https://hg.python.org/cpython/rev/42727861a4ef
changeset: 100389:42727861a4ef
branch: 3.5
parent: 100387:61f9be353c2c
user: Yury Selivanov <yselivanov at sprymix.com>
date: Wed Mar 02 10:37:59 2016 -0500
summary:
asyncio, selectors: Update to the upstream version
files:
Lib/selectors.py | 13 ++++++++++-
Lib/test/test_asyncio/test_subprocess.py | 3 +-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Lib/selectors.py b/Lib/selectors.py
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -43,9 +43,18 @@
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.
+"""
+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.''')
class _SelectorMapping(Mapping):
"""Mapping of file objects to selector keys."""
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -427,9 +427,10 @@
create = asyncio.create_subprocess_exec(sys.executable, '-c',
'pass', loop=self.loop)
- with support.check_no_resource_warning(self):
+ with warnings.catch_warnings(record=True) as warns:
with self.assertRaises(exc):
self.loop.run_until_complete(create)
+ self.assertEqual(warns, [])
if sys.platform != 'win32':
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list