2.1.9 is not py3k compatible

30 views
Skip to first unread message

Xian Chen

unread,
Mar 22, 2011, 7:34:36 PM3/22/11
to ipaddr-py-dev
OS: Mac 10.6.6
python: 3.1

install ipaddr 2.1.9

run:

>>import ipaddr
>>a=ipaddr.IPv4Network('137.99.1.1/32')

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.1/site-packages/ipaddr.py", line 1280,
in __init__
if isinstance(address, (int, long)):
NameError: global name 'long' is not defined

Peter Moody

unread,
Mar 22, 2011, 8:10:07 PM3/22/11
to Xian Chen, ipaddr-py-dev
are you using svn or a package? if you're using svn, you should use the output of test-2to3.sh which is py3 compatible.
--
Peter Moody      Google    1.650.253.7306    
Network Security Engineer  pgp:0xC3410038


Xian Chen

unread,
Mar 22, 2011, 8:13:33 PM3/22/11
to Peter Moody, ipaddr-py-dev
I just download the 2.1.9 package, not check out the latest version.

thanks,
xian

Peter Moody

unread,
Mar 23, 2011, 11:45:17 AM3/23/11
to Xian Chen, ipaddr-py-dev
there should be a py-3k version. ask the port maintainer?
Reply all
Reply to author
Forward
0 new messages