python3-netaddr 0.7.10 with poor python3 support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-netaddr (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 14.04 (beta2) currently ships with python3-netaddr 0.7.10:
$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
$ apt-cache policy python3-netaddr
python3-netaddr:
Installed: 0.7.10-1build1
Candidate: 0.7.10-1build1
Version table:
*** 0.7.10-1build1 0
500 http://
100 /var/lib/
This release is over 18 months old. In the current release there are a lot of bugfixes. During my development I got some nasty errors which are fixed in the current relese 0.7.11. See [1].
Especially the bug about the len() in IPSet makes the library not really useful in python3.
$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from netaddr import IPSet
>>> len(IPSet(
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
if size > _sys.maxint:
AttributeError: 'module' object has no attribute 'maxint'
>>>
This is because in python3 sys.maxint not exists and is replaced by sys.maxsize
It seems this version was not completely ported to python3. This bug[2] (and others) are fixed in the current stable version 0.7.11
I would suggest to give this library a version bumb to 0.7.11.
If I can support you somehow, let it me know.
[1] http://
[2] https:/
later release have the newer version, however trusty still has 0.7.10 - are there any specific bugs we should cherry pick for the py3 support? it might be better to resolve specific bug users experience.