Ma Lin <[email protected]> added the comment:
> 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
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32394>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com