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 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-04-08.22:39:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554763170.23.0.259333934925.issue17561@roundup.psfhosted.org>
In-reply-to
Content
Patch committed as of:
https://github.com/python/cpython/commit/eb7e29f2a9d075accc1ab3faf3612ac44f5e2183
For posterity, since the API evolved since the original proposal (as per PR review/suggestions), this is the final incarnation:

    # IPv4 only
    >>> socket.create_server(addr)  
    # IPv6 only
    >>> socket.create_server(addr, family=socket.AF_INET6)
    # IPv4 + IPv6
    >>> socket.create_server(addr, family=socket.AF_INET6, dualstack_ipv6=True)
    # IPv4/6 if possible and don't care about IPv4 mapped addresses, else IPv4
    >>> if socket.has_dualstack_ipv6():
    ...    s = socket.create_server(addr, family=socket.AF_INET6, dualstack_ipv6=True)
    ... else:
    ...    s = socket.create_server(addr)
History
Date User Action Args
2019-04-08 22:39:30giampaolo.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-04-08 22:39:30giampaolo.rodolasetmessageid: <1554763170.23.0.259333934925.issue17561@roundup.psfhosted.org>
2019-04-08 22:39:30giampaolo.rodolalinkissue17561 messages
2019-04-08 22:39:30giampaolo.rodolacreate