summaryrefslogtreecommitdiff
path: root/CHANGELOG
blob: 74ff5dca15599aa6aae0441ae54273d08dffa983 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
Release: 0.6.4
Date: 14th Jul 2009

Major changes since 0.6.3
-------------------------

Specific bug fixes addressed in this release
--------------------------------------------

* FIXED Issue 40 - http://code.google.com/p/netaddr/issues/detail?id=40

    - Building RPM wth "python setup.py bdist_rpm" fails, multiple errors

------------------------------------------------------------------------------
Release: 0.6.3
Date: 23rd Jun 2009

Major changes since 0.6.2
-------------------------

* Fixed line endings in a number of new files created under Windows.

* Tweaked the ordering of values in tuple passed into the hash() function in 
  the __hash__ method of the IP and IPRange classes to make it the same as 
  the values used for comparisons implemented in the __eq__ method (Python
  best practice).

* Added a number of unit tests to improve code coverage.

Specific bug fixes addressed in this release
--------------------------------------------

* 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

------------------------------------------------------------------------------

Release: 0.6.2
Date: 13th Apr 2009

Major changes since 0.6.1
-------------------------

* Refreshed IEEE and IANA data files with latest revisions from their 
  respective URLs.

  - IANA IPv4 Address Space Registry (last updated 2009-03-11)

  - Internet Multicast Addresses (last updated 2009-03-17)

  - IEEE OUI and IAB files (last updated 2009-04-13)

* Added get_latest_files() functions to both the netaddr.eui and 
  netaddr.ip modules to assist in automating release builds.

Specific bug fixes addressed in this release
--------------------------------------------

* FIXED Issue 32 - http://code.google.com/p/netaddr/issues/detail?id=32

    - Addr.__ne__ returns wrong answer

------------------------------------------------------------------------------

Release: 0.6.1
Date: 6th Apr 2009

Major changes since 0.6
-----------------------

* Added COPYRIGHT file with details and attribution for all 3rd party files
  bundled with netaddr.

* Minimum Python version required is now 2.4.x changed from 2.3.x.
  
  - Python 2.3 compatibility code in many sections of code have been removed.
  
  - the @property and @staticmethod decorators are now used throughout the 
    code along with the reversed() and sorted() builtin iterators.
    
  - A specific version check has also been added that will raise RuntimeError
    exceptions if you run netaddr on a Python interpreter version < 2.4.x.

* Integer addresses passed to the IP() and EUI() constructors no longer 
  require a mandatory second address type (AT_*) argument in most cases. This
  is now only really required to disambiguate between IPv4/IPv6 addresses with
  the same numerical value. The same behaviour applies to EUI-48/EUI-64 
  identifiers. A small speed boost is achieved if the 2nd address type 
  argument is explicitly provided.
  
* IPv6 addresses returned by EUI.ipv6_link_local() now always have a subnet
  prefix of /64.

* Default sort order of aggregate classes (IPRange, CIDR and Wildcard) has
  been changed (again). They now sort initially by first address and then
  by network block size from largest to smallest which feels more natural.

* Fixed a bug in the CIDR.abbrev_to_verbose() static method where IPv4 
  addresses with 4 octets (i.e. non-partial addresses) were being assigned
  subnet prefixes using abbreviated rules. All complete IPv4 addresses should
  always get a /32 prefix where it is not explicitly provided.

* Abbreviated address expansion in the CIDR constructor is now optional and
  can be controlled by a new 'expand_abbrev' boolean argument.

* Added the new CIDR.summarize() static method which transforms lists of IP
  addresses and CIDRs into their most compact forms. Great for trimming down
  large ad hoc address lists!

* Added the previous() and next() methods to the CIDR classes which return
  the CIDR subnets either side of a given CIDR that are of the same size.
  For the CIDR 192.0.2.0/24, previous will return 192.0.1.0/24 and next
  will return 192.0.3.0/24. Also accepts and optional step size (default
  is 1).
  
* Added the supernet() method to the CIDR class which returns a generator of
  all the subnets that contain the current CIDR found by decrementing the
  prefixlen value for each step until it reaches zero.

* Changed the way the fallback code works when the socket module is missing
  important constants and functions.

* Removed the uppercase options from the Strategy constructors and internals
  as this behaviour can be easily replicated using the word_fmt option 
  instead and requires less code (word_fmt='%X').

Specific bug fixes addressed in this release
--------------------------------------------

* 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

------------------------------------------------------------------------------

Release: 0.6
Date: 20th Jan 2009

Major changes since 0.5.x
-------------------------

