New submission from Maximilian Hils:

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 
https://bugs.python.org/issue6926 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:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff543746(v=vs.85).aspx.
 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.

----------
components: Windows
messages: 287449
nosy: christian.heimes, mhils, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to