New submission from Jason R. Coombs:

When binding to a socket for creating a service, the socket API provides a 
mechanism for selecting only IPv4 or IPv6, but the simple operation of binding 
to all interfaces in a dual-stack environment is not easy, as is revealed in 
issue20215 and issue24209, but also in third-party packages. I ran into this 
during the implementation of aiosmtpd 
(https://gitlab.com/python-smtpd-hackers/aiosmtpd). As a long time maintainer 
of CherryPy, I've enjoyed the [dual stack 
support](https://bitbucket.org/cherrypy/cherrypy/src/536a9cb66e91de92502e766b2b0cf53d1cb5cb4a/cherrypy/wsgiserver/wsgiserver2.py?at=default&fileviewer=file-view-default#wsgiserver2.py-2007:2020)
 there.

I propose the Python stdlib provide a routine to facilitate this need more 
generally, and then invoke that implementation to address these other use-cases.

As it is a new feature, a backports package should be created to supply the 
same functionality for older Pythons.

Would this effort require a PEP? Is there a good place for such a routine 
(maybe socketserver)? Any other thoughts?

----------
components: Library (Lib)
messages: 254895
nosy: jason.coombs
priority: normal
severity: normal
status: open
title: Supply dual-stack (IPv4/IPv6) socket bind routine
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25667>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to