* Namespace changes

  3 new sub namespaces have been added :-

  - netaddr.eui
  
  Currently contains IEEE OUI and IAB classes and lookup code.
  
  - netaddr.ip

  Currently contains IANA IPv4, IPv6 and IPv4 multicast lookup code.

  - netaddr.core

  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

  - the IP() and EUI() classes now have an additional info() method through 
    which contextual information about your addresses can be accessed. This
    data is published by IANA and the IEEE respectively and sourced directly 
    from text files bundled with netaddr that are available for download
    publically online. Details are available in the docstring of the relevant
    parsing classes. Subsequent netaddr releases will endeavour to keep 
    up-to-date with any updates to these files.
    
  - the EUI() class has been updated with the addition of the OUI() and IAB()
    classes. They provide object based access to returned via the EUI.info()
    method. Please see API docs included with netaddr for details.
    
  - added new NotRegisteredError exception that is raised when an EUI doesn't
    match any currently registration entries in the IEEE registry files.

* Addr() class removed from the public interface

  - This class is only ever meant to be used internally and its usage may soon
    be deprecated in favour converting it into an abstract base class in 
    future releases.
    
* Deletion of AddrRange() class

  - replaced with the more specific IPRange() class. AddrRange() wasn't
    very useful in practice. Too much time has been spent explaining its 
    theoretical merits over its actual practicality for every day use.

* Addition of new IPRange() class

  - the new base class for CIDR() and Wildcard().

  - a 'killer feature' of this new class are the new methods iprange(),
    cidrs() and wildcard() which allow you to use and switch between all 
    3 formats easily. IPRange('x', 'y').cidrs() is particularly useful
    returning all the intervening CIDRs between 2 arbitrary IP addresses.

  - IPRange() is a great place to expose several new methods available to
    sub classes. They are issupernet(), issubnet(), adjacent() and overlaps().

  - previous method called data_flavour() has been renamed (again) to a more
    suitable format().

* IP() class updates
  
  - is_netmask() and is_hostmask() methods have been optimised and are now 
    both approximately 4 times faster than previously!

  - added wildcard() and iprange() methods that return pre-initialised
    objects of those classes based on the current netmask / subnet prefix.

  - copy constructor methods ipv4() and ipv6() now preserve the value of the
    prefixlen property now also support IPv6 options for returning IPv4-mapped
    or IPv4-compatible IPv6 addresses.

  - added new methods is_loopback(), is_private(), is_link_local(), 
    is_ipv4_mapped() and is_ipv4_compat() which are all self explanatory.
    
  - added a bin() method which provides an IP address in the same format 
    as the standard Python bin() builtin type ('0bxxx') now available in 
    Python 2.6.x and higher.
    
  - added a packed() method which provides an IP address in packed binary 
    string format, suitable for passing directly to Python socket calls.
    
* nrange() generator function updates

  - by default this now returns IP() objects instead of Addr() objects.

* CIDR() class updates

  - the 'strict_bitmask' option in the CIDR class constructor has been had a
    name change and is now just 'strict' (less typing).

  - support for Cisco ACL-style (hostmask) prefixes. Also available to the 
    IP() class. They are converted to their netmask equivalents before being 
    applied to the base address.

  - added a new subnet() generator method that returns iterators to subnet 
    CIDRs found within the current CIDR object's boundaries e.g. a /24 CIDR
    can provide address with subnet prefixes between a /25 and /32.

  - added a new span() method which takes a list of IP, IPRange, CIDR and/or 
    Wildcards returning a single CIDR that 'spans' the lowest and highest 
    boundary addresses. An important property of this class is that only a 
    single CIDR is returned and that it (potentially) overlaps the start and
    end addresses. The most important aspect of this method is that it 
    identifies the left-most set of bits that are common to all supplied 
    addresses. It is the plumbing that makes a lot of other features function
    correctly.

  - although IPv6 doesn't support the concept of a broadcast address, after 
    some pondering I've decide to add network() and broadcast() methods to the
    CIDR class. It is an interface quirk that users expect so it has been 
    added for ease of use.
    
  - the methods network(), broadcast(), hostmask() and netmask() have been 
    wrapped in property() builtin calls to make them appear as read-only
    properties.

* Many more MAC and IPv4 string address representation are now supported

  - Improvements to both EUI and IP classes. They now accept many more valid
    address formats than previously. Thanks for all the bugs tickets raised.

* __repr__() method behaviour change

  - Using repr() now assume that you have performed a 'from netaddr import *'
    before you execute them. They no longer specify the originating namespace
    of objects which is a bit unnecessary and a lot to read on-screen.They 
    will also be moving around within the namespace shortly anyway so its
    best not to think of them as being anywhere other than directly below
    netaddr itself.

* 'klass' property renamed to 'fmt' (format)

  - now referred to as the 'format callable' property. An unfortunately but
    necessary change. 'klass' was a bad initial name choice as it most often
    doesn't even reference a class object also supporting references to Python
    types, builtin functions and user defined callables.

* Complete re-work and consolidation of unit tests.

  - now over 100 tests covering all aspects of the API and library
    functionality.
  - Moved all tests into a single file. Lots of additional tests have been
    added along with interface checks to ensure netaddr's always presents
    a predictable set of properties and methods across releases.

* Nascent support for Python eggs and setuptools.

  - Help is need to test this as it is not something I use personally.

