Conversation
ipwhois/tests/test_net.py
Outdated
| self.assertRaises(IPDefinedError, Net, IPv6Address('fe80::')) | ||
| self.assertRaises(IPDefinedError, Net, '192.168.0.0/16') | ||
| self.assertRaises(IPDefinedError, Net, 'fe80::/10') | ||
| self.assertRaises(IPDefinedError, Net, IPv4Network('192.168.0.0/16')) |
There was a problem hiding this comment.
This is not building on Python 2.7. I think it has to do with your addition of unicode() which seems unnecessary.
There was a problem hiding this comment.
I fixed that, the problem was that the test used ipaddr.IPv4Network but now the net.py code check for ipaddress.IPv4Network. ipaddr has been superseded by ipaddress for both python3 and python2. It might be better to replace all the instances of ipaddr to ipaddress across all the files?
|
@romain-fontugne Still not building for 2.7. ipaddress is not built in on Python 2.7 |
|
@romain-fontugne Actually, after I have reviewed this, I don't see the point in this if it only uses the first address in a range. Can you explain why this is needed? |
|
@secynic sorry, I haven't take the time to look at that. Only the is_defined check is done with the first IP in the range. The query is done with the prefix. Prefix 1.2.0.0/16 and 1.2.0.0/24 have the same first IP but could have different whois info. |
|
I could really make use of this feature too. |
|
Hey Alistair, |
|
Probably removing python 2 support. Will revisit this. |
This allows to query an IP prefix, for example 8.8.8.0/24 or 8.0.0.0/9
The is_defined check is done with the first IP in the range.
fixes #250