Author giampaolo.rodola
Recipients Carlos.Ralli, Paul Marks, andreasr, asvetlov, berker.peksag, cheryl.sabella, dazhaoyu, giampaolo.rodola, gregory.p.smith, jaraco, jleedev, josiah.carlson, jpokorny, loewis, martin.panter, neologix, nirs, pitrou, r.david.murray
Date 2019-02-12.04:42:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
After iterating over this over the last few days I realized it makes more sense to implement and discuss the whole thing in here and as a single PR, so sorry about previously splitting this in a separate ticket/PR. Relevant PR is now this one and is ready for review:
Relevant changes which probably require attention/discussion are: 

1) since it was sort of ambiguous I renamed "has_dual_stack()" to "supports_hybrid_ipv46()". There could be space for some bikeshed as we already have "socket.has_ipv6" so this may be "has_hybrid_ipv46()" called instead

2) if family is unspecified and determined from *host* (e.g. "localhost" or "") the function sorts getaddrinfo() results preferring AF_INET over AF_INET6

3) doc includes link to my recipe for platforms not supporting hybrid_ipv46 natively

4) it may be worthwhile (or maybe not?) to have another complementary bind_sockets() (plural) function returning all items from getaddrinfo(). That would be useful for non-blocking apps/frameworks and could be reused by asyncio.

Also, I'm CC-ing people from issue20215 as it contains relevant comments.
Date User Action Args
2019-02-12 04:42:06giampaolo.rodolasetrecipients: + giampaolo.rodola, loewis, gregory.p.smith, jaraco, nirs, pitrou, josiah.carlson, r.david.murray, asvetlov, neologix, berker.peksag, martin.panter, jpokorny, jleedev, dazhaoyu, andreasr, Carlos.Ralli, Paul Marks, cheryl.sabella
2019-02-12 04:42:06giampaolo.rodolasetmessageid: <>
2019-02-12 04:42:06giampaolo.rodolalinkissue17561 messages
2019-02-12 04:42:06giampaolo.rodolacreate