Author malin
Recipients asvetlov, malin, ned.deily, njs, paul.moore, skn78, steve.dower, thatiparthy, tim.golden, tjguk, zach.ware
Date 2018-02-05.03:47:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517802441.94.0.467229070634.issue32394@psf.upfronthosting.co.za>
In-reply-to
Content
> We don't remove unsupported socket flags on Unix, why should we do it for Windows?

We have this problem because: compile with new Windows SDK, but run on old version Windows.
On Linux/Unix, the compile-time headers always consist with the system, so there should not has this problem.
Correct me if I'm wrong.

> The other option would be to always hide the new constant on Windows in 3.6, and make it unconditionally available on 3.7.

Search on GitHub [1], most people only check whether `socket` has such flags, like this:
if hasattr(socket, "TCP_KEEPCNT"):
    ...
    
Most of they don't check platform or Python version, so I'm -1 on this option.

-----------------
TCP_KEEPIDLE and TCP_KEEPINTVL were added in Windows 10 1709. [2]
The master branch on AppVeyor is using 10.0.16229 (1709) SDK. [3]
While 3.6 branch is using 10.0.15062 (1703) SDK. [4]
If you agree the way of PR 5523, maybe we should remove these two flags as well.

[1] https://github.com/search?l=Python&p=1&q=TCP_KEEPCNT&type=Code&utf8=%E2%9C%93
[2] https://msdn.microsoft.com/en-us/library/windows/desktop/ms738596.aspx
[3] https://github.com/isuruf/cpython/blob/master/PCbuild/python.props#L78
[4] https://github.com/isuruf/cpython/blob/3.6/PCbuild/python.props#L77
History
Date User Action Args
2018-02-05 03:47:22malinsetrecipients: + malin, paul.moore, tim.golden, ned.deily, njs, asvetlov, zach.ware, steve.dower, thatiparthy, tjguk, skn78
2018-02-05 03:47:21malinsetmessageid: <1517802441.94.0.467229070634.issue32394@psf.upfronthosting.co.za>
2018-02-05 03:47:21malinlinkissue32394 messages
2018-02-05 03:47:21malincreate