Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-boltons for openSUSE:Factory checked in at 2021-12-16 21:19:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-boltons (Old) and /work/SRC/openSUSE:Factory/.python-boltons.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-boltons" Thu Dec 16 21:19:15 2021 rev:8 rq:940120 version:21.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-boltons/python-boltons.changes 2021-03-24 16:10:36.627791559 +0100 +++ /work/SRC/openSUSE:Factory/.python-boltons.new.2520/python-boltons.changes 2021-12-16 21:20:06.110539266 +0100 @@ -1,0 +2,15 @@ +Mon Dec 13 00:04:19 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com> + +- Update to 21.0.0: + * Fix OMD.addlist when the added list is empty + * Add funcutils.noop, satisfying PEP 559 + * Support lists for iterutils.bucketize + * Python 3.9 test fixes for OMD (PEP 584, see #271) + * Make typeutils.make_sentinel more pickleable + * jsonutils.reverse_iter_lines now works on Py3 and Windows +- Drop boltons-pr271-py39-frozendict.patch: + * Included upstream. +- Add patch fix-ecoutil-imports.patch: + * Support Python 3.10. + +------------------------------------------------------------------- Old: ---- boltons-20.2.1.tar.gz boltons-pr271-py39-frozendict.patch New: ---- boltons-21.0.0.tar.gz fix-ecoutil-imports.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-boltons.spec ++++++ --- /var/tmp/diff_new_pack.kOsEdR/_old 2021-12-16 21:20:06.602539454 +0100 +++ /var/tmp/diff_new_pack.kOsEdR/_new 2021-12-16 21:20:06.602539454 +0100 @@ -18,15 +18,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-boltons -Version: 20.2.1 +Version: 21.0.0 Release: 0 Summary: The "Boltons" utility package for Python License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/mahmoud/boltons Source: https://github.com/mahmoud/boltons/archive/%{version}.tar.gz#/boltons-%{version}.tar.gz -# PATCH-FIX-UPSTREAM boltons-pr271-py39-frozendict.patch -- gh#mahmoud/boltons#271, gh#mahmoud/boltons#283 -Patch0: boltons-pr271-py39-frozendict.patch +# PATCH-FIX-UPSTREAM Support Python 3.10 gh#mahmoud/boltons#270e974975984f662f998c8f6eb0ebebd964de82 +Patch0: fix-ecoutil-imports.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes ++++++ boltons-20.2.1.tar.gz -> boltons-21.0.0.tar.gz ++++++ ++++ 1959 lines of diff (skipped) ++++++ fix-ecoutil-imports.patch ++++++ >From 270e974975984f662f998c8f6eb0ebebd964de82 Mon Sep 17 00:00:00 2001 From: Mahmoud Hashemi <mahm...@hatnote.com> Date: Sun, 10 Oct 2021 23:26:24 -0700 Subject: [PATCH] address ecoutils import issue, fixes #294 --- boltons/ecoutils.py | 87 +++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/boltons/ecoutils.py b/boltons/ecoutils.py index 0ccad70..91b9412 100644 --- a/boltons/ecoutils.py +++ b/boltons/ecoutils.py @@ -354,38 +354,53 @@ def get_profile(**kwargs): return ret -_real_safe_repr = pprint._safe_repr - - -def _fake_json_dumps(val, indent=2): - # never do this. this is a hack for Python 2.4. Python 2.5 added - # the json module for a reason. - def _fake_safe_repr(*a, **kw): - res, is_read, is_rec = _real_safe_repr(*a, **kw) - if res == 'None': - res = 'null' - if res == 'True': - res = 'true' - if res == 'False': - res = 'false' - if not (res.startswith("'") or res.startswith("u'")): - res = res - else: - if res.startswith('u'): - res = res[1:] +try: + import json + + def dumps(val, indent): + if indent: + return json.dumps(val, sort_keys=True, indent=indent) + return json.dumps(val, sort_keys=True) + +except ImportError: + _real_safe_repr = pprint._safe_repr + + def _fake_json_dumps(val, indent=2): + # never do this. this is a hack for Python 2.4. Python 2.5 added + # the json module for a reason. + def _fake_safe_repr(*a, **kw): + res, is_read, is_rec = _real_safe_repr(*a, **kw) + if res == 'None': + res = 'null' + if res == 'True': + res = 'true' + if res == 'False': + res = 'false' + if not (res.startswith("'") or res.startswith("u'")): + res = res + else: + if res.startswith('u'): + res = res[1:] - contents = res[1:-1] - contents = contents.replace('"', '').replace(r'\"', '') - res = '"' + contents + '"' - return res, is_read, is_rec + contents = res[1:-1] + contents = contents.replace('"', '').replace(r'\"', '') + res = '"' + contents + '"' + return res, is_read, is_rec - pprint._safe_repr = _fake_safe_repr - try: - ret = pprint.pformat(val, indent=indent) - finally: - pprint._safe_repr = _real_safe_repr + pprint._safe_repr = _fake_safe_repr + try: + ret = pprint.pformat(val, indent=indent) + finally: + pprint._safe_repr = _real_safe_repr + + return ret + + def dumps(val, indent): + ret = _fake_json_dumps(val, indent=indent) + if not indent: + ret = re.sub(r'\n\s*', ' ', ret) + return ret - return ret def get_profile_json(indent=False): @@ -393,20 +408,6 @@ def get_profile_json(indent=False): indent = 2 else: indent = 0 - try: - import json - - def dumps(val, indent): - if indent: - return json.dumps(val, sort_keys=True, indent=indent) - return json.dumps(val, sort_keys=True) - - except ImportError: - def dumps(val, indent): - ret = _fake_json_dumps(val, indent=indent) - if not indent: - ret = re.sub(r'\n\s*', ' ', ret) - return ret data_dict = get_profile() return dumps(data_dict, indent)