[issue32394] socket lib beahavior change in 3.6.4
Ma Lin
report at bugs.python.org
Wed Jan 31 21:47:55 EST 2018
Ma Lin <malincns at 163.com> added the comment:
Base on Kamil's code, a little improvements.
if hasattr(sys, 'getwindowsversion'):
WIN_MAJOR, _, WIN_BUILD, *_ = sys.getwindowsversion()
if WIN_MAJOR == 10:
if WIN_BUILD >= 15063: # Windows 10 1703
pass
elif WIN_BUILD >= 14393: # Windows 10 1607
del socket.TCP_KEEPCNT
else:
del socket.TCP_KEEPCNT
del socket.TCP_FASTOPEN
elif WIN_MAJOR < 10:
del socket.TCP_KEEPCNT
del socket.TCP_FASTOPEN
Windows 10 versions:
https://technet.microsoft.com/en-us/windows/release-info.aspx
----------
nosy: +Ma Lin
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32394>
_______________________________________
More information about the Python-bugs-list
mailing list