Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollapseAddrList doesn't appear to be working as expected #18

GoogleCodeExporter opened this issue Mar 18, 2015 · 1 comment


Copy link

This piggy backs off of Issue 17

I've noticed the problem actually existing in latest trunk revision as well
(revision 71).

What steps will reproduce the problem?

In [1]: from ipaddr import *

In [2]: addresses = [IP(ip) for ip in IP('::')]

In [3]: addresses.extend([IP(ip) for ip in IP('')])

In [4]: len(addresses)
Out[4]: 512

In [5]: addresses[0]
Out[5]: IPv6('::101:100/128')

In [6]: addresses[-1]
Out[6]: IPv4('')

In [7]: CollapseAddrList(addresses)
Out[7]: [IPv4('')]

What is the expected output? What do you see instead?

In [7]: CollapseAddrList(addresses)
Out[7]: [IPv4(''), IPv6('::101:100/120')]

Or, alternatively (with a better representation of the IPv6 addresses) :-

Out[4]: [IPv4(''), IPv6('::')]

What version of the product are you using? On what operating system?

Windows XP

Please provide any additional information below.

Aside: Is this the right place to be raising these bugs or should we be
raising them against the Python bug tracker now that this project has been
integrated in the the Python 2.7 and 3.1 trees?


Dave M.

Original issue reported on by on 26 May 2009 at 2:38

Copy link

the correct exception is now raise, fixed in r96.  thanks for reporting this.

Original comment by on 27 Aug 2009 at 6:58

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant