forked from pool/python-boltons
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
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9f29e135661071968b9cea1783dd5bd2403b2a141ccd5f5637692fc544bcc4db
|
||||
size 241010
|
||||
3
boltons-23.1.1.tar.gz
Normal file
3
boltons-23.1.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d2cb2fa83cf2ebe791be1e284183e8a43a1031355156a968f8e0a333ad2448fc
|
||||
size 244629
|
||||
@@ -1,117 +0,0 @@
|
||||
From 270e974975984f662f998c8f6eb0ebebd964de82 Mon Sep 17 00:00:00 2001
|
||||
From: Mahmoud Hashemi <mahmoud@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)
|
||||
@@ -1,22 +0,0 @@
|
||||
From 75cd86b3ea6534d5bd8d3c83c3cf1b493e7c9102 Mon Sep 17 00:00:00 2001
|
||||
From: Stefano Rivera <github@rivera.za.net>
|
||||
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__',
|
||||
@@ -1,3 +1,34 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 14 09:16:30 UTC 2023 - Petr Gajdos <pgajdos@suse.com>
|
||||
|
||||
- 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á <mmachova@suse.com>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user