[Bug 1421375] [NEW] AttributeError when attempting to access _sys.maxint

Adam Stokes adam.stokes at canonical.com
Thu Feb 12 19:47:25 UTC 2015


Public bug reported:

[Impact]
Anyone on Trusty wishing to utilize IPSets for gathering ranges of IPs.

[Test Case]
Code to reproduce:
from netaddr import IPSet
def get_ip_set(cidr):
    """ Returns a list of ip's in cidr for use in juju's no-proxy setting
    """
    ips = list(IPSet([cidr]))
    return ",".join(str(x) for x in ips)

get_ip_set('10.0.4.0/24')

[Regression Potentional]
None

[Other Info]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/share/openstack/cloudinstall/netutils.py", line 78, in get_ip_set
    ips = list(IPSet([cidr]))
  File "/usr/lib/python3/dist-packages/netaddr/ip/sets.py", line 518, in __len__
    if size > _sys.maxint:
AttributeError: 'module' object has no attribute 'maxint'

** Affects: python-netaddr (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: python-netaddr (Ubuntu Trusty)
     Importance: High
         Status: New


** Tags: cloud-installer

** Patch added: "python-netaddr_0.7.10-1ubuntu14.04.2.debdiff"
   https://bugs.launchpad.net/bugs/1421375/+attachment/4318195/+files/python-netaddr_0.7.10-1ubuntu14.04.2.debdiff

** Also affects: python-netaddr (Ubuntu Trusty)
   Importance: Undecided
       Status: New

** Changed in: python-netaddr (Ubuntu Trusty)
   Importance: Undecided => High

** Changed in: python-netaddr (Ubuntu Trusty)
    Milestone: None => ubuntu-14.04.2

** Patch removed: "python-netaddr_0.7.10-1ubuntu14.04.2.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/python-netaddr/+bug/1421375/+attachment/4318195/+files/python-netaddr_0.7.10-1ubuntu14.04.2.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1421375

Title:
  AttributeError when attempting to access _sys.maxint

Status in python-netaddr package in Ubuntu:
  Fix Released
Status in python-netaddr source package in Trusty:
  New

Bug description:
  [Impact]
  Anyone on Trusty wishing to utilize IPSets for gathering ranges of IPs.

  [Test Case]
  Code to reproduce:
  from netaddr import IPSet
  def get_ip_set(cidr):
      """ Returns a list of ip's in cidr for use in juju's no-proxy setting
      """
      ips = list(IPSet([cidr]))
      return ",".join(str(x) for x in ips)

  get_ip_set('10.0.4.0/24')

  [Regression Potentional]
  None

  [Other Info]
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/share/openstack/cloudinstall/netutils.py", line 78, in get_ip_set
      ips = list(IPSet([cidr]))
    File "/usr/lib/python3/dist-packages/netaddr/ip/sets.py", line 518, in __len__
      if size > _sys.maxint:
  AttributeError: 'module' object has no attribute 'maxint'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-netaddr/+bug/1421375/+subscriptions



More information about the Ubuntu-sponsors mailing list