Hello community,

here is the log from the commit of package python-ipaddress for 
openSUSE:Factory checked in at 2017-03-22 23:16:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ipaddress (Old)
 and      /work/SRC/openSUSE:Factory/.python-ipaddress.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ipaddress"

Wed Mar 22 23:16:59 2017 rev:3 rq:480665 version:1.0.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ipaddress/python-ipaddress.changes        
2016-07-18 21:22:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-ipaddress.new/python-ipaddress.changes   
2017-03-22 23:17:00.910529892 +0100
@@ -1,0 +2,16 @@
+Thu Mar 16 15:39:29 UTC 2017 - [email protected]
+
+- Use pypi.io as Source url
+
+-------------------------------------------------------------------
+Thu Mar 16 13:55:05 UTC 2017 - [email protected]
+
+- update to 1.0.18
+- add Provides for python2-ipaddress
+
+-------------------------------------------------------------------
+Mon Dec  5 20:17:55 UTC 2016 - [email protected]
+
+- Update to 1.0.17
+
+-------------------------------------------------------------------

Old:
----
  ipaddress-1.0.16.tar.gz

New:
----
  ipaddress-1.0.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ipaddress.spec ++++++
--- /var/tmp/diff_new_pack.4Q5GDX/_old  2017-03-22 23:17:01.734413185 +0100
+++ /var/tmp/diff_new_pack.4Q5GDX/_new  2017-03-22 23:17:01.734413185 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ipaddress
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,16 @@
 
 
 Name:           python-ipaddress
-Version:        1.0.16
+Version:        1.0.18
 Release:        0
 Summary:        IPv4/IPv6 manipulation library
 License:        Python-2.0
 Group:          Development/Languages/Python
 Url:            https://github.com/phihag/ipaddress
-Source:         
https://pypi.python.org/packages/source/i/ipaddress/ipaddress-%{version}.tar.gz
+Source:         
https://pypi.io/packages/source/i/ipaddress/ipaddress-%{version}.tar.gz
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
+Provides:       python2-ipaddress
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
 %{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}

++++++ ipaddress-1.0.16.tar.gz -> ipaddress-1.0.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipaddress-1.0.16/Makefile 
new/ipaddress-1.0.18/Makefile
--- old/ipaddress-1.0.16/Makefile       2015-07-14 21:39:53.000000000 +0200
+++ new/ipaddress-1.0.18/Makefile       2016-09-09 19:02:08.000000000 +0200
@@ -1,14 +1,16 @@
-default: test
+default: test lint
 
 test:
-       flake8 ipaddress.py test_ipaddress.py
        python test_ipaddress.py
 
+lint:
+       @(python --version 2>&1 | grep -q ' 2\.6\.') || flake8 ipaddress.py 
test_ipaddress.py
+
 pypi:
        python setup.py sdist bdist_wheel upload
 
 clean:
        rm -rf -- build dist ipaddress.egg-info
 