Significant bug fixes
---------------------

* Finally fixed the IPv6 string address compression algorithm so that it 
  is now compliant with the socket modules inet_ntop() and inet_pton() calls.
  (not available on all platforms).

EXPERIMENTAL FEATURES
---------------------

* added bitwise operators to the IP class

  - does what it says on the tin. Does not effect that value of the IP object
    itself but rather, returns a new IP after the operation has been applied.

* IPRangeSet() class added (EXPERIMENTAL).

  - the intention with this class is to allows you to create collections of
    unique IP(), IPRange(), CIDR() and Wildcard() objects. It provides 
    iteration over IPs in the collection as well as several membership based
    operations such as any_match() all_matches(), min_match() and max_match().
  - lots more work to do here. Please raise bugs and feature requests against
    this as you find them. Improvements to this are coming in 0.7.

------------------------------------------------------------------------------

Release: 0.5.2
Date: 29th Sep 2008

Bug fixes for 0.5 - release 2
-----------------------------

* Fixed Issue 15 in bug tracker. Bad validation and conversion of IPv4 
  mapped IPv6 address values in IPv6Strategy class. Covered with unit
  test cases.
   
* Updated PrefixLenDescriptor() class so that modifications to the property
  CIDR.prefixlen also update CIDR.first and CIDR.last keeping them in sync.
  Covered by unit test cases.

* IP.hostname() method returns None when DNS lookup fails.

------------------------------------------------------------------------------

Release: 0.5.1
Date: 23rd Sep 2008

Bug fixes for 0.5 - release 1
-----------------------------

* CIDR constructor was throwing a TypeError for valid unicode string addresses
  which worked in previous releases. Fixed and covered with a unit test case.
  
* The methods CIDR.netmask() and CIDR.hostmask() contained code errors that
  were causing them to fail. Problem fixed and covered with unit test case.

------------------------------------------------------------------------------

Release: 0.5
Date: 19th Sep 2008

Major changes since 0.4.x
-------------------------

General changes
---------------

* 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
------------------

* removed the setvalue() method from the Addr class and replaced all uses of 
  __setattr__() replaced by custom descriptors throughout.

IP class changes
----------------

* removed the ambiguity with masklen and prefixlen attributes in the IP class.
  prefixlen now denotes the number of bits that define the netmask for an IP
  address. The new method netmask_bits() returns the number of non-zero bits 
  in an IP object if the is_netmask() method returns True. A prefixlen value
  other than /32 for an address where is_netmask() returns True is invalid 
  and will raise a ValueError exception.

* removed the family() method from the IP class. It duplicates information
  now provided by the prefixlen property.

* IP class has several new methods. is_multicast() and is_unicast() quickly 
  tell you what category of IP address you have and while ipv4() and ipv6() 
  act as IPv4 <-> IPv6 conversions or copy constructors depending on context.
  
* reverse DNS lookup entries now contain a trailing, top-level period (.)
  character appended to them.
  
* added the hostname() method to IP instances which performs a reverse DNS

* the IP class __str__() method now omits the subnet prefix is now implicit 
  for IPv4 addresses that are /32 and IPv6 addresses that are /128. Subnet
  prefix is maintained in return value for all other values.

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
------------------

* the strictness of the CIDR class constructor in relation to non-zero bits
  once the prefix bitmask has been applied can be disabled use the optional
  argument strict_bitmask=False. It is True (strictness enabled) by default.

* fixed a bug in abbreviated CIDR conversion. Subnet prefix for multicast 
  address 224.0.0.0 is now /4 instead of /8.

* the CIDR class now supports subtraction between two CIDR objects, returning
  a list of the remainder. Please note that the bigger of the two CIDR objects
  must be on the left hand side of the the expression, otherwise an empty list
  is return. Sorry, you are not allowed to create negative CIDRs ;-)

* the function abbrev_to_cidr() has been renamed to and turned into the static 
  method CIDR.abbrev_to_verbose(). No major changes to the logic have been
  made.
  
Wildcard class changes
----------------------

* the Wildcard class now defines a static method Wildcard.is_valid() that 
  allows you to perform validity tests on wildcard strings without fully 
  instantiation a Wildcard object.

------------------------------------------------------------------------------

Release: 0.4
Date: 7th Aug 2008

Major changes since 0.3.x
-------------------------

* 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
    
Housekeeping Changes
--------------------

* massive docstring review and tidy up with the inclusino of epydoc specific 
  syntax to spruce up auto-generated API documentation.

* thorough review of code using pylint.

* netaddr module now has the special __version__ variable defined which is 
  also referenced by setup.py.

* some minor changes to setup.py and MANIFEST.in.

* constants and custom Exception classes have been moved to __init__.py from
  strategy.py
  
* an import * friendly __all__ has been defined for the netaddr namespace
  which should remove the need to delve too much into the address and strategy
  submodules.
  
* fixed a number of line-ending issues in several files.

------------------------------------------------------------------------------