[Python-checkins] cpython (merge 3.5 -> default): Merge 3.5 (asyncio)
yury.selivanov
python-checkins at python.org
Thu Jun 2 16:44:19 EDT 2016
https://hg.python.org/cpython/rev/45707b4547ea
changeset: 101618:45707b4547ea
parent: 101616:421bc6ae9b6f
parent: 101617:ad7766f342a7
user: Yury Selivanov <yselivanov at sprymix.com>
date: Thu Jun 02 16:44:10 2016 -0400
summary:
Merge 3.5 (asyncio)
files:
Lib/asyncio/base_events.py | 2 +-
Lib/test/test_asyncio/test_base_events.py | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -102,7 +102,7 @@
else:
return None
- if port in {None, ''}:
+ if port in {None, '', b''}:
port = 0
elif isinstance(port, (bytes, str)):
port = int(port)
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -132,6 +132,10 @@
self.assertEqual(
(INET, STREAM, TCP, '', ('1.2.3.4', 0)),
+ base_events._ipaddr_info('1.2.3.4', b'', INET, STREAM, TCP))
+
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 0)),
base_events._ipaddr_info('1.2.3.4', '', INET, STREAM, TCP))
self.assertEqual(
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list