classification
Title: asyncio cannot handle Python3 IPv4Address
Type: enhancement Stage: patch review
Components: asyncio Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Max Coplan, asvetlov, terry.reedy, xtreak, yselivanov
Priority: normal Keywords: patch

Created on 2019-12-02 01:07 by Max Coplan, last changed 2019-12-06 22:09 by terry.reedy.

Pull Requests
URL Status Linked Edit
PR 17434 open Max Coplan, 2019-12-02 01:09
Messages (4)
msg357697 - (view) Author: Max Coplan (Max Coplan) * Date: 2019-12-02 01:07
Trying to use new Python 3 `IPv4Address`s fails with the following error
```
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 1270, in _ensure_resolved
    info = _ipaddr_info(host, port, family, type, proto, *address[2:])
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 134, in _ipaddr_info
    if '%' in host:
TypeError: argument of type 'IPv4Address' is not iterable
```
msg357703 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2019-12-02 06:44
This looks like a duplicate of issue35019.
msg357714 - (view) Author: Max Coplan (Max Coplan) * Date: 2019-12-02 16:14
Well I’ve submitted a fix for it.  It isn’t perfect.  Well, while it doesn’t look perfect, it actually worked with everything I’ve thrown at it, and seems to be a very robust and sufficient fix.
msg357948 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-12-06 22:09
If this is a duplicate of #35019, then this issue should be closed, the original post here should be copied over, and the PR should be edited to point to the original issue, both in the title and the box below the title.
History
Date User Action Args
2019-12-06 22:09:09terry.reedysetnosy: + terry.reedy
messages: + msg357948
2019-12-02 16:14:36Max Coplansetmessages: + msg357714
2019-12-02 06:44:07xtreaksetversions: + Python 3.9, - Python 3.5, Python 3.6, Python 3.7, Python 3.8
nosy: + xtreak

messages: + msg357703

type: enhancement
2019-12-02 01:17:42Max Coplansettitle: asyncio cannot handle Python3 IPv4Address or IPv6 Address -> asyncio cannot handle Python3 IPv4Address
2019-12-02 01:09:17Max Coplansetkeywords: + patch
stage: patch review
pull_requests: + pull_request16913
2019-12-02 01:07:46Max Coplancreate