Author aeros
Recipients aeros, asvetlov, dacut, gvanrossum, ned.deily, njs, pitrou, vaizki, yselivanov
Date 2019-11-21.21:17:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574371051.22.0.681641597824.issue37228@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2019-11-21 21:17:31aerossetrecipients: + aeros, gvanrossum, pitrou, ned.deily, njs, asvetlov, yselivanov, dacut, vaizki
2019-11-21 21:17:31aerossetmessageid: <1574371051.22.0.681641597824.issue37228@roundup.psfhosted.org>
2019-11-21 21:17:31aeroslinkissue37228 messages
2019-11-21 21:17:30aeroscreate