Github issue #70
Add IPv6 support.
Authored by mordervomubel ( https://github.com/mordervomubel )
GitHub issue webpy/webpy #70
Added doctest for validip and validaddr
Glad to be of assistance. Thanks for applying the patch =)
Traceback (most recent call last):
File "boot.py", line 15, in
File "D:\PHPnow\htdocs\web\application.py", line 313, in run
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
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.