Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(28)

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by pmarks
Modified:
12 years, 8 months ago
Reviewers:
ek, Peter Moody
CC:
ipaddr-py-dev_googlegroups.com
Base URL:
http://ipaddr-py.googlecode.com/svn/trunk/
Visibility:
Public.

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

Patch Set 1 #

Patch Set 2 : Remove _ip_int_from_string's dangerous-looking default value handler. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -219 lines) Patch
M ipaddr.py View 1 14 chunks +130 lines, -186 lines 0 comments Download
M ipaddr_test.py View 5 chunks +73 lines, -33 lines 0 comments Download

Messages

Total messages: 4
pmarks
12 years, 8 months ago (2011-08-19 04:22:56 UTC) #1
Peter Moody
I'll check this out today. thanks. On Thu, Aug 18, 2011 at 9:22 PM, <pmarks@google.com> ...
12 years, 8 months ago (2011-08-19 16:34:34 UTC) #2
ek
lgtm, fwiw
12 years, 8 months ago (2011-08-21 10:41:09 UTC) #3
Peter Moody
12 years, 8 months ago (2011-08-22 17:31:18 UTC) #4
lgtm.

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

I'll apply this.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b