bd808/python-iptools — pull request #6 by bd808 (2013-03-31 23:00:04+00:00)
Title: Support IPv6 addresses

Implement changes requested in #5.

Support core functions with IPv6 addresses:
* iptools.ipv6.validate_ip
* iptools.ipv6.ip2long
* iptools.ipv6.long2ip
* iptools.ipv6.validate_cidr
* iptools.ipv6.cidr2block

The prior IPv4 only functions were moved into a new iptools.ipv4 module.

IpRange stayed in the top level module and now works with both IPv4 and IPv6 inputs. It initially attempts to convert inputs to IPv4. If that fails it then tries an IPv6 conversion.

Special attention is also given to IPv4-mapped IPv6 addresses. When an IPv4 IpRange is checked for an IPv4-mapped IPv6 address the address will be converted to its IPv4 equivalent.

In typical weekend hackfest fashion I went beyond the original charter of the feature request and added quite a bit of internal change. The layout of the module was changed to be more "pythonic". Tests were switched to nose and expanded. I also ran flake8 checks and fixed multiple warnings. Travis CI integration has been changed to run flake8 as well. All topped off with a rework of the documentation.