From 730984bb792d66d312b652edf6ae5b914880fb5c4279192ebc85508fc27fe397 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 15 Dec 2023 09:38:55 +0000 Subject: [PATCH 1/2] Accepting request 1133147 from home:pgajdos:python pmmu version update OBS-URL: https://build.opensuse.org/request/show/1133147 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-boltons?expand=0&rev=21 --- boltons-21.0.0.tar.gz | 3 - boltons-23.1.1.tar.gz | 3 + fix-ecoutil-imports.patch | 117 ------------------------------ getstate-to-through-methods.patch | 22 ------ python-boltons.changes | 31 ++++++++ python-boltons.spec | 9 +-- 6 files changed, 36 insertions(+), 149 deletions(-) delete mode 100644 boltons-21.0.0.tar.gz create mode 100644 boltons-23.1.1.tar.gz delete mode 100644 fix-ecoutil-imports.patch delete mode 100644 getstate-to-through-methods.patch diff --git a/boltons-21.0.0.tar.gz b/boltons-21.0.0.tar.gz deleted file mode 100644 index 1716fff..0000000 --- a/boltons-21.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f29e135661071968b9cea1783dd5bd2403b2a141ccd5f5637692fc544bcc4db -size 241010 diff --git a/boltons-23.1.1.tar.gz b/boltons-23.1.1.tar.gz new file mode 100644 index 0000000..8602634 --- /dev/null +++ b/boltons-23.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2cb2fa83cf2ebe791be1e284183e8a43a1031355156a968f8e0a333ad2448fc +size 244629 diff --git a/fix-ecoutil-imports.patch b/fix-ecoutil-imports.patch deleted file mode 100644 index 1bef5c1..0000000 --- a/fix-ecoutil-imports.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 270e974975984f662f998c8f6eb0ebebd964de82 Mon Sep 17 00:00:00 2001 -From: Mahmoud Hashemi -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) diff --git a/getstate-to-through-methods.patch b/getstate-to-through-methods.patch deleted file mode 100644 index 9317f83..0000000 --- a/getstate-to-through-methods.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 75cd86b3ea6534d5bd8d3c83c3cf1b493e7c9102 Mon Sep 17 00:00:00 2001 -From: Stefano Rivera -Date: Fri, 20 Jan 2023 12:16:35 -0800 -Subject: [PATCH] Add __getstate__ to through_methods (bpo-26579) (#323) - -Adds support for Python 3.11. ---- - tests/test_dictutils.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/test_dictutils.py b/tests/test_dictutils.py -index ca59a31e..0044001a 100644 ---- a/tests/test_dictutils.py -+++ b/tests/test_dictutils.py -@@ -474,6 +474,7 @@ def test_frozendict_api(): - '__ge__', - '__getattribute__', - '__getitem__', -+ '__getstate__', - '__gt__', - '__init__', - '__iter__', diff --git a/python-boltons.changes b/python-boltons.changes index f187a71..e33a311 100644 --- a/python-boltons.changes +++ b/python-boltons.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Thu Dec 14 09:16:30 UTC 2023 - Petr Gajdos + +- update to 23.0.0: + * *(February 19, 2023)* + + * Overdue update for Python 3.10 and 3.11 support + ([#294][i294], [#303][i303], [#320][i320], [#323][i323], + [#326][i326]/[#327][i327]) + * Add [iterutils.chunk_ranges][iterutils.chunk_ranges] + ([#312][i312]) + * Improvements to `SpooledBytesIO`/`SpooledStringIO` + ([#305][i305]) + * Bugfix for infinite daterange issue when start and stop is + the same ([#302][i302]) + * Fix `Bits.as_list` behavior ([#315][i315]) + + * [i294]: https://github.com/mahmoud/boltons/issues/294 + * [i302]: https://github.com/mahmoud/boltons/issues/302 + * [i303]: https://github.com/mahmoud/boltons/issues/303 + * [i305]: https://github.com/mahmoud/boltons/issues/305 + * [i312]: https://github.com/mahmoud/boltons/issues/312 + * [i315]: https://github.com/mahmoud/boltons/issues/315 + * [i320]: https://github.com/mahmoud/boltons/issues/320 + * [i323]: https://github.com/mahmoud/boltons/issues/323 + * [i326]: https://github.com/mahmoud/boltons/issues/326 + * [i327]: https://github.com/mahmoud/boltons/issues/327 +- deleted patches + - fix-ecoutil-imports.patch (upstreamed) + - getstate-to-through-methods.patch (upstreamed) + ------------------------------------------------------------------- Mon Jan 23 14:33:24 UTC 2023 - Markéta Machová diff --git a/python-boltons.spec b/python-boltons.spec index 7147678..65ab397 100644 --- a/python-boltons.spec +++ b/python-boltons.spec @@ -16,18 +16,13 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-boltons -Version: 21.0.0 +Version: 23.1.1 Release: 0 Summary: The "Boltons" utility package for Python License: BSD-3-Clause URL: https://github.com/mahmoud/boltons -Source: https://github.com/mahmoud/boltons/archive/%{version}.tar.gz#/boltons-%{version}.tar.gz -# PATCH-FIX-UPSTREAM Support Python 3.10 gh#mahmoud/boltons#270e974975984f662f998c8f6eb0ebebd964de82 -Patch0: fix-ecoutil-imports.patch -# PATCH-FIX-UPSTREAM Adds support for Python 3.11. gh#mahmoud/boltons#75cd86b3ea6534d5bd8d3c83c3cf1b493e7c9102 -Patch1: getstate-to-through-methods.patch +Source: https://files.pythonhosted.org/packages/source/b/boltons/boltons-%{version}.tar.gz BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes From f082433da7e6a66723a23354af42b8456e7553ba8c2b3e7ccfdc8551e9212a7f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 15 Dec 2023 09:39:28 +0000 Subject: [PATCH 2/2] * jsonutils.reverse_iter_lines now works on Py3 and Windows OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-boltons?expand=0&rev=22 --- python-boltons.changes | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/python-boltons.changes b/python-boltons.changes index e33a311..2cca2d2 100644 --- a/python-boltons.changes +++ b/python-boltons.changes @@ -2,29 +2,12 @@ Thu Dec 14 09:16:30 UTC 2023 - Petr Gajdos - update to 23.0.0: - * *(February 19, 2023)* - * Overdue update for Python 3.10 and 3.11 support - ([#294][i294], [#303][i303], [#320][i320], [#323][i323], - [#326][i326]/[#327][i327]) * Add [iterutils.chunk_ranges][iterutils.chunk_ranges] - ([#312][i312]) * Improvements to `SpooledBytesIO`/`SpooledStringIO` - ([#305][i305]) * Bugfix for infinite daterange issue when start and stop is the same ([#302][i302]) * Fix `Bits.as_list` behavior ([#315][i315]) - - * [i294]: https://github.com/mahmoud/boltons/issues/294 - * [i302]: https://github.com/mahmoud/boltons/issues/302 - * [i303]: https://github.com/mahmoud/boltons/issues/303 - * [i305]: https://github.com/mahmoud/boltons/issues/305 - * [i312]: https://github.com/mahmoud/boltons/issues/312 - * [i315]: https://github.com/mahmoud/boltons/issues/315 - * [i320]: https://github.com/mahmoud/boltons/issues/320 - * [i323]: https://github.com/mahmoud/boltons/issues/323 - * [i326]: https://github.com/mahmoud/boltons/issues/326 - * [i327]: https://github.com/mahmoud/boltons/issues/327 - deleted patches - fix-ecoutil-imports.patch (upstreamed) - getstate-to-through-methods.patch (upstreamed) @@ -44,7 +27,7 @@ Mon Dec 13 00:04:19 UTC 2021 - Steve Kowalik * 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 + * jsonutils.reverse_iter_lines now works on Py3 and Windows - Drop boltons-pr271-py39-frozendict.patch: * Included upstream. - Add patch fix-ecoutil-imports.patch: