Kyle Stanley <[email protected]> added the comment:
> some platforms apparently do have SO_REUSEPORT defined but the option still
> doesn't work, resulting in a ValueError exception from
> create_datagram_endpoint().
Are you aware of what currently supported platforms have SO_REUSEPORT defined
where the *reuse_port* parameter doesn't actually work? This would be quite
helpful to know.
AFAIK, it's available and supported on the majority of Unix platforms (such as
Linux 3.9+, MacOS and BSD). On Windows, SO_REUSEPORT is undefined.
Also, at the very least, the ValueError exception would occur is highly
informative and specific:
raise ValueError('reuse_port not supported by socket module, '
'SO_REUSEPORT defined but not implemented.')
> I just have a #ifdef block for every OS and don't even try to abstract it.
The main issue with this approach for our purposes is that we don't directly
support every single available platform, as making the code specific to an OS
incurs a long-term maintenance cost. See
https://www.python.org/dev/peps/pep-0011/ for more details. Indirect patches
are fine, but we only add platform-specific code if it is officially supported:
"Patches which add platform-specific code such as the name of a specific
platform to the configure script will generally not be accepted without the
platform having official support."
IIUC, this applies to any code that explicitly defines the name of a specific
platform. Official support not only involves us having someone with commit
privileges that will provide it, but also a buildbot in place (or provided) and
having the OS *version* supported upstream. For example, I think Linux kernel
versions prior to 3.9 would fall under the category of "unsupported", since
they are not supported upstream.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com