-.PHONY: default test clean pypi
+.PHONY: default test clean pypi lint
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipaddress-1.0.16/PKG-INFO 
new/ipaddress-1.0.18/PKG-INFO
--- old/ipaddress-1.0.16/PKG-INFO       2015-12-28 18:11:12.000000000 +0100
+++ new/ipaddress-1.0.18/PKG-INFO       2017-01-11 13:30:45.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: ipaddress
-Version: 1.0.16
+Version: 1.0.18
 Summary: IPv4/IPv6 manipulation library
 Home-page: https://github.com/phihag/ipaddress
 Author: Philipp Hagemeister
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipaddress-1.0.16/README new/ipaddress-1.0.18/README
--- old/ipaddress-1.0.16/README 2017-03-22 23:17:01.794404687 +0100
+++ new/ipaddress-1.0.18/README 2016-09-09 12:09:20.000000000 +0200
@@ -1 +1,26 @@
-symbolic link to README.md
+ipaddress
+=========
+
+Python 3.3+'s [ipaddress](http://docs.python.org/dev/library/ipaddress) for 
Python 2.6, 2.7, 3.2.
+
+Note that as in Python 3.3+ you must use character strings and not byte 
strings for textual IP address representations:
+
+```python
+>>> from __future__ import unicode_literals
+>>> ipaddress.ip_address('1.2.3.4')
+IPv4Address(u'1.2.3.4')
+```
+or
+```python
+>>> ipaddress.ip_address(u'1.2.3.4')
+IPv4Address(u'1.2.3.4')
+```
+but not:
+```python
+>>> ipaddress.ip_address(b'1.2.3.4')
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+  File "ipaddress.py", line 163, in ip_address
+    ' a unicode object?' % address)
+ipaddress.AddressValueError: '1.2.3.4' does not appear to be an IPv4 or IPv6 
address. Did you pass in a bytes (str in Python 2) instead of a unicode object?
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipaddress-1.0.16/ipaddress.egg-info/PKG-INFO 
new/ipaddress-1.0.18/ipaddress.egg-info/PKG-INFO
--- old/ipaddress-1.0.16/ipaddress.egg-info/PKG-INFO    2015-12-28 
18:11:12.000000000 +0100
+++ new/ipaddress-1.0.18/ipaddress.egg-info/PKG-INFO    2017-01-11 
13:30:45.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: ipaddress
-Version: 1.0.16
+Version: 1.0.18
 Summary: IPv4/IPv6 manipulation library
 Home-page: https://github.com/phihag/ipaddress
 Author: Philipp Hagemeister
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipaddress-1.0.16/ipaddress.py 
new/ipaddress-1.0.18/ipaddress.py
--- old/ipaddress-1.0.16/ipaddress.py   2015-12-28 18:09:30.000000000 +0100
+++ new/ipaddress-1.0.18/ipaddress.py   2017-01-11 13:29:13.000000000 +0100
@@ -14,7 +14,7 @@
 import itertools
 import struct
 
-__version__ = '1.0.16'
+__version__ = '1.0.18'
 
 # Compatibility functions
 _compat_int_types = (int,)
@@ -58,6 +58,8 @@
         return struct.pack(b'!QQ', intval >> 64, intval & 0xffffffffffffffff)
     else:
         raise NotImplementedError()
+
+
 if hasattr(int, 'bit_length'):
     # Not int.bit_length , since that won't work in 2.7 where long exists
     def _compat_bit_length(i):
@@ -547,8 +549,7 @@
             msg = (
                 '%r (len %d != %d) is not permitted as an IPv%d address. '
                 'Did you pass in a bytes (str in Python 2) instead of'
-                ' a unicode object?'
-            )
+                ' a unicode object?')
             raise AddressValueError(msg % (address, address_len,
                                            expected_len, self._version))
 
@@ -759,12 +760,12 @@
         broadcast = int(self.broadcast_address)
         if n >= 0:
             if network + n > broadcast:
-                raise IndexError
+                raise IndexError('address out of range')
             return self._address_class(network + n)
         else:
             n += 1
             if broadcast + n < network:
-                raise IndexError
+                raise IndexError('address out of range')
             return self._address_class(broadcast + n)
 
     def __lt__(self, other):
@@ -866,21 +867,21 @@
 
             addr1 = ip_network('192.0.2.0/28')
             addr2 = ip_network('192.0.2.1/32')
-            addr1.address_exclude(addr2) =
+            list(addr1.address_exclude(addr2)) =
                 [IPv4Network('192.0.2.0/32'), IPv4Network('192.0.2.2/31'),
-                IPv4Network('192.0.2.4/30'), IPv4Network('192.0.2.8/29')]
+                 IPv4Network('192.0.2.4/30'), IPv4Network('192.0.2.8/29')]
 
         or IPv6:
 
             addr1 = ip_network('2001:db8::1/32')
             addr2 = ip_network('2001:db8::1/128')
-            addr1.address_exclude(addr2) =
+            list(addr1.address_exclude(addr2)) =
                 [ip_network('2001:db8::1/128'),
-                ip_network('2001:db8::2/127'),
-                ip_network('2001:db8::4/126'),
-                ip_network('2001:db8::8/125'),
-                ...
-                ip_network('2001:db8:8000::/33')]
+                 ip_network('2001:db8::2/127'),
+                 ip_network('2001:db8::4/126'),
+                 ip_network('2001:db8::8/125'),
+                 ...
+                 ip_network('2001:db8:8000::/33')]
 
         Args:
             other: An IPv4Network or IPv6Network object of the same type.
@@ -1039,7 +1040,7 @@
                     new_prefixlen, self))
 
         start = int(self.network_address)
-        end = int(self.broadcast_address)
+        end = int(self.broadcast_address) + 1
         step = (int(self.hostmask) + 1) >> prefixlen_diff
         for new_addr in _compat_range(start, end, step):
             current = self.__class__((new_addr, new_prefixlen))
@@ -1083,8 +1084,7 @@
                 (self.prefixlen, prefixlen_diff))
         return self.__class__((
             int(self.network_address) & (int(self.netmask) << prefixlen_diff),
-            new_prefixlen
-        ))
+            new_prefixlen))
 
     @property
     def is_multicast(self):
@@ -1436,6 +1436,12 @@
         return any(self in net for net in self._constants._private_networks)
 
     @property
+    def is_global(self):
+        return (
+            self not in self._constants._public_network and
+            not self.is_private)
+
+    @property
     def is_multicast(self):
         """Test if the address is reserved for multicast use.
 
@@ -1682,6 +1688,8 @@
 
     _multicast_network = IPv4Network('224.0.0.0/4')
 
+    _public_network = IPv4Network('100.64.0.0/10')
+
     _private_networks = [
         IPv4Network('0.0.0.0/8'),
         IPv4Network('10.0.0.0/8'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipaddress-1.0.16/setup.py 
new/ipaddress-1.0.18/setup.py
--- old/ipaddress-1.0.16/setup.py       2015-12-28 18:09:36.000000000 +0100
+++ new/ipaddress-1.0.18/setup.py       2017-01-11 13:29:03.000000000 +0100
@@ -8,14 +8,14 @@
 
 settings = {
     'name': 'ipaddress',
-    'version': '1.0.16',
+    'version': '1.0.18',
     'description': 'IPv4/IPv6 manipulation library',
     'long_description': 'Port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2',
     'author': 'Philipp Hagemeister',
     'author_email': '[email protected]',
     'url': 'https://github.com/phihag/ipaddress',
     'license': 'Python Software Foundation License',
-    'classifiers': (
+    'classifiers': [
         'Development Status :: 5 - Production/Stable',
         'Intended Audience :: Developers',
         'Natural Language :: English',
@@ -25,8 +25,8 @@
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3.2',
         'Programming Language :: Python :: 3.3',
-    ),
-    'py_modules': ['ipaddress']
+    ],
+    'py_modules': ['ipaddress'],
 }
 
 setup(**settings)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipaddress-1.0.16/test_ipaddress.py 
new/ipaddress-1.0.18/test_ipaddress.py
--- old/ipaddress-1.0.16/test_ipaddress.py      2015-07-14 21:36:43.000000000 
+0200
+++ new/ipaddress-1.0.18/test_ipaddress.py      2017-01-11 13:28:05.000000000 
+0100
@@ -694,8 +694,16 @@
     v4_objects = v4_addresses + [v4net]
     v6_addresses = [v6addr, v6intf]
     v6_objects = v6_addresses + [v6net]
+
     objects = v4_objects + v6_objects
 
+    v4addr2 = ipaddress.IPv4Address(2)
+    v4net2 = ipaddress.IPv4Network(2)
+    v4intf2 = ipaddress.IPv4Interface(2)
+    v6addr2 = ipaddress.IPv6Address(2)
+    v6net2 = ipaddress.IPv6Network(2)
+    v6intf2 = ipaddress.IPv6Interface(2)
+
     def test_foreign_type_equality(self):
         # __eq__ should never raise TypeError directly
         other = object()
@@ -714,6 +722,31 @@
                     continue
                 self.assertNotEqual(lhs, rhs)
 
+    def test_same_type_equality(self):
+        for obj in self.objects:
+            self.assertEqual(obj, obj)
+            self.assertTrue(obj <= obj)
+            self.assertTrue(obj >= obj)
+
+    def test_same_type_ordering(self):
+        for lhs, rhs in (
+            (self.v4addr, self.v4addr2),
+            (self.v4net, self.v4net2),
+            (self.v4intf, self.v4intf2),
+            (self.v6addr, self.v6addr2),
+            (self.v6net, self.v6net2),
+            (self.v6intf, self.v6intf2),
+        ):
+            self.assertNotEqual(lhs, rhs)
+            self.assertTrue(lhs < rhs)
+            self.assertTrue(lhs <= rhs)
+            self.assertTrue(rhs > lhs)
+            self.assertTrue(rhs >= lhs)
+            self.assertFalse(lhs > rhs)
+            self.assertFalse(rhs < lhs)
+            self.assertFalse(lhs >= rhs)
+            self.assertFalse(rhs <= lhs)
+
     def test_containment(self):
         for obj in self.v4_addresses:
             self.assertIn(obj, self.v4net)
@@ -812,7 +845,7 @@
         self.assertTrue(re.match("IPv6Interface\(u?'::1/128'\)",
                         repr(ipaddress.IPv6Interface('::1'))))
 
-    # issue #16531: constructing IPv4Network from a (address, mask) tuple
+    # issue #16531: constructing IPv4Network from an (address, mask) tuple
     def testIPv4Tuple(self):
         # /32
         ip = ipaddress.IPv4Address('192.0.2.1')
@@ -872,7 +905,7 @@
         self.assertEqual(ipaddress.IPv4Interface((3221225985, 24)),
                          ipaddress.IPv4Interface('192.0.2.1/24'))
 
-    # issue #16531: constructing IPv6Network from a (address, mask) tuple
+    # issue #16531: constructing IPv6Network from an (address, mask) tuple
     def testIPv6Tuple(self):
         # /128
         ip = ipaddress.IPv6Address('2001:db8::')
@@ -1194,6 +1227,30 @@
              '2001:658:22a:cafe:8000::/66',
              '2001:658:22a:cafe:c000::/66'])
 
+    def testGetSubnets3(self):
+        subnets = [str(x) for x in self.ipv4_network.subnets(8)]
+        self.assertEqual(
+            subnets[:3],
+            ['1.2.3.0/32', '1.2.3.1/32', '1.2.3.2/32'])
+        self.assertEqual(
+            subnets[-3:],
+            ['1.2.3.253/32', '1.2.3.254/32', '1.2.3.255/32'])
+        self.assertEqual(len(subnets), 256)
+
+        ipv6_network = ipaddress.IPv6Network('2001:658:22a:cafe::/120')
+        subnets = [str(x) for x in ipv6_network.subnets(8)]
+        self.assertEqual(
+            subnets[:3],
+            ['2001:658:22a:cafe::/128',
+             '2001:658:22a:cafe::1/128',
+             '2001:658:22a:cafe::2/128'])
+        self.assertEqual(
+            subnets[-3:],
+            ['2001:658:22a:cafe::fd/128',
+             '2001:658:22a:cafe::fe/128',
+             '2001:658:22a:cafe::ff/128'])
+        self.assertEqual(len(subnets), 256)
+
     def testSubnetFailsForLargeCidrDiff(self):
         self.assertRaises(ValueError, list,
                           self.ipv4_interface.network.subnets(9))
@@ -1251,6 +1308,7 @@
 
         self.assertEqual(_compat_str(self.ipv6_network[5]),
                          '2001:658:22a:cafe::5')
+        self.assertRaises(IndexError, self.ipv6_network.__getitem__, 1 << 64)
 
     def testGetitem(self):
         # http://code.google.com/p/ipaddr-py/issues/detail?id=15
@@ -1344,7 +1402,7 @@
         ip4 = ipaddress.IPv4Address('1.1.1.3')
         ip5 = ipaddress.IPv4Address('1.1.1.4')
         ip6 = ipaddress.IPv4Address('1.1.1.0')
-        # check that addreses are subsumed properly.
+        # check that addresses are subsumed properly.
         collapsed = ipaddress.collapse_addresses(
             [ip1, ip2, ip3, ip4, ip5, ip6])
         self.assertEqual(
@@ -1371,9 +1429,11 @@
         # stored in no particular order b/c we want CollapseAddr to call
         # [].sort
         ip6 = ipaddress.IPv4Network('1.1.0.0/22')
+
         # check that addreses are subsumed properly.
         collapsed = ipaddress.collapse_addresses(
             [ip1, ip2, ip3, ip4, ip5, ip6])
+
         self.assertEqual(list(collapsed),
                          [ipaddress.IPv4Network('1.1.0.0/22'),
                           ipaddress.IPv4Network('1.1.4.0/24')])
@@ -1434,7 +1494,7 @@
         # test a /24 is summarized properly
         self.assertEqual(list(summarize(ip1, ip2))[0],
                          ipaddress.ip_network('1.1.1.0/24'))
-        # test an  IPv4 range that isn't on a network byte boundary
+        # test an IPv4 range that isn't on a network byte boundary
         ip2 = ipaddress.ip_address('1.1.1.8')
         self.assertEqual(list(summarize(ip1, ip2)),
                          [ipaddress.ip_network('1.1.1.0/29'),
@@ -1447,7 +1507,7 @@
 
         ip1 = ipaddress.ip_address('1::')
         ip2 = ipaddress.ip_address('1:ffff:ffff:ffff:ffff:ffff:ffff:ffff')
-        # test a IPv6 is sumamrized properly
+        # test an IPv6 is summarized properly
         self.assertEqual(list(summarize(ip1, ip2))[0],
                          ipaddress.ip_network('1::/16'))
         # test an IPv6 range that isn't on a network byte boundary
@@ -1706,6 +1766,9 @@
         self.assertEqual(False,
                          ipaddress.ip_address('169.255.100.200').is_link_local)
 
+        self.assertTrue(ipaddress.ip_address('192.0.7.1').is_global)
+        self.assertFalse(ipaddress.ip_address('203.0.113.1').is_global)
+
         self.assertEqual(True,
                          ipaddress.ip_address('127.100.200.254').is_loopback)
         self.assertEqual(True, ipaddress.ip_address('127.42.0.0').is_loopback)
@@ -1803,6 +1866,7 @@
         addr3 = ipaddress.ip_network('10.2.1.0/24')
         addr4 = ipaddress.ip_address('10.1.1.0')
         addr5 = ipaddress.ip_network('2001:db8::0/32')
+        addr6 = ipaddress.ip_network('10.1.1.5/32')
         self.assertEqual(sorted(list(addr1.address_exclude(addr2))),
                          [ipaddress.ip_network('10.1.1.64/26'),
                           ipaddress.ip_network('10.1.1.128/25')])
@@ -1810,6 +1874,15 @@
         self.assertRaises(TypeError, list, addr1.address_exclude(addr4))
         self.assertRaises(TypeError, list, addr1.address_exclude(addr5))
         self.assertEqual(list(addr1.address_exclude(addr1)), [])
+        self.assertEqual(sorted(list(addr1.address_exclude(addr6))),
+                         [ipaddress.ip_network('10.1.1.0/30'),
+                          ipaddress.ip_network('10.1.1.4/32'),
+                          ipaddress.ip_network('10.1.1.6/31'),
+                          ipaddress.ip_network('10.1.1.8/29'),
+                          ipaddress.ip_network('10.1.1.16/28'),
+                          ipaddress.ip_network('10.1.1.32/27'),
+                          ipaddress.ip_network('10.1.1.64/26'),
+                          ipaddress.ip_network('10.1.1.128/25')])
 
     def testHash(self):
         self.assertEqual(hash(ipaddress.ip_interface('10.1.1.0/24')),
@@ -1874,7 +1947,6 @@
             '2001:0:0:4:0:0:0:8': '2001:0:0:4::8/128',
             '2001:0:0:4:5:6:7:8': '2001::4:5:6:7:8/128',
             '2001:0:3:4:5:6:7:8': '2001:0:3:4:5:6:7:8/128',
-            '2001:0:3:4:5:6:7:8': '2001:0:3:4:5:6:7:8/128',
             '0:0:3:0:0:0:0:ffff': '0:0:3::ffff/128',
             '0:0:0:4:0:0:0:ffff': '::4:0:0:0:ffff/128',
             '0:0:0:0:5:0:0:ffff': '::5:0:0:ffff/128',
@@ -2015,6 +2087,7 @@
                          sixtofouraddr.sixtofour)
         self.assertFalse(bad_addr.sixtofour)
 
+
 # Monkey-patch test runner
 if not hasattr(BaseTestCase, 'assertRaisesRegex'):
     class _AssertRaisesRegex(object):
@@ -2109,5 +2182,6 @@
         self.assertTrue(net2.subnet_of(net1))
         self.assertFalse(net2.supernet_of(net1))
 
+
 if __name__ == '__main__':
     unittest.main()


Reply via email to