This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author augustogoulart
Recipients apatrushev, asvetlov, augustogoulart, sebastien.bourdeauducq, taleinat, yselivanov
Date 2018-11-07.00:33:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541550810.81.0.788709270274.issue33678@psf.upfronthosting.co.za>
In-reply-to
Content
This error seems to come from base_events.py, lines 142-145, and since it's an OS specific limitation, I can't see Sebastien's suggestion as a feasible solution.
Maybe we could come up with something along the lines of the following patch. What do you think about it?

diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 3726c556d4..15ee4d9d1b 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -142,6 +142,9 @@ def _ipaddr_info(host, port, family, type, proto):
     if '%' in host:
         # Linux's inet_pton doesn't accept an IPv6 zone index after host,
         # like '::1%lo0'.
+        if sys.platform.startswith('linux'):
+            return OSError("Linux's inet_pton doesn't accept an IPv6 "
+                           "zone index after host")
         return None
 
     for af in afs:
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 6d544d1eda..1b944ff89e 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -109,6 +109,9 @@ class BaseEventTests(test_utils.TestCase):
         self.assertIsNone(
             base_events._ipaddr_info('::3', 1, INET, STREAM, TCP))
 
+    @unittest.skipIf(sys.platform.startswith('linux'),
+        "Linux's inet_pton doesn't accept an IPv6 zone index after host")
+    def test_for(self):
         # IPv6 address with zone index.
         self.assertIsNone(
             base_events._ipaddr_info('::3%lo0', 1, INET6, STREAM, TCP))
History
Date User Action Args
2018-11-07 00:33:30augustogoulartsetrecipients: + augustogoulart, taleinat, asvetlov, yselivanov, sebastien.bourdeauducq, apatrushev
2018-11-07 00:33:30augustogoulartsetmessageid: <1541550810.81.0.788709270274.issue33678@psf.upfronthosting.co.za>
2018-11-07 00:33:30augustogoulartlinkissue33678 messages
2018-11-07 00:33:30augustogoulartcreate