This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pebenito
Recipients pebenito
Date 2014-11-05.15:34:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1415201685.68.0.536631906861.issue22800@psf.upfronthosting.co.za>
In-reply-to
Content
Python 3.3/3.4 sometimes does not recognize a legitimate IPv6Network netmask:

$ python3
Python 3.3.5 (default, May 28 2014, 13:56:57) 
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress as ip
>>> nodecon = ip.IPv6Network('ff00::/ff00::')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.3/ipaddress.py", line 2084, in __init__
    self._prefixlen = self._prefix_from_prefix_string(addr[1])
  File "/usr/lib64/python3.3/ipaddress.py", line 514, in _prefix_from_prefix_string
    self._report_invalid_netmask(prefixlen_str)
  File "/usr/lib64/python3.3/ipaddress.py", line 497, in _report_invalid_netmask
    raise NetmaskValueError(msg) from None
ipaddress.NetmaskValueError: 'ff00::' is not a valid netmask
>>> nodecon = ip.IPv6Network('ff00::/8')
>>> print(nodecon)
ff00::/8
>>> print(nodecon.with_netmask)
ff00::/ff00::

I get the same behavior on Python 3.4.2.
History
Date User Action Args
2014-11-05 15:34:45pebenitosetrecipients: + pebenito
2014-11-05 15:34:45pebenitosetmessageid: <1415201685.68.0.536631906861.issue22800@psf.upfronthosting.co.za>
2014-11-05 15:34:45pebenitolinkissue22800 messages
2014-11-05 15:34:45pebenitocreate