Open GoogleCodeExporter opened 9 years ago
hello, could we please have an update to this issue?
Original comment by l...@google.com
on 12 Mar 2013 at 12:07
This is a patch against the 3144 branch:
diff -ruN 3144/ipaddr.py 3144.RFC6598/ipaddr.py
--- 3144/ipaddr.py 2012-08-09 09:22:12.649041896 +0200
+++ 3144.RFC6598/ipaddr.py 2013-03-20 10:26:59.569456478 +0100
@@ -1173,6 +1173,7 @@
"""
return (self in IPv4Network('10.0.0.0/8') or
+ self in IPv4Network('100.64.0.0/10') or
self in IPv4Network('172.16.0.0/12') or
self in IPv4Network('192.168.0.0/16'))
diff -ruN 3144/ipaddr_test.py 3144.RFC6598/ipaddr_test.py
--- 3144/ipaddr_test.py 2013-03-20 10:28:28.708508165 +0100
+++ 3144.RFC6598/ipaddr_test.py 2013-03-20 10:29:09.151991621 +0100
@@ -20,7 +20,9 @@
import unittest
import time
-import ipaddress
+import ipaddr
+
+ipaddress = ipaddr
# Compatibility function to cast str to bytes objects
if ipaddress._compat_has_real_bytes:
@@ -788,6 +790,7 @@
self.assertEqual(False, ipaddress.ip_network('11.0.0.0').is_private)
self.assertEqual(True, ipaddress.ip_network('172.31.255.255').is_private)
self.assertEqual(False, ipaddress.ip_network('172.32.0.0').is_private)
+ self.assertEqual(True, ipaddress.ip_network('100.64.1.0').is_private)
self.assertEqual(True,
ipaddress.ip_interface(
@@ -812,6 +815,7 @@
self.assertEqual(False, ipaddress.ip_address('11.0.0.0').is_private)
self.assertEqual(True, ipaddress.ip_address('172.31.255.255').is_private)
self.assertEqual(False, ipaddress.ip_address('172.32.0.0').is_private)
+ self.assertEqual(True, ipaddress.ip_address('100.64.3.4').is_private)
self.assertEqual(True,
ipaddress.ip_address('169.254.100.200').is_link_local)
Original comment by gurub...@gmail.com
on 20 Mar 2013 at 9:30
Original issue reported on code.google.com by
l...@google.com
on 1 Mar 2013 at 12:29