Ma Lin <malin...@163.com> added the comment:
> We don't remove unsupported socket flags on Unix, why should we do it for
We have this problem because: compile with new Windows SDK, but run on old
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 , most people only check whether `socket` has such flags,
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. 
The master branch on AppVeyor is using 10.0.16229 (1709) SDK. 
While 3.6 branch is using 10.0.15062 (1703) SDK. 
If you agree the way of PR 5523, maybe we should remove these two flags as well.
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list