Ipaddr

Latest version: v2.2.0

Safety actively analyzes 688674 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

2.1.4

(2010-08-15)

* fix for issue66, more invalid IPv6 addresses will be rejected

2.1.3

(2010-06-12)

* fix for issue61, incorrect network containment (thanks bw.default)

2.1.2

(2010-05-31)

* Happy Memorial day.
* arithmetic for v4 and v6 address objects and ints (issue 57).
* fix address_exclude issue where excluding an address from itself puked.
* make sure addresses and networks don't compare.
* doc-string fixes (issue60)
* and masked() method to _BaseNet to return a network object with the host bits masked out (issue58)
* fix v6 subnet representation (email to ipaddr-py-dev)

2.1.1

(2010-03-02)

* bug with list comprehension in {{{ IPv4Network._is_valid_netmask() }}}
* kill the last remaining instances of the old exceptions in the docstrings(thanks Scott Kitterman)

2.1.0

(2010-02-13)

Easier change this time :)

* networks and addresses are unsortable by default (see https://groups.google.com/group/ipaddr-py-dev/browse_thread/thread/8fbc5166be71adbc for discussion).
* exception text cleanup.
* fixing inconsistent behavior of v4/v6 address/network comparisons.
* add IPv4Network().is_unspecified (thanks rep.dot.net)
* fix for decoding mapped addresses (thanks rlaager)
* docstring updates (thanks Scott Kitterman)
* fix errant ref to non-existent variable(s) (thanks Harry Bock)
* fix exceptions (most exceptions are subclassed from ValueError now, so this can easily be caught)
* iterator for looping through subnets (thanks Marco Giutsi)

That's mostly it. there were quite a few other minor changes, but this should cover the major bits. Usage.wiki will be updated in the coming days.

2.0.0

First and foremost, this is a backwards incompatible change. Code written for ipaddr-1.x will likely not work stock with ipaddr-2.0. For users of the 1.x branch, I'll continue to provide support, but new-feature development has ceased. But it's not so bad, take a look.All in all, I think this new version of ipaddr is much more intuitive and easy to use.

The best way to get a feel for this code is to download it and try and out, but I've tried to list some of the more important changes below to help you out.

The major changes.

IPvXAddress and IPvXNetwork classes.

* Individual addresses are now (IPv4|IPv6)Address objects. Network attributes that are actually addresses (eg, broadcast, network, hostmask) are now (IPv4|IPv6)Address objects. That means no more IPv4/IPv6 classes handling only networks.
{{{
In [3]: ipaddr.IPv4Network("1.1.1.0/24")
Out[3]: IPv4Network('1.1.1.0/24')

In [4]: ipaddr.IPv4Network("1.1.1.0/24").network
Out[4]: IPv4Address('1.1.1.0')

In [5]: ipaddr.IPv4Network("1.1.1.0/24").broadcast
Out[5]: IPv4Address('1.1.1.255')
}}}

* no more ext methods. To reference the stringified version of any attribute, you call str() on (similar for the numeric value with int()).
{{{
In [6]: str(ipaddr.IPv4Network("1.1.1.0/24").broadcast)

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.