Author mhils
Recipients christian.heimes, mhils, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-02-09.18:27:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The latest Windows builds for Python 3.5.3/3.6.0 do not export socket.IPPROTO_IPV6, even though e.g. socket.IPV6_V6ONLY is exported. This seems to be wrong to me as IPV6_V6ONLY requires the corresponding socket option level IPPROTO_IPV6 to be actually useful. The same issue at least also applies to IPPROTO_IPV4.

christian.heimes mentioned that this is intended behaviour in as Windows would not define the constants. Now I am all but an expert on this, but it seems to me that IPPROTO_IPV6 is defined in Windows: Apologies if I'm missing something here.

Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32
>>> import socket; socket.IPPROTO_IPV6
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'socket' has no attribute 'IPPROTO_IPV6'

As a workaround, IPPROTO_IPV6 can be substituted with the hardcoded constant 41.
Date User Action Args
2017-02-09 18:27:42mhilssetrecipients: + mhils, paul.moore, christian.heimes, tim.golden, zach.ware, steve.dower
2017-02-09 18:27:42mhilssetmessageid: <>
2017-02-09 18:27:42mhilslinkissue29515 messages
2017-02-09 18:27:42mhilscreate