ipv6 doctest for validip and validaddr #196

merged 2 commits into from Dec 13, 2012


None yet

6 participants


Github issue #70

@mordervomubel mordervomubel referenced this pull request Dec 13, 2012

IPv6 support #70


Github issue #70

@aaronsw aaronsw merged commit 703404e into webpy:master Dec 13, 2012
aaronsw commented Dec 13, 2012



Glad to be of assistance. Thanks for applying the patch =)

eslizn commented on 7348edd Jan 26, 2013

Traceback (most recent call last):
File "boot.py", line 15, in
File "D:\PHPnow\htdocs\web\application.py", line 313, in run
return wsgi.runwsgi(self.wsgifunc(*middleware))
File "D:\PHPnow\htdocs\web\wsgi.py", line 55, in runwsgi
server_addr = validip(listget(sys.argv, 1, ''))
File "D:\PHPnow\htdocs\web\net.py", line 108, in validip
if validip6addr(ip): return (ip,port)
File "D:\PHPnow\htdocs\web\net.py", line 33, in validip6addr
socket.inet_pton(socket.AF_INET6, address)
AttributeError: 'module' object has no attribute 'inet_pton'


python 2.7.3 web.py 0.35


I also experienced this issue on Windows 7 : shouldn't this suggested change be be made into 'net.py' and checked-in ? Am I wrong in thinking the whole library is essentially not working on any windows platform until this change is made ? I have made the local change to 'net.py', but this doesn't make my code very portable , as any other user will also need to make the same change prior to installing web.py ?


monojohnny: This change has been checked-in. That's why you're having the issue.
eslizn: For some reason, I didn't get a notice that you posted an error report.

Here's the reason socket.inet_pton() does not exist in the Windows version of python2: http://bugs.python.org/issue7171

At this point, our options are:
A. Persuade the python2 devs to add this feature to the Windows port.
B. Find another reliable way to check validity of IPv6 addresses
C. Make web.py work in python3

Anyone know where the proper place is to discuss this? Who's in charge of web.py now, by the way?


@mordervomubel I'm maintaining web.py. The porting of web.py to python3 is in progress. I hope it is over soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment