public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/boltons/files/
@ 2023-03-17 18:59 Ionen Wolkens
  0 siblings, 0 replies; only message in thread
From: Ionen Wolkens @ 2023-03-17 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     1b7b0366fe29d13fd358d063cd2fd8abaa6e71d3
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Mar 17 12:16:18 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Mar 17 18:58:08 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b7b0366

dev-python/boltons: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/30175
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../boltons/files/boltons-21.0.0-python3.10.patch  | 110 ---------------------
 .../files/boltons-21.0.0-python3.11-tests.patch    |   7 --
 2 files changed, 117 deletions(-)

diff --git a/dev-python/boltons/files/boltons-21.0.0-python3.10.patch b/dev-python/boltons/files/boltons-21.0.0-python3.10.patch
deleted file mode 100644
index 2e9974a71c9e..000000000000
--- a/dev-python/boltons/files/boltons-21.0.0-python3.10.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-https://github.com/mahmoud/boltons/commit/270e974
-From: Mahmoud Hashemi <mahmoud@hatnote.com>
-Date: Sun, 10 Oct 2021 23:26:24 -0700
-Subject: [PATCH] address ecoutils import issue, fixes #294
---- 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/dev-python/boltons/files/boltons-21.0.0-python3.11-tests.patch b/dev-python/boltons/files/boltons-21.0.0-python3.11-tests.patch
deleted file mode 100644
index a54b2a4d0cf1..000000000000
--- a/dev-python/boltons/files/boltons-21.0.0-python3.11-tests.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-object.__getstate__ was added in 3.11 (bpo-26579) and the test is unaware
---- a/tests/test_dictutils.py
-+++ b/tests/test_dictutils.py
-@@ -476,2 +476,3 @@
-                        '__getitem__',
-+                       '__getstate__',
-                        '__gt__',


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-17 18:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17 18:59 [gentoo-commits] repo/gentoo:master commit in: dev-python/boltons/files/ Ionen Wolkens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox