Date: 4 Sep 2015
Date: 31 Aug 2015
Date: 30 Aug 2015
RFC 3021. Thanks to kalombos and braaen.
Date: 29 Jun 2015
Date: 31st Mar 2015
Fix weird build breakage in 0.7.13 (wrong Python path, incorrect OUI DB).
my_mac = EUI(“11:22:33:44:55:66”) my_mac == “11:22:33:44:55:66” and Python will return True on the “==” operator.
working under Python3.
Now, ”:” and no seperator are supported, which already worked for 48 bit EUIs.
Date: 31st Dec 2014
Date: 6th Jul 2014
Date: 19th Mar 2014
Stefan Nordhausen and Martijn van Oosterhout. As a side effect, IPSet(IPNetwork(“10.0.0.0/8”)) is now as fast as you’d expect.
Various performance improvements all over the place.
netaddr is now hosted on PyPI and can be installed via pip.
Doing “10.0.0.42” in IPNetwork(“10.0.0.0/24”) works now.
IPSet has two new methods: iscontiguous() and iprange(), thanks to Louis des Landes.
Re-added the IPAddress.netmask_bits() method that was accidently removed.
reserved IPv4 addresses any more. Thanks to marnickv for pointing that out.
Various bug fixes contributed by Wilfred Hughes, 2*yo and Adam Goodman.
FIXED Issue 58: https://github.com/drkjam/netaddr/issues/58
- foo.bar doesn’t throw AddrFormatError
FIXED Issue 57: https://github.com/drkjam/netaddr/issues/57
- netaddr packages not hosted on PyPI
FIXED Issue 56: https://github.com/drkjam/netaddr/issues/56
- Fix comparison with large IPSet()
FIXED Issue 55: https://github.com/drkjam/netaddr/pull/55
- Fix smallest_matching_cidr and all_matching_cidrs
FIXED Issue 53: https://github.com/drkjam/netaddr/issues/53
- Exclude 128.0.0.0/16 and possibly others from reserved range set?
FIXED Issue 51: https://github.com/drkjam/netaddr/issues/51
- Encoding errors in netaddr/eui/oui.txt
FIXED Issue 46: https://github.com/drkjam/netaddr/issues/46
- len(IPSet()) fails on python3
FIXED Issue 43: https://github.com/drkjam/netaddr/issues/43
- Method to check if IPSet is contiguous
FIXED Issue 38: https://github.com/drkjam/netaddr/issues/38
- netmask_bits is missing from the IPAddress
FIXED Issue 37: https://github.com/drkjam/netaddr/issues/37
- Test failures with Python 3.3
Date: 6th Sep 2012
FIXED Issue 36 - http://github.com/drkjam/netaddr/issues/36
- ResourceWarnings with Python >=3.2
FIXED Issue 35 - http://github.com/drkjam/netaddr/issues/35
FIXED Issue 34 - http://github.com/drkjam/netaddr/issues/34
FIXED Issue 33 - http://github.com/drkjam/netaddr/issues/33
FIXED Issue 23 - http://github.com/drkjam/netaddr/issues/23
FIXED Issue 22 - http://github.com/drkjam/netaddr/issues/22
Date: 28th Aug 2012
Date: 28th Aug 2012
FIXED Issue 31 - http://github.com/drkjam/netaddr/issues/31
- Exclude ‘39.0.0.0/8’ network from reserved set. Thanks Andrew Stromnov
FIXED Issue 28 - http://github.com/drkjam/netaddr/issues/28
- Fix algorithm in ipv6_link_local to fully conform to rfc4291. Thanks Philipp Wollermann
FIXED Issue 25 - http://github.com/drkjam/netaddr/issues/25
- install_requires is too aggressive? Thanks Adam Lindsay and commenters.
FIXED Issue 21 - http://github.com/drkjam/netaddr/issues/21
- deepcopy for EUI fails. Thanks Ryan Nowakowski.
Date: 30th May 2012
FIXED Issue 24 - http://github.com/drkjam/netaddr/issues/24
- Fixed TypeError when comparing BaseIP instance with non-BaseIP objects. Thanks pvaret
FIXED Issue 17 - http://github.com/drkjam/netaddr/issues/17
- For large ipv6 networks the .subnet() method fails. Thanks daveyss
FIXED Issue 20 - http://github.com/drkjam/netaddr/issues/20
- Test failure with Python 3. Thanks Arfrever
Date: 13th Sep 2011
FIXED Issue 15 - http://github.com/drkjam/netaddr/issues/15
- Incorrect and invalid glob produced when last octet is not *
FIXED Issue 13 - http://github.com/drkjam/netaddr/issues/13
- Added support for IPython 0.11 API changes. Thanks juliantaylor
FIXED Issue 11 - http://github.com/drkjam/netaddr/issues/11
- Calling valid_glob on cidr raises ValueError. Thanks radicand
FIXED Issue 7 - http://github.com/drkjam/netaddr/issues/7
- Unpickling Bug in IPSet. Thanks LuizOz and labeneator
FIXED Issue 2 - http://github.com/drkjam/netaddr/issues/2
- UnboundLocalError raised in IPNetwork constructor. Thanks keesbos
Date: 5th Oct 2010
FIXED Issue 49 - http://code.google.com/p/netaddr/issues/detail?id=49
- Incorrect IP range recognition on IPs with leading zeros
FIXED Issue 50 - http://code.google.com/p/netaddr/issues/detail?id=50
- CIDR block parsing
FIXED Issue 52 - http://code.google.com/p/netaddr/issues/detail?id=52
- ipv6 cidr matches incorrectly match ipv4 [sic]
FIXED Issue 53 - http://code.google.com/p/netaddr/issues/detail?id=53
- Error in online documentation
FIXED Issue 54 - http://code.google.com/p/netaddr/issues/detail?id=54
- IP recognition failure
FIXED Issue 55 - http://code.google.com/p/netaddr/issues/detail?id=55
- Support for Python 3.x
FIXED Issue 56 - http://code.google.com/p/netaddr/issues/detail?id=56
- checking IPAddress in IPNetwork
FIXED Issue 57 - http://code.google.com/p/netaddr/issues/detail?id=57
- netaddr objects can’t pickle
FIXED Issue 58 - http://code.google.com/p/netaddr/issues/detail?id=58
- IPSet operations should accept the same arguments as IPAddress
FIXED Issue 59 - http://code.google.com/p/netaddr/issues/detail?id=59
- netaddr fails to load when imported by a PowerDNS coprocess
Date: 2nd Dec 2009
Date: 14th Sep 2009
FIXED Issue 44 - http://code.google.com/p/netaddr/issues/detail?id=44
- int/long type error
FIXED Issue 46 - http://code.google.com/p/netaddr/issues/detail?id=46
- Question about IPv4 ranges
FIXED Issue 47 - http://code.google.com/p/netaddr/issues/detail?id=47
- IPNetwork cannot be evaluated as a boolean when it has a large size
Date: 20th Aug 2009
FIXED Issue 43 - http://code.google.com/p/netaddr/issues/detail?id=43
- IPNetwork(‘0.0.0.0/0’) not usable in for loop
Date: 14th Aug 2009
Renamed the netaddr shell script from ‘nash’ to plain ‘netaddr’. This is to avoid a potentially nasty clash with an important Linux tool with the same name.
Thanks to John Eckersberg for spotting this one early!
Updated IANA and IEEE data files with latest versions.
FIXED Issue 42 - http://code.google.com/p/netaddr/issues/detail?id=42
- Bug in cidr_merge() function when passed the CIDRs 0.0.0.0/0 and/or ::/0
Date: 11th Aug 2009
Please Note - This release represents a major overhaul of netaddr. It breaks backward compatibility with previous releases. See the API documentation for full details of what is available.
Some highlights of what has changed :-
FIXED Issue 13 - http://code.google.com/p/netaddr/issues/detail?id=13
- Searching for a match in a list of CIDR objects
FIXED Issue 26 - http://code.google.com/p/netaddr/issues/detail?id=26
- Refactor out use of isinstance()
FIXED Issue 28 - http://code.google.com/p/netaddr/issues/detail?id=28
- Add support for network block operations
FIXED Issue 34 - http://code.google.com/p/netaddr/issues/detail?id=34
- Addition issue?
Date: 11th Aug 2009
FIXED Issue 40 - http://code.google.com/p/netaddr/issues/detail?id=40
- Building RPM wth “python setup.py bdist_rpm” fails, multiple errors
Date: 23rd Jun 2009
FIXED Issue 33 - http://code.google.com/p/netaddr/issues/detail?id=33
- CIDR subtraction is broken for out-of-range CIDR objects
FIXED Issue 35 - http://code.google.com/p/netaddr/issues/detail?id=35
- install error (on Python interpreters where socket.has_ipv6 is False)
FIXED Issue 36 - http://code.google.com/p/netaddr/issues/detail?id=36
- netaddr.CIDR fails to parse default route CIDR
FIXED Issue 37 - http://code.google.com/p/netaddr/issues/detail?id=37
- Bug in bitwise AND operator for IP addresses
FIXED Issue 38 - http://code.google.com/p/netaddr/issues/detail?id=38
- Feature request: Addr.__nonzero__
FIXED Issue 39 - http://code.google.com/p/netaddr/issues/detail?id=39
- CIDR.abbrev_to_verbose() not applying implicit classful netmask rules consistently
Date: 13th Apr 2009
FIXED Issue 32 - http://code.google.com/p/netaddr/issues/detail?id=32
- Addr.__ne__ returns wrong answer
Date: 6th Apr 2009
FIXED Issue 23 - http://code.google.com/p/netaddr/issues/detail?id=23
- Improve IPv6 IPv4 mapped/compatible address formatting
FIXED Issue 24 - http://code.google.com/p/netaddr/issues/detail?id=24
- bug in CIDR.subnet() when using the fmt argument
FIXED Issue 29 - http://code.google.com/p/netaddr/issues/detail?id=29
- CIDR.subnet method’s count argument isn’t working as documented
FIXED Issue 30 - http://code.google.com/p/netaddr/issues/detail?id=30
- not compatible with Python 2.3
FIXED Issue 31 - http://code.google.com/p/netaddr/issues/detail?id=31
- byte order in documentation confusing or wrong
Date: 20th Jan 2009
Namespace changes
3 new sub namespaces have been added :-
Currently contains IEEE OUI and IAB classes and lookup code.
Currently contains IANA IPv4, IPv6 and IPv4 multicast lookup code.
Currently contains only a couple of classes that are shared between code in netaddr.eui and netaddr.ip.
Please Note: This change is part of a two stage internal restructuring of netaddr. In future releases, layer-2 MAC/EUI functionality will be separated from and layer-3 IP, CIDR and Wildcard functionality. All shared code will be moved to netaddr.core. When the migration is complete (expected in 0.7) the netaddr.address and netaddr.strategy namespaces will be removed. Please endeavour to access everything you need via the top-level netaddr namespace from this release onwards. See netaddr.__all__ for details of constants, objects, classes and functions intended for the public interface.
Addition of IEEE and IANA informational lookups
Addr() class removed from the public interface
Deletion of AddrRange() class
Addition of new IPRange() class
IP() class updates
nrange() generator function updates
CIDR() class updates
Many more MAC and IPv4 string address representation are now supported
__repr__() method behaviour change
‘klass’ property renamed to ‘fmt’ (format)
Complete re-work and consolidation of unit tests.
Nascent support for Python eggs and setuptools.
Date: 29th Sep 2008
Date: 23rd Sep 2008
Date: 19th Sep 2008
General
Access to all important object attributes in all netaddr classes now takes place via custom Python descriptor protocol classes. This has greatly simplified internal class logic and made external attributes changes much safer and less error prone. It has also made aggregate classes such as CIDR and Wildcard effectively read-write rather than read-only which they have been up until this release.
Ammended the way sort order is calculated for Addr and AddrRange (sub)class instances so that the address type is taken into account as well as as the numerical value of the address or address range. The ascending sort order is IPv4, IPv6, EUI-48 and EUI-64. Sequences of AddrRange (sub)class instances now sort correctly!
Comparisons between instances of Addr and AddrRange (sub)classes now return False, rather than raising an AttributeError.
Added checks and workaround code for Python runtime environments that suffer from the infamous socket module inet_aton(‘255.255.255.255’) bug. This was discovered recently in Python 2.4.x on PowerPC under MacOS X. The fix also applies in cases where the socket module is not available (e.g. on Google App Engine).
All general Exception raising in the strategy module has now been replaced with more specific exceptions, mainly ValueError (these were unintentionally missed out of the 0.4 release).
Implemented __hash__() operations for the Addr and AddrStrategy classes. This allows you to use IP, CIDR and Wildcard objects as keys in dictionaries and as elements in sets. Please note - this is currently an experimental feature which may change in future releases.
Added __ne__() operation to Addr and AddrRange classes.
Obeying the ‘Law of Demeter’, the address type of Addr and AddrRange (sub)class instances can be accessed using the property directly :-
obj.addr_type # 0.5 onwards
rather than having to go via the strategy object :-
obj.strategy.addr_type # 0.4 and earlier
Renamed the AT_DESCR lookup dictionary to AT_NAMES. Removed invalid and duplicated imports from all modules.
Addr class changes
IP class changes
AddrRange class changes
The AddrRange class no longer stores instances of Addr (sub)classes for the first and last address in the range. The instance variables self.start_addr and self.stop_addr have been renamed to self.first and self.last and the methods obj.first() and obj.last() have been removed.
Instead, self.first and self.last contain integer values and a reference to a strategy object is stored. Doing this is a lot more useful and cleaner for implementing internal logic.
To get Addr (sub)class objects (or strings, hex etc when manipulating the the klass property) use the index values obj[0] and obj[-1] as a substitute for obj.first() and obj.last() respectively.
AddrRange (sub)class instances now define the increment, __iadd__(), and decrement, __isub__(), operators. This allows you to ‘slide’ CIDRs and Wildcards upwards and downwards based on their block sizes.
The _retval() method has now been renamed data_flavour() - yes, the UK spelling ;-) You shouldn’t really care much about this as it mostly for internal use. I gave it a decent name as I didn’t see any real need to hide the functionality if users wanted it.
CIDR class changes
Wildcard class changes
Date: 7th Aug 2008
All general Exception raising has been replaced with more specific exceptions such as TypeError and ValueError and with the addition of two custom exception classes, AddrFormatError and AddrConversionError.
The IP class now accepts a subnet prefix. It is NOT strict about non-zero bits to the right of implied subnet mask, unlike the CIDR class (see below).
The CIDR class is now completely strict about non-zero bits to the right of the implied subnet netmask and raises a ValueError if they exist, with a handy hint as to the correct CIDR to be used based on the supplied subnet prefix.
The CIDR class now also supports abbreviated CIDR ranges and uses older classful network address rules to decided on a subnet prefix if one is not explicitly provided. Supported forms now include 10, 10/8 and 192.168/16. Currently only supports these options for IPv4 CIDR address ranges.
__repr__() methods have been defined for all classes in the netaddr module producing executable Python statements that can be used to re-create the state of any object.
CIDR and Wildcard classes now have methods that support conversions between these two aggregate types :-
- CIDR -> Wildcard
- Wildcard -> CIDR