forked from netaddr/netaddr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGELOG
893 lines (589 loc) · 33 KB
/
CHANGELOG
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
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
Release: 0.7.6
Date: 13th Sep 2011
Changes since 0.7.5
-------------------
* A bug fix point release
* Refreshed 3rd party data caches
* Tested against Python 3.2.x and PyPy 1.6.x
* Fixed unit tests under for Mac OSX
Specific bug fixes addressed in this release
--------------------------------------------
* 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
Miscellanea
-----------
- Has a famous soft drink company started making it own NICs?
---------------------------------------------------------------------
Release: 0.7.5
Date: 5th Oct 2010
Changes since 0.7.4
-------------------
* Python 3.x is now fully supported. The paint is still drying on this so
please help with testing and raise bug tickets when you find any issues!
New Issue Tracker - http://github.com/drkjam/netaddr/issues
* Moved code hosting to github. History ported thanks to svn2git.
- (http://github.com/nirvdrum/svn2git)
* All netaddr objects now use approx. 65% less memory due to the use of
__slots__ in classes throughout the codebase. Thanks to Stefan Nordhausen
and his Python guru for this suggestion!
* Applied many optimisations and speedups throughout the codebase.
* Fixed the behaviour of the IPNetwork constructor so it now behaves in
a much more sensible and expected way (i.e. no longer uses inet_aton
semantics which is just plain odd for network addresses).
* One minor change to behaviour in this version is that the .value property
on IPAddress and IPNetwork objects no longer support assignment using a
string IP address. Only integer value assignments are now valid. The impact
of this change should be minimal for the majority of users.
Specific bug fixes addressed in this release
--------------------------------------------
* 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
Miscellanea
-----------
- Welcome back to standards.ieee.org which seems to have been down for weeks!
- Goodbye Sun Microsystems + Merrill Lynch, hello Oracle + Bank of America ...
---------------------------------------------------------------------
Release: 0.7.4
Date: 2nd Dec 2009
Changes since 0.7.3
-------------------
* Applied speed patches by S. Nordhausen
* Fixed an inconsistency between EUI and IPAddress interfaces. Made
EUI.packed and EUI.bin properties (previously methods) and added a
words() property.
---------------------------------------------------------------------
Release: 0.7.3
Date: 14th Sep 2009
Changes since 0.7.2
-------------------
* Added __add__, __radd__, __sub__, __rsub__ operators to the IPAddress class.
* Added support for validation and iteration of simple nmap style IPv4 ranges
(raised in Issue 46).
* Removed some unused constants from fallback socket module.
Specific bug fixes addressed in this release
--------------------------------------------
* 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
---------------------------------------------------------------------
Release: 0.7.2
Date: 20th Aug 2009
Changes since 0.7.1
-------------------
* Fixed a boundary problem with the iter_iprange() generator function
and all associated calls to it throughout the codebase, including
unit test coverage and adjustments.
* Replaced regular expressions in cidr_merge() with pre-compiled equivalents
for a small speed boost.
* Adjustments to README raised by John Eckersberg.
Specific bug fixes addressed in this release
--------------------------------------------
* FIXED Issue 43 - http://code.google.com/p/netaddr/issues/detail?id=43
- IPNetwork('0.0.0.0/0') not usable in for loop
---------------------------------------------------------------------
Release: 0.7.1
Date: 14th Aug 2009
Changes since 0.7
-----------------
* 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.
Specific bug fixes addressed in this release
--------------------------------------------
* 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
---------------------------------------------------------------------
Release: 0.7
Date: 11th Aug 2009
Changes since 0.6.x
-------------------
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 :-
* Internal module hierarchy has been completely overhauled and redesigned. This
fixes up a lot of inconsistencies and problems with interdependent imports.
All public classes, objects, functions and constants are still published via
the main netaddr module namespace as in previous releases.
* No more AT_* and ST_* 'constants'.
* The Addr base class is gone. This removes the link between EUI and IP
functionality so the library is can now easily be split into distinct units
without many interdependencies between layer 2 and layer 3 functionality.
* The use of custom descriptor classes has been completely discontinued.
* Strategy classes and singleton objects have been replaced with a group of
strategy modules in their own netaddr.strategy namespace. Each IP or EUI
address object now holds a reference to a module rather than a singleton
object.
* Many operations that were previously static class methods are now presented as
functions in the relevant modules. See the API documentation for details.
* The IP and CIDR classes have been replaced with two new classes called
IPAddress and IPNetwork respectively. This name change is important as the IP
part of netaddr has been completed redesigned. The notion of an individual IP
address and an IP network or subnet has been made more obvious. IPAddress
objects are now true scalars and do not evaluate in a list or tuple context.
They also do not support any notion of a netmask or CIDR prefix; this is the
primary function of an IPNetwork object.
* Abritrary IP ranges and are still supported but a lot of their functionality
has also been exposed via handy functions.
* IP globbing routines (previous known as Wildcards) have been moved into
their own submodule.
* Added a new IPSet class which fully emulates mutable Python sets. This
replaces a lot of half-baked experimental classes found in 0.5.x and 0.6.x
such as IPRangeSet and CIDRGroup. See documentation for details.
* All methods and properties that previously used or supported the 'fmt'
formatting property no longer do so. In all cases, objects are now returned to
correctly support pass through calls without side effects. It is up to the
user to extract data in the right format from the objects IPAddress objects
returned as required.
* Unit tests have been completed re-written to support docstring style tests
bundled into test suites. These are handy as they double up as documentation
being combined with wiki syntax. Implemented code coverage checking using
coverage 3.x.
* nash - a nascent shell like tool for the netaddr library (requires IPython).
* Support for RFC 1924 added ;-)
Specific bug fixes addressed in this release
--------------------------------------------
* 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?
---------------------------------------------------------------------
Release: 0.6.4
Date: 11th Aug 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.
------------------------------------------------------------------------------