Re: ipaddr-py: New IPv4/IPv6 parsers and tests, ported from Guava (issue 4917042)

21 views
Skip to first unread message

Peter Moody

unread,
Aug 19, 2011, 12:34:01 PM8/19/11
to pma...@google.com, pmo...@google.com, ipaddr...@googlegroups.com, re...@codereview.appspotmail.com
I'll check this out today. thanks.

On Thu, Aug 18, 2011 at 9:22 PM, <pma...@google.com> wrote:
Reviewers: Peter Moody,

Description:
This patch contains a Python implementation of the IP parsing algorithms
that I wrote for Guava.  It validates and parses the address in one
step,
so a separate _is_valid_ip() function is no longer needed.

Also:
- Process ints instead of strings for ipv4_mapped, teredo, and
sixtofour.
- Make teredo() check for 2001::/32 instead of 2001::/16.

The original Guava code (also open sourced by Google) is here:
http://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/net/InetAddresses.java


Please review this at http://codereview.appspot.com/4917042/

Affected files:
 M     ipaddr.py
 M     ipaddr_test.py





--
Peter Moody      Google    1.650.253.7306    
Security Engineer  pgp:0xC3410038


pmo...@google.com

unread,
Aug 22, 2011, 1:31:18 PM8/22/11
to pma...@google.com, e...@google.com, ipaddr...@googlegroups.com, re...@codereview.appspotmail.com
lgtm.

This looks cleaner and is a bit quicker by my tests too.

I'll apply this.

http://codereview.appspot.com/4917042/

Reply all
Reply to author
Forward
0 new messages