Hello community, here is the log from the commit of package python-oslo.serialization for openSUSE:Factory checked in at 2020-06-05 20:15:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-oslo.serialization (Old) and /work/SRC/openSUSE:Factory/.python-oslo.serialization.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.serialization" Fri Jun 5 20:15:12 2020 rev:15 rq:803599 version:3.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-oslo.serialization/python-oslo.serialization.changes 2020-03-24 22:32:33.765095837 +0100 +++ /work/SRC/openSUSE:Factory/.python-oslo.serialization.new.3606/python-oslo.serialization.changes 2020-06-05 20:19:25.143704262 +0200 @@ -1,0 +2,20 @@ +Tue May 12 09:58:24 UTC 2020 - cloud-de...@suse.de + +- update to version 3.1.1 + - Switch to Ussuri jobs + - remove outdated header + - Remove Python 3-specific conditional in dump_as_bytes + - [ussuri][goal] Drop python 2.7 support and testing + - tox: Trivial cleanup + - Update master for stable/train + - reword releasenote for py27 support dropping + - Deprecated the yamlutils module. + - Drop use of six + - Remove long-dead workaround + - Update hacking for Python3 + - Add releasenote to deprecate the yamlutils module + - tox: Keeping going with docs + - Update the minversion parameter. + - Use unittest.mock instead of third party mock + +------------------------------------------------------------------- Old: ---- oslo.serialization-2.29.2.tar.gz New: ---- oslo.serialization-3.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-oslo.serialization.spec ++++++ --- /var/tmp/diff_new_pack.2ZaCT8/_old 2020-06-05 20:19:26.431708642 +0200 +++ /var/tmp/diff_new_pack.2ZaCT8/_new 2020-06-05 20:19:26.435708655 +0200 @@ -17,13 +17,13 @@ Name: python-oslo.serialization -Version: 2.29.2 +Version: 3.1.1 Release: 0 Summary: OpenStack serialization library License: Apache-2.0 Group: Development/Languages/Python URL: https://launchpad.net/oslo.serialization -Source0: https://files.pythonhosted.org/packages/source/o/oslo.serialization/oslo.serialization-2.29.2.tar.gz +Source0: https://files.pythonhosted.org/packages/source/o/oslo.serialization/oslo.serialization-3.1.1.tar.gz BuildRequires: openstack-macros BuildRequires: python3-mock BuildRequires: python3-msgpack >= 0.5.2 @@ -45,7 +45,7 @@ Requires: python3-msgpack >= 0.5.2 Requires: python3-oslo.utils >= 3.33.0 Requires: python3-pytz >= 2013.6 -Requires: python3-six >= 1.10.0 +Requires: python3-six %description -n python3-oslo.serialization The oslo.serialization library provides support for representing objects @@ -65,7 +65,7 @@ This package contains the documentation. %prep -%autosetup -p1 -n oslo.serialization-2.29.2 +%autosetup -p1 -n oslo.serialization-3.1.1 sed -i -e "s,bandit.*,," test-requirements.txt %py_req_cleanup ++++++ _service ++++++ --- /var/tmp/diff_new_pack.2ZaCT8/_old 2020-06-05 20:19:26.459708736 +0200 +++ /var/tmp/diff_new_pack.2ZaCT8/_new 2020-06-05 20:19:26.459708736 +0200 @@ -1,8 +1,8 @@ <services> <service mode="disabled" name="renderspec"> - <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/oslo.serialization/oslo.serialization.spec.j2</param> + <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/openstack/oslo.serialization/oslo.serialization.spec.j2</param> <param name="output-name">python-oslo.serialization.spec</param> - <param name="requirements">https://raw.githubusercontent.com/openstack/oslo.serialization/stable/train/requirements.txt</param> + <param name="requirements">https://opendev.org/openstack/oslo.serialization/raw/branch/stable/ussuri/requirements.txt</param> <param name="changelog-email">cloud-de...@suse.de</param> <param name="changelog-provider">gh,openstack,oslo.serialization</param> </service> ++++++ oslo.serialization-2.29.2.tar.gz -> oslo.serialization-3.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/.zuul.yaml new/oslo.serialization-3.1.1/.zuul.yaml --- old/oslo.serialization-2.29.2/.zuul.yaml 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/.zuul.yaml 2020-04-07 12:07:29.000000000 +0200 @@ -1,11 +1,9 @@ - project: templates: - check-requirements - - lib-forward-testing - lib-forward-testing-python3 - openstack-lower-constraints-jobs - - openstack-python-jobs - - openstack-python3-train-jobs + - openstack-python3-ussuri-jobs - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/AUTHORS new/oslo.serialization-3.1.1/AUTHORS --- old/oslo.serialization-2.29.2/AUTHORS 2019-09-04 16:25:46.000000000 +0200 +++ new/oslo.serialization-3.1.1/AUTHORS 2020-04-07 12:08:36.000000000 +0200 @@ -13,6 +13,7 @@ Cyril Roelandt <cyril.roela...@enovance.com> Dan Prince <dpri...@redhat.com> Dan Smith <da...@us.ibm.com> +Daniel Bengtsson <dbe...@redhat.com> Davanum Srinivas (dims) <dava...@gmail.com> Davanum Srinivas <dava...@gmail.com> Davanum Srinivas <d...@linux.vnet.ibm.com> @@ -56,6 +57,7 @@ Phil Day <philip....@hp.com> Ronald Bradford <ronald.bradf...@gmail.com> Russell Bryant <rbry...@redhat.com> +Sean McGinnis <sean.mcgin...@gmail.com> Sirushti Murugesan <sirushti.muruge...@hp.com> Stanislaw Pitucha <stanislaw.pitu...@hp.com> Stephen Finucane <sfinu...@redhat.com> @@ -73,6 +75,7 @@ Zhongyue Luo <lzye...@gmail.com> Zhongyue Luo <zhongyue....@intel.com> avnish <avnish....@nectechnologies.in> +caoyuan <cao.y...@99cloud.net> gecong1973 <ge.c...@zte.com.cn> gujin <gu....@99cloud.net> jacky06 <zhang....@99cloud.net> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/ChangeLog new/oslo.serialization-3.1.1/ChangeLog --- old/oslo.serialization-2.29.2/ChangeLog 2019-09-04 16:25:46.000000000 +0200 +++ new/oslo.serialization-3.1.1/ChangeLog 2020-04-07 12:08:36.000000000 +0200 @@ -1,6 +1,33 @@ CHANGES ======= +3.1.1 +----- + +* Update hacking for Python3 +* Use unittest.mock instead of third party mock +* Remove Python 3-specific conditional in dump\_as\_bytes +* Drop use of six + +3.1.0 +----- + +* Remove long-dead workaround +* Add releasenote to deprecate the yamlutils module +* Deprecated the yamlutils module +* Update the minversion parameter +* remove outdated header +* reword releasenote for py27 support dropping + +3.0.0 +----- + +* [ussuri][goal] Drop python 2.7 support and testing +* tox: Trivial cleanup +* Switch to Ussuri jobs +* tox: Keeping going with docs +* Update master for stable/train + 2.29.2 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/PKG-INFO new/oslo.serialization-3.1.1/PKG-INFO --- old/oslo.serialization-2.29.2/PKG-INFO 2019-09-04 16:25:47.000000000 +0200 +++ new/oslo.serialization-3.1.1/PKG-INFO 2020-04-07 12:08:36.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: oslo.serialization -Version: 2.29.2 +Version: 3.1.1 Summary: Oslo Serialization library Home-page: https://docs.openstack.org/oslo.serialization/latest/ Author: OpenStack @@ -44,8 +44,9 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: Implementation :: CPython +Requires-Python: >=3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/doc/requirements.txt new/oslo.serialization-3.1.1/doc/requirements.txt --- old/oslo.serialization-2.29.2/doc/requirements.txt 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/doc/requirements.txt 2020-04-07 12:07:29.000000000 +0200 @@ -3,6 +3,5 @@ # process, which may cause wedges in the gate later. # These are needed for docs generation openstackdocstheme>=1.18.1 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +sphinx>=1.8.0,!=2.1.0 # BSD reno>=2.5.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/lower-constraints.txt new/oslo.serialization-3.1.1/lower-constraints.txt --- old/oslo.serialization-2.29.2/lower-constraints.txt 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/lower-constraints.txt 2020-04-07 12:07:29.000000000 +0200 @@ -5,17 +5,13 @@ debtcollector==1.2.0 extras==1.0.0 fixtures==3.0.0 -flake8==2.5.5 gitdb==0.6.4 GitPython==1.0.1 -hacking==0.12.0 ipaddress===1.0.17 iso8601==0.1.11 keystoneauth1==3.4.0 linecache2==1.0.0 mccabe==0.2.1 -mock==2.0.0 -monotonic==0.6 mox3==0.20.0 msgpack==0.5.2 netaddr==0.7.18 @@ -25,8 +21,6 @@ oslo.utils==3.33.0 oslotest==3.2.0 pbr==2.0.0 -pep8==1.5.7 -pyflakes==0.8.1 pyparsing==2.1.0 python-mimeparse==1.6.0 python-subunit==1.0.0 @@ -34,7 +28,6 @@ PyYAML==3.12 requests==2.14.2 requestsexceptions==1.2.0 -six==1.10.0 smmap==0.9.0 stestr==2.0.0 stevedore==1.20.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo.serialization.egg-info/PKG-INFO new/oslo.serialization-3.1.1/oslo.serialization.egg-info/PKG-INFO --- old/oslo.serialization-2.29.2/oslo.serialization.egg-info/PKG-INFO 2019-09-04 16:25:46.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo.serialization.egg-info/PKG-INFO 2020-04-07 12:08:36.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: oslo.serialization -Version: 2.29.2 +Version: 3.1.1 Summary: Oslo Serialization library Home-page: https://docs.openstack.org/oslo.serialization/latest/ Author: OpenStack @@ -44,8 +44,9 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: Implementation :: CPython +Requires-Python: >=3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo.serialization.egg-info/SOURCES.txt new/oslo.serialization-3.1.1/oslo.serialization.egg-info/SOURCES.txt --- old/oslo.serialization-2.29.2/oslo.serialization.egg-info/SOURCES.txt 2019-09-04 16:25:47.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo.serialization.egg-info/SOURCES.txt 2020-04-07 12:08:36.000000000 +0200 @@ -45,6 +45,8 @@ oslo_serialization/tests/test_msgpackutils.py oslo_serialization/tests/test_yamlutils.py releasenotes/notes/add-reno-996dd44974d53238.yaml +releasenotes/notes/deprecate-yamlutils-module-96eee55f7ae57382.yaml +releasenotes/notes/drop-python27-support-185668eec068ffa5.yaml releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/ocata.rst @@ -52,6 +54,7 @@ releasenotes/source/queens.rst releasenotes/source/rocky.rst releasenotes/source/stein.rst +releasenotes/source/train.rst releasenotes/source/unreleased.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo.serialization.egg-info/pbr.json new/oslo.serialization-3.1.1/oslo.serialization.egg-info/pbr.json --- old/oslo.serialization-2.29.2/oslo.serialization.egg-info/pbr.json 2019-09-04 16:25:46.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo.serialization.egg-info/pbr.json 2020-04-07 12:08:36.000000000 +0200 @@ -1 +1 @@ -{"git_version": "fa399b6", "is_release": true} \ No newline at end of file +{"git_version": "5ee9b7b", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo.serialization.egg-info/requires.txt new/oslo.serialization-3.1.1/oslo.serialization.egg-info/requires.txt --- old/oslo.serialization-2.29.2/oslo.serialization.egg-info/requires.txt 2019-09-04 16:25:46.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo.serialization.egg-info/requires.txt 2020-04-07 12:08:36.000000000 +0200 @@ -1,6 +1,6 @@ pbr!=2.1.0,>=2.0.0 -six>=1.10.0 msgpack>=0.5.2 oslo.utils>=3.33.0 pytz>=2013.6 PyYAML>=3.12 +debtcollector>=1.2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo_serialization/base64.py new/oslo.serialization-3.1.1/oslo_serialization/base64.py --- old/oslo.serialization-2.29.2/oslo_serialization/base64.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo_serialization/base64.py 2020-04-07 12:07:29.000000000 +0200 @@ -24,8 +24,6 @@ import base64 import binascii -import six - def encode_as_bytes(s, encoding='utf-8'): """Encode a string using Base64. @@ -38,7 +36,7 @@ Use encode_as_text() to get the Base64 encoded string as text. """ - if isinstance(s, six.text_type): + if isinstance(s, str): s = s.encode(encoding) return base64.b64encode(s) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo_serialization/jsonutils.py new/oslo.serialization-3.1.1/oslo_serialization/jsonutils.py --- old/oslo.serialization-2.29.2/oslo_serialization/jsonutils.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo_serialization/jsonutils.py 2020-04-07 12:07:29.000000000 +0200 @@ -37,12 +37,11 @@ import json import uuid import warnings +from xmlrpc import client as xmlrpclib from oslo_utils import encodeutils from oslo_utils import importutils from oslo_utils import timeutils -import six -import six.moves.xmlrpc_client as xmlrpclib ipaddress = importutils.try_import("ipaddress") netaddr = importutils.try_import("netaddr") @@ -53,8 +52,7 @@ inspect.iscode, inspect.isbuiltin, inspect.isroutine, inspect.isabstract] -_simple_types = ((six.text_type,) + six.integer_types + - (type(None), bool, float)) +_simple_types = (str, int, type(None), bool, float) def to_primitive(value, convert_instances=False, convert_datetime=True, @@ -86,7 +84,7 @@ """ orig_fallback = fallback if fallback is None: - fallback = six.text_type + fallback = str # handle obvious types first - order of basic types determined by running # full tests on nova project, resulting in the following counts: @@ -104,10 +102,8 @@ if isinstance(value, _simple_types): return value - if isinstance(value, six.binary_type): - if six.PY3: - value = value.decode(encoding=encoding) - return value + if isinstance(value, bytes): + return value.decode(encoding=encoding) # It's not clear why xmlrpclib created their own DateTime type, but # for our purposes, make it a datetime type which is explicitly @@ -122,15 +118,15 @@ return value if isinstance(value, uuid.UUID): - return six.text_type(value) + return str(value) if netaddr and isinstance(value, (netaddr.IPAddress, netaddr.IPNetwork)): - return six.text_type(value) + return str(value) if ipaddress and isinstance(value, (ipaddress.IPv4Address, ipaddress.IPv6Address)): - return six.text_type(value) + return str(value) # For exceptions, return the 'repr' of the exception object if isinstance(value, Exception): @@ -144,14 +140,6 @@ if any(test(value) for test in _nasty_type_tests): return fallback(value) - # FIXME(vish): Workaround for LP bug 852095. Without this workaround, - # tests that raise an exception in a mocked method that - # has a @wrap_exception with a notifier will fail. If - # we up the dependency to 0.5.4 (when it is released) we - # can remove this workaround. - if getattr(value, '__module__', None) == 'mox': - return 'mock' - if level > max_depth: return None @@ -226,11 +214,7 @@ .. versionadded:: 1.10 """ - serialized = dumps(obj, default=default, **kwargs) - if isinstance(serialized, six.text_type): - # On Python 3, json.dumps() returns Unicode - serialized = serialized.encode(encoding) - return serialized + return dumps(obj, default=default, **kwargs).encode(encoding) def dump(obj, fp, *args, **kwargs): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo_serialization/msgpackutils.py new/oslo.serialization-3.1.1/oslo_serialization/msgpackutils.py --- old/oslo.serialization-2.29.2/oslo_serialization/msgpackutils.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo_serialization/msgpackutils.py 2020-04-07 12:07:29.000000000 +0200 @@ -32,12 +32,11 @@ import functools import itertools import uuid +from xmlrpc import client as xmlrpclib import msgpack from oslo_utils import importutils from pytz import timezone -import six -import six.moves.xmlrpc_client as xmlrpclib netaddr = importutils.try_import("netaddr") @@ -126,7 +125,7 @@ def __iter__(self): """Iterates over **all** registered handlers.""" - for handlers in six.itervalues(self._handlers): + for handlers in self._handlers.values(): for h in handlers: yield h @@ -196,7 +195,7 @@ def match(self, obj): """Match the registries handlers to the given object (or none).""" - for possible_handlers in six.itervalues(self._handlers): + for possible_handlers in self._handlers.values(): for h in possible_handlers: if isinstance(obj, h.handles): return h @@ -209,11 +208,11 @@ @staticmethod def serialize(obj): - return six.text_type(obj.hex).encode('ascii') + return str(obj.hex).encode('ascii') @staticmethod def deserialize(data): - return uuid.UUID(hex=six.text_type(data, encoding='ascii')) + return uuid.UUID(hex=str(data, encoding='ascii')) class DateTimeHandler(object): @@ -238,15 +237,13 @@ } if dt.tzinfo: tz = dt.tzinfo.tzname(None) - if six.PY2: - tz = tz.decode("ascii") dct[u'tz'] = tz return dumps(dct, registry=self._registry) def deserialize(self, blob): dct = loads(blob, registry=self._registry) - if six.PY3 and b"day" in dct: + if b"day" in dct: # NOTE(sileht): oslo.serialization <= 2.4.1 was # storing thing as unicode for py3 while is was # bytes for py2 @@ -280,7 +277,7 @@ def serialize(obj): # FIXME(harlowja): figure out a better way to avoid hacking into # the string representation of count to get at the right numbers... - obj = six.text_type(obj) + obj = str(obj) start = obj.find("(") + 1 end = obj.rfind(")") pieces = obj[start:end].split(",") @@ -376,7 +373,7 @@ def deserialize(self, blob): dct = loads(blob, registry=self._registry) - if six.PY3 and b"day" in dct: + if b"day" in dct: # NOTE(sileht): see DateTimeHandler.deserialize() dct = dict((k.decode("ascii"), v) for k, v in dct.items()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo_serialization/serializer/base_serializer.py new/oslo.serialization-3.1.1/oslo_serialization/serializer/base_serializer.py --- old/oslo.serialization-2.29.2/oslo_serialization/serializer/base_serializer.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo_serialization/serializer/base_serializer.py 2020-04-07 12:07:29.000000000 +0200 @@ -18,11 +18,9 @@ import abc -import six -@six.add_metaclass(abc.ABCMeta) -class BaseSerializer(object): +class BaseSerializer(object, metaclass=abc.ABCMeta): """Generic (de-)serialization definition abstract base class.""" @abc.abstractmethod diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo_serialization/tests/test_jsonutils.py new/oslo.serialization-3.1.1/oslo_serialization/tests/test_jsonutils.py --- old/oslo.serialization-2.29.2/oslo_serialization/tests/test_jsonutils.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo_serialization/tests/test_jsonutils.py 2020-04-07 12:07:29.000000000 +0200 @@ -16,16 +16,16 @@ import collections import datetime import functools +import io import ipaddress import itertools import json +from unittest import mock +from xmlrpc import client as xmlrpclib -import mock import netaddr from oslo_i18n import fixture from oslotest import base as test_base -import six -import six.moves.xmlrpc_client as xmlrpclib from oslo_serialization import jsonutils @@ -69,7 +69,7 @@ expected = '{"a": "b"}' json_dict = {'a': 'b'} - fp = six.StringIO() + fp = io.StringIO() jsonutils.dump(json_dict, fp) self.assertEqual(expected, fp.getvalue()) @@ -78,7 +78,7 @@ expected = '[1, 2]' json_dict = collections.namedtuple("foo", "bar baz")(1, 2) - fp = six.StringIO() + fp = io.StringIO() jsonutils.dump(json_dict, fp) self.assertEqual(expected, fp.getvalue()) @@ -87,15 +87,15 @@ self.assertEqual({'a': 'b'}, jsonutils.loads('{"a": "b"}')) def test_loads_unicode(self): - self.assertIsInstance(jsonutils.loads(b'"foo"'), six.text_type) - self.assertIsInstance(jsonutils.loads(u'"foo"'), six.text_type) + self.assertIsInstance(jsonutils.loads(b'"foo"'), str) + self.assertIsInstance(jsonutils.loads(u'"foo"'), str) # 'test' in Ukrainian i18n_str_unicode = u'"\u0442\u0435\u0441\u0442"' - self.assertIsInstance(jsonutils.loads(i18n_str_unicode), six.text_type) + self.assertIsInstance(jsonutils.loads(i18n_str_unicode), str) i18n_str = i18n_str_unicode.encode('utf-8') - self.assertIsInstance(jsonutils.loads(i18n_str), six.text_type) + self.assertIsInstance(jsonutils.loads(i18n_str), str) def test_loads_with_kwargs(self): jsontext = u'{"foo": 3}' @@ -108,12 +108,12 @@ expected = {u'a': u'\u0442\u044d\u0441\u0442'} for encoding in ('utf-8', 'cp1251'): - fp = six.BytesIO(jsontext.encode(encoding)) + fp = io.BytesIO(jsontext.encode(encoding)) result = jsonutils.load(fp, encoding=encoding) self.assertEqual(expected, result) for key, val in result.items(): - self.assertIsInstance(key, six.text_type) - self.assertIsInstance(val, six.text_type) + self.assertIsInstance(key, str) + self.assertIsInstance(val, str) def test_dumps_exception_value(self): self.assertIn(jsonutils.dumps({"a": ValueError("hello")}), @@ -277,10 +277,7 @@ def test_typeerror(self): x = bytearray # Class, not instance - if six.PY3: - self.assertEqual(u"<class 'bytearray'>", jsonutils.to_primitive(x)) - else: - self.assertEqual(u"<type 'bytearray'>", jsonutils.to_primitive(x)) + self.assertEqual(u"<class 'bytearray'>", jsonutils.to_primitive(x)) def test_nasties(self): def foo(): @@ -290,12 +287,9 @@ self.assertEqual(3, len(ret)) self.assertTrue(ret[0].startswith(u"<module 'datetime' from ") or ret[0].startswith(u"<module 'datetime' (built-in)")) - if six.PY3: - self.assertTrue(ret[1].startswith( - '<function ToPrimitiveTestCase.test_nasties.<locals>.foo at 0x' - )) - else: - self.assertTrue(ret[1].startswith('<function foo at 0x')) + self.assertTrue(ret[1].startswith( + '<function ToPrimitiveTestCase.test_nasties.<locals>.foo at 0x' + )) self.assertEqual('<built-in function dir>', ret[2]) def test_depth(self): @@ -379,7 +373,7 @@ obj = itertools.count(1) ret = jsonutils.to_primitive(obj) - self.assertEqual(six.text_type(obj), ret) + self.assertEqual(str(obj), ret) ret = jsonutils.to_primitive(obj, fallback=lambda _: 'itertools_count') self.assertEqual('itertools_count', ret) @@ -387,7 +381,7 @@ def test_fallback_nasty(self): obj = int ret = jsonutils.to_primitive(obj) - self.assertEqual(six.text_type(obj), ret) + self.assertEqual(str(obj), ret) def formatter(typeobj): return 'type:%s' % typeobj.__name__ @@ -402,7 +396,7 @@ obj = NotIterable() ret = jsonutils.to_primitive(obj) - self.assertEqual(six.text_type(obj), ret) + self.assertEqual(str(obj), ret) ret = jsonutils.to_primitive(obj, fallback=lambda _: 'fallback') self.assertEqual('fallback', ret) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo_serialization/tests/test_msgpackutils.py new/oslo.serialization-3.1.1/oslo_serialization/tests/test_msgpackutils.py --- old/oslo.serialization-2.29.2/oslo_serialization/tests/test_msgpackutils.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo_serialization/tests/test_msgpackutils.py 2020-04-07 12:07:29.000000000 +0200 @@ -14,12 +14,11 @@ import datetime import itertools +from xmlrpc import client as xmlrpclib import netaddr from oslotest import base as test_base from pytz import timezone -import six -import six.moves.xmlrpc_client as xmlrpclib from oslo_serialization import msgpackutils from oslo_utils import uuidutils @@ -44,8 +43,7 @@ @staticmethod def serialize(obj): blob = '%s, %s, %s' % (obj.r, obj.g, obj.b) - if six.PY3: - blob = blob.encode("ascii") + blob = blob.encode('ascii') return blob @staticmethod @@ -103,19 +101,19 @@ def test_itercount(self): it = itertools.count(1) - six.next(it) - six.next(it) + next(it) + next(it) it2 = _dumps_loads(it) - self.assertEqual(six.next(it), six.next(it2)) + self.assertEqual(next(it), next(it2)) it = itertools.count(0) it2 = _dumps_loads(it) - self.assertEqual(six.next(it), six.next(it2)) + self.assertEqual(next(it), next(it2)) def test_itercount_step(self): it = itertools.count(1, 3) it2 = _dumps_loads(it) - self.assertEqual(six.next(it), six.next(it2)) + self.assertEqual(next(it), next(it2)) def test_set(self): self.assertEqual(set([1, 2]), _dumps_loads(set([1, 2]))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/oslo_serialization/yamlutils.py new/oslo.serialization-3.1.1/oslo_serialization/yamlutils.py --- old/oslo.serialization-2.29.2/oslo_serialization/yamlutils.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/oslo_serialization/yamlutils.py 2020-04-07 12:07:29.000000000 +0200 @@ -18,9 +18,16 @@ Use this module inside openstack projects to handle yaml securely and properly. """ +from debtcollector import removals import yaml +removals.removed_module( + 'oslo_serialization.yamlutils', version='3.0.0', + removal_version='4.0.0', + message='The oslo_serialization.yamlutils will be removed') + + def load(stream, is_safe=True): """Converts a YAML document to a Python object. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/releasenotes/notes/deprecate-yamlutils-module-96eee55f7ae57382.yaml new/oslo.serialization-3.1.1/releasenotes/notes/deprecate-yamlutils-module-96eee55f7ae57382.yaml --- old/oslo.serialization-2.29.2/releasenotes/notes/deprecate-yamlutils-module-96eee55f7ae57382.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.serialization-3.1.1/releasenotes/notes/deprecate-yamlutils-module-96eee55f7ae57382.yaml 2020-04-07 12:07:29.000000000 +0200 @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``yamlutils`` module is deprecated in Ussuri and + support will be removed in a future release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/releasenotes/notes/drop-python27-support-185668eec068ffa5.yaml new/oslo.serialization-3.1.1/releasenotes/notes/drop-python27-support-185668eec068ffa5.yaml --- old/oslo.serialization-2.29.2/releasenotes/notes/drop-python27-support-185668eec068ffa5.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.serialization-3.1.1/releasenotes/notes/drop-python27-support-185668eec068ffa5.yaml 2020-04-07 12:07:29.000000000 +0200 @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Support for Python 2.7 has been dropped. The minimum version of Python now + supported is Python 3.6. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/releasenotes/source/index.rst new/oslo.serialization-3.1.1/releasenotes/source/index.rst --- old/oslo.serialization-2.29.2/releasenotes/source/index.rst 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/releasenotes/source/index.rst 2020-04-07 12:07:29.000000000 +0200 @@ -6,6 +6,7 @@ :maxdepth: 1 unreleased + train stein rocky queens diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/releasenotes/source/train.rst new/oslo.serialization-3.1.1/releasenotes/source/train.rst --- old/oslo.serialization-2.29.2/releasenotes/source/train.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.serialization-3.1.1/releasenotes/source/train.rst 2020-04-07 12:07:29.000000000 +0200 @@ -0,0 +1,6 @@ +========================== +Train Series Release Notes +========================== + +.. release-notes:: + :branch: stable/train diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/requirements.txt new/oslo.serialization-3.1.1/requirements.txt --- old/oslo.serialization-2.29.2/requirements.txt 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/requirements.txt 2020-04-07 12:07:29.000000000 +0200 @@ -8,8 +8,8 @@ # that is a likely indicator that the feature belongs somewhere else. pbr!=2.1.0,>=2.0.0 # Apache-2.0 -six>=1.10.0 # MIT msgpack>=0.5.2 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 pytz>=2013.6 # MIT PyYAML>=3.12 # MIT +debtcollector>=1.2.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/setup.cfg new/oslo.serialization-3.1.1/setup.cfg --- old/oslo.serialization-2.29.2/setup.cfg 2019-09-04 16:25:47.000000000 +0200 +++ new/oslo.serialization-3.1.1/setup.cfg 2020-04-07 12:08:36.000000000 +0200 @@ -6,6 +6,7 @@ author = OpenStack author-email = openstack-disc...@lists.openstack.org home-page = https://docs.openstack.org/oslo.serialization/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,11 +14,11 @@ License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: Implementation :: CPython [files] packages = @@ -37,9 +38,6 @@ mapping_file = babel.cfg output_file = oslo.serialization/locale/oslo.serialization.pot -[bdist_wheel] -universal = 1 - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/setup.py new/oslo.serialization-3.1.1/setup.py --- old/oslo.serialization-2.29.2/setup.py 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/setup.py 2020-04-07 12:07:29.000000000 +0200 @@ -13,17 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/test-requirements.txt new/oslo.serialization-3.1.1/test-requirements.txt --- old/oslo.serialization-2.29.2/test-requirements.txt 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/test-requirements.txt 2020-04-07 12:07:29.000000000 +0200 @@ -1,9 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0,<1.2.0 # Apache-2.0 -ipaddress>=1.0.17;python_version<'3.3' # PSF -mock>=2.0.0 # BSD +hacking>=3.0,<3.1.0 # Apache-2.0 netaddr>=0.7.18 # BSD stestr>=2.0.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.serialization-2.29.2/tox.ini new/oslo.serialization-3.1.1/tox.ini --- old/oslo.serialization-2.29.2/tox.ini 2019-09-04 16:25:05.000000000 +0200 +++ new/oslo.serialization-3.1.1/tox.ini 2020-04-07 12:07:29.000000000 +0200 @@ -1,11 +1,10 @@ [tox] -minversion = 3.1 -envlist = py27,py37,pep8 +minversion = 3.2.0 +envlist = py37,pep8 basepython = python3 -ignore_basepython_conflict = True +ignore_basepython_conflict = true [testenv] -install_command = pip install {opts} {packages} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt @@ -25,14 +24,20 @@ commands = python setup.py test --coverage --coverage-package-name=oslo_serialization --testr-args='{posargs}' [testenv:docs] +whitelist_externals = rm deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/doc/requirements.txt -commands = sphinx-build -W -b html doc/source doc/build/html +commands = + rm -fr doc/build + sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:releasenotes] +whitelist_externals = rm deps = {[testenv:docs]deps} -commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html +commands = + rm -rf releasenotes/build + sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html [testenv:lower-constraints] deps = @@ -42,6 +47,7 @@ [flake8] # E123, E125 skipped as they are invalid PEP-8. +# W504 line break after binary operator show-source = True -ignore = E123,E125 +ignore = E123,E125,W504 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build