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

Closed
GoogleCodeExporter opened this issue Mar 18, 2015 · 1 comment
Closed

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

GoogleCodeExporter opened this issue Mar 18, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Mar 18, 2015

This piggy backs off of Issue 17
(http://code.google.com/p/ipaddr-py/issues/detail?id=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('::1.1.1.0/120')]

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

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

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

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

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

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

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

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

Out[4]: [IPv4('1.1.1.0/24'), IPv6('::1.1.1.0/120')]

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?

Thanks,

Dave M.

Original issue reported on code.google.com by drk...@gmail.com on 26 May 2009 at 2:38

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 18, 2015

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

Original comment by pmo...@google.com 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant