Hello community, here is the log from the commit of package python-ipaddress for openSUSE:Factory checked in at 2018-02-16 21:39:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ipaddress (Old) and /work/SRC/openSUSE:Factory/.python-ipaddress.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ipaddress" Fri Feb 16 21:39:08 2018 rev:4 rq:576015 version:1.0.19 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ipaddress/python-ipaddress.changes 2017-03-22 23:17:00.910529892 +0100 +++ /work/SRC/openSUSE:Factory/.python-ipaddress.new/python-ipaddress.changes 2018-02-16 21:39:09.835007512 +0100 @@ -1,0 +2,6 @@ +Fri Feb 9 21:58:17 UTC 2018 - [email protected] + +- update to version v1.0.19 + * Synchronize with Python3's ipaddress module of the day + +------------------------------------------------------------------- Old: ---- ipaddress-1.0.18.tar.gz New: ---- ipaddress-1.0.19.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ipaddress.spec ++++++ --- /var/tmp/diff_new_pack.hmh0Zj/_old 2018-02-16 21:39:10.638978487 +0100 +++ /var/tmp/diff_new_pack.hmh0Zj/_new 2018-02-16 21:39:10.638978487 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-ipaddress # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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,9 +17,9 @@ Name: python-ipaddress -Version: 1.0.18 +Version: 1.0.19 Release: 0 -Summary: IPv4/IPv6 manipulation library +Summary: Backport of the Python3 IPv4/IPv6 manipulation library to older Python versions License: Python-2.0 Group: Development/Languages/Python Url: https://github.com/phihag/ipaddress @@ -35,7 +35,7 @@ %endif %description -Port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2 +Port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2. %prep %setup -q -n ipaddress-%{version} ++++++ ipaddress-1.0.18.tar.gz -> ipaddress-1.0.19.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipaddress-1.0.18/Makefile new/ipaddress-1.0.19/Makefile --- old/ipaddress-1.0.18/Makefile 2016-09-09 19:02:08.000000000 +0200 +++ new/ipaddress-1.0.19/Makefile 2017-12-16 22:30:38.000000000 +0100 @@ -7,7 +7,7 @@ @(python --version 2>&1 | grep -q ' 2\.6\.') || flake8 ipaddress.py test_ipaddress.py pypi: - python setup.py sdist bdist_wheel upload + python setup.py sdist bdist upload clean: rm -rf -- build dist ipaddress.egg-info diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipaddress-1.0.18/PKG-INFO new/ipaddress-1.0.19/PKG-INFO --- old/ipaddress-1.0.18/PKG-INFO 2017-01-11 13:30:45.000000000 +0100 +++ new/ipaddress-1.0.19/PKG-INFO 2017-12-16 22:30:40.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: ipaddress -Version: 1.0.18 +Version: 1.0.19 Summary: IPv4/IPv6 manipulation library Home-page: https://github.com/phihag/ipaddress Author: Philipp Hagemeister Author-email: [email protected] License: Python Software Foundation License +Description-Content-Type: UNKNOWN Description: Port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2 Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable @@ -17,3 +18,6 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipaddress-1.0.18/ipaddress.egg-info/PKG-INFO new/ipaddress-1.0.19/ipaddress.egg-info/PKG-INFO --- old/ipaddress-1.0.18/ipaddress.egg-info/PKG-INFO 2017-01-11 13:30:45.000000000 +0100 +++ new/ipaddress-1.0.19/ipaddress.egg-info/PKG-INFO 2017-12-16 22:30:40.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: ipaddress -Version: 1.0.18 +Version: 1.0.19 Summary: IPv4/IPv6 manipulation library Home-page: https://github.com/phihag/ipaddress Author: Philipp Hagemeister Author-email: [email protected] License: Python Software Foundation License +Description-Content-Type: UNKNOWN Description: Port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2 Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable @@ -17,3 +18,6 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipaddress-1.0.18/ipaddress.py new/ipaddress-1.0.19/ipaddress.py --- old/ipaddress-1.0.18/ipaddress.py 2017-01-11 13:29:13.000000000 +0100 +++ new/ipaddress-1.0.19/ipaddress.py 2017-12-16 22:18:15.000000000 +0100 @@ -14,7 +14,7 @@ import itertools import struct -__version__ = '1.0.18' +__version__ = '1.0.19' # Compatibility functions _compat_int_types = (int,) @@ -1098,33 +1098,25 @@ return (self.network_address.is_multicast and self.broadcast_address.is_multicast) + @staticmethod + def _is_subnet_of(a, b): + try: + # Always false if one is v4 and the other is v6. + if a._version != b._version: + raise TypeError("%s and %s are not of the same version" (a, b)) + return (b.network_address <= a.network_address and + b.broadcast_address >= a.broadcast_address) + except AttributeError: + raise TypeError("Unable to test subnet containment " + "between %s and %s" % (a, b)) + def subnet_of(self, other): - # always false if one is v4 and the other is v6. - if self._version != other._version: - return False - # dealing with another network. - if (hasattr(other, 'network_address') and - hasattr(other, 'broadcast_address')): - return (other.network_address <= self.network_address and - other.broadcast_address >= self.broadcast_address) - # dealing with another address - else: - raise TypeError('Unable to test subnet containment with element ' - 'of type %s' % type(other)) + """Return True if this network is a subnet of other.""" + return self._is_subnet_of(self, other) def supernet_of(self, other): - # always false if one is v4 and the other is v6. - if self._version != other._version: - return False - # dealing with another network. - if (hasattr(other, 'network_address') and - hasattr(other, 'broadcast_address')): - return (other.network_address >= self.network_address and - other.broadcast_address <= self.broadcast_address) - # dealing with another address - else: - raise TypeError('Unable to test subnet containment with element ' - 'of type %s' % type(other)) + """Return True if this network is a supernet of other.""" + return self._is_subnet_of(other, self) @property def is_reserved(self): @@ -1535,7 +1527,8 @@ if address_less is NotImplemented: return NotImplemented try: - return self.network < other.network + return (self.network < other.network or + self.network == other.network and address_less) except AttributeError: # We *do* allow addresses and interfaces to be sorted. The # unassociated address is considered less than all interfaces. @@ -2227,7 +2220,8 @@ if address_less is NotImplemented: return NotImplemented try: - return self.network < other.network + return (self.network < other.network or + self.network == other.network and address_less) except AttributeError: # We *do* allow addresses and interfaces to be sorted. The # unassociated address is considered less than all interfaces. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipaddress-1.0.18/setup.cfg new/ipaddress-1.0.19/setup.cfg --- old/ipaddress-1.0.18/setup.cfg 2017-01-11 13:30:45.000000000 +0100 +++ new/ipaddress-1.0.19/setup.cfg 2017-12-16 22:30:40.000000000 +0100 @@ -1,5 +1,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipaddress-1.0.18/setup.py new/ipaddress-1.0.19/setup.py --- old/ipaddress-1.0.18/setup.py 2017-01-11 13:29:03.000000000 +0100 +++ new/ipaddress-1.0.19/setup.py 2017-12-16 22:18:58.000000000 +0100 @@ -8,7 +8,7 @@ settings = { 'name': 'ipaddress', - 'version': '1.0.18', + 'version': '1.0.19', 'description': 'IPv4/IPv6 manipulation library', 'long_description': 'Port of the 3.3+ ipaddress module to 2.6, 2.7, 3.2', 'author': 'Philipp Hagemeister', @@ -25,6 +25,9 @@ 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', ], 'py_modules': ['ipaddress'], } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipaddress-1.0.18/test_ipaddress.py new/ipaddress-1.0.19/test_ipaddress.py --- old/ipaddress-1.0.18/test_ipaddress.py 2017-01-11 13:28:05.000000000 +0100 +++ new/ipaddress-1.0.19/test_ipaddress.py 2017-12-16 22:16:12.000000000 +0100 @@ -135,7 +135,7 @@ def test_bad_packed_length(self): def assertBadLength(length): - addr = b'0' * length + addr = b'\0' * length msg = "%r (len %d != 4) is not permitted as an IPv4 address" with self.assertAddressError(re.escape(msg % (addr, length))): self.factory(addr) @@ -155,11 +155,11 @@ self.assertInstancesEqual(3232235521, "::c0a8:1") def test_packed(self): - addr = (b'\0' * 12) + _compat_bytes_fromhex("00000000") + addr = b'\0'*12 + _compat_bytes_fromhex("00000000") self.assertInstancesEqual(addr, "::") - addr = (b'\0' * 12) + _compat_bytes_fromhex("c0a80001") + addr = b'\0'*12 + _compat_bytes_fromhex("c0a80001") self.assertInstancesEqual(addr, "::c0a8:1") - addr = _compat_bytes_fromhex("c0a80001") + (b'\0' * 12) + addr = _compat_bytes_fromhex("c0a80001") + b'\0'*12 self.assertInstancesEqual(addr, "c0a8:1::") def test_negative_ints_rejected(self): @@ -174,7 +174,7 @@ def test_bad_packed_length(self): def assertBadLength(length): - addr = b'0' * length + addr = b'\0' * length msg = "%r (len %d != 16) is not permitted as an IPv6 address" with self.assertAddressError(re.escape(msg % (addr, length))): self.factory(addr) @@ -523,7 +523,7 @@ self.factory('10.0.1.0/24'))) # containee larger than container self.assertFalse( - self.factory('10.0.0.0/24').subnet_of( + self.factory('10.0.1.0/24').subnet_of( self.factory('10.0.0.0/30'))) def test_supernet_of(self): @@ -544,6 +544,20 @@ self.factory('10.0.0.0/24').supernet_of( self.factory('10.0.0.0/30'))) + def test_subnet_of_mixed_types(self): + with self.assertRaises(TypeError): + ipaddress.IPv4Network('10.0.0.0/30').supernet_of( + ipaddress.IPv6Network('::1/128')) + with self.assertRaises(TypeError): + ipaddress.IPv6Network('::1/128').supernet_of( + ipaddress.IPv4Network('10.0.0.0/30')) + with self.assertRaises(TypeError): + ipaddress.IPv4Network('10.0.0.0/30').subnet_of( + ipaddress.IPv6Network('::1/128')) + with self.assertRaises(TypeError): + ipaddress.IPv6Network('::1/128').subnet_of( + ipaddress.IPv4Network('10.0.0.0/30')) + class NetmaskTestMixin_v6(CommonTestMixin_v6): """Input validation on interfaces and networks is very similar""" @@ -1543,14 +1557,35 @@ ipaddress.ip_address('::2')) def testInterfaceComparison(self): - self.assertTrue(ipaddress.ip_interface('1.1.1.1') <= - ipaddress.ip_interface('1.1.1.1')) - self.assertTrue(ipaddress.ip_interface('1.1.1.1') <= - ipaddress.ip_interface('1.1.1.2')) - self.assertTrue(ipaddress.ip_interface('::1') <= - ipaddress.ip_interface('::1')) - self.assertTrue(ipaddress.ip_interface('::1') <= - ipaddress.ip_interface('::2')) + self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') == + ipaddress.ip_interface('1.1.1.1/24')) + self.assertTrue(ipaddress.ip_interface('1.1.1.1/16') < + ipaddress.ip_interface('1.1.1.1/24')) + self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') < + ipaddress.ip_interface('1.1.1.2/24')) + self.assertTrue(ipaddress.ip_interface('1.1.1.2/16') < + ipaddress.ip_interface('1.1.1.1/24')) + self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') > + ipaddress.ip_interface('1.1.1.1/16')) + self.assertTrue(ipaddress.ip_interface('1.1.1.2/24') > + ipaddress.ip_interface('1.1.1.1/24')) + self.assertTrue(ipaddress.ip_interface('1.1.1.1/24') > + ipaddress.ip_interface('1.1.1.2/16')) + + self.assertTrue(ipaddress.ip_interface('::1/64') == + ipaddress.ip_interface('::1/64')) + self.assertTrue(ipaddress.ip_interface('::1/64') < + ipaddress.ip_interface('::1/80')) + self.assertTrue(ipaddress.ip_interface('::1/64') < + ipaddress.ip_interface('::2/64')) + self.assertTrue(ipaddress.ip_interface('::2/48') < + ipaddress.ip_interface('::1/64')) + self.assertTrue(ipaddress.ip_interface('::1/80') > + ipaddress.ip_interface('::1/64')) + self.assertTrue(ipaddress.ip_interface('::2/64') > + ipaddress.ip_interface('::1/64')) + self.assertTrue(ipaddress.ip_interface('::1/64') > + ipaddress.ip_interface('::2/48')) def testNetworkComparison(self): # ip1 and ip2 have the same network address
