1 |
commit: 1b7b0366fe29d13fd358d063cd2fd8abaa6e71d3 |
2 |
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> |
3 |
AuthorDate: Fri Mar 17 12:16:18 2023 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 17 18:58:08 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b7b0366 |
7 |
|
8 |
dev-python/boltons: remove unused patch(es) |
9 |
|
10 |
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/30175 |
12 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
13 |
|
14 |
.../boltons/files/boltons-21.0.0-python3.10.patch | 110 --------------------- |
15 |
.../files/boltons-21.0.0-python3.11-tests.patch | 7 -- |
16 |
2 files changed, 117 deletions(-) |
17 |
|
18 |
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 |
19 |
deleted file mode 100644 |
20 |
index 2e9974a71c9e..000000000000 |
21 |
--- a/dev-python/boltons/files/boltons-21.0.0-python3.10.patch |
22 |
+++ /dev/null |
23 |
@@ -1,110 +0,0 @@ |
24 |
-https://github.com/mahmoud/boltons/commit/270e974 |
25 |
-From: Mahmoud Hashemi <mahmoud@×××××××.com> |
26 |
-Date: Sun, 10 Oct 2021 23:26:24 -0700 |
27 |
-Subject: [PATCH] address ecoutils import issue, fixes #294 |
28 |
---- a/boltons/ecoutils.py |
29 |
-+++ b/boltons/ecoutils.py |
30 |
-@@ -354,38 +354,53 @@ def get_profile(**kwargs): |
31 |
- return ret |
32 |
- |
33 |
- |
34 |
--_real_safe_repr = pprint._safe_repr |
35 |
-- |
36 |
-- |
37 |
--def _fake_json_dumps(val, indent=2): |
38 |
-- # never do this. this is a hack for Python 2.4. Python 2.5 added |
39 |
-- # the json module for a reason. |
40 |
-- def _fake_safe_repr(*a, **kw): |
41 |
-- res, is_read, is_rec = _real_safe_repr(*a, **kw) |
42 |
-- if res == 'None': |
43 |
-- res = 'null' |
44 |
-- if res == 'True': |
45 |
-- res = 'true' |
46 |
-- if res == 'False': |
47 |
-- res = 'false' |
48 |
-- if not (res.startswith("'") or res.startswith("u'")): |
49 |
-- res = res |
50 |
-- else: |
51 |
-- if res.startswith('u'): |
52 |
-- res = res[1:] |
53 |
-+try: |
54 |
-+ import json |
55 |
-+ |
56 |
-+ def dumps(val, indent): |
57 |
-+ if indent: |
58 |
-+ return json.dumps(val, sort_keys=True, indent=indent) |
59 |
-+ return json.dumps(val, sort_keys=True) |
60 |
-+ |
61 |
-+except ImportError: |
62 |
-+ _real_safe_repr = pprint._safe_repr |
63 |
-+ |
64 |
-+ def _fake_json_dumps(val, indent=2): |
65 |
-+ # never do this. this is a hack for Python 2.4. Python 2.5 added |
66 |
-+ # the json module for a reason. |
67 |
-+ def _fake_safe_repr(*a, **kw): |
68 |
-+ res, is_read, is_rec = _real_safe_repr(*a, **kw) |
69 |
-+ if res == 'None': |
70 |
-+ res = 'null' |
71 |
-+ if res == 'True': |
72 |
-+ res = 'true' |
73 |
-+ if res == 'False': |
74 |
-+ res = 'false' |
75 |
-+ if not (res.startswith("'") or res.startswith("u'")): |
76 |
-+ res = res |
77 |
-+ else: |
78 |
-+ if res.startswith('u'): |
79 |
-+ res = res[1:] |
80 |
- |
81 |
-- contents = res[1:-1] |
82 |
-- contents = contents.replace('"', '').replace(r'\"', '') |
83 |
-- res = '"' + contents + '"' |
84 |
-- return res, is_read, is_rec |
85 |
-+ contents = res[1:-1] |
86 |
-+ contents = contents.replace('"', '').replace(r'\"', '') |
87 |
-+ res = '"' + contents + '"' |
88 |
-+ return res, is_read, is_rec |
89 |
- |
90 |
-- pprint._safe_repr = _fake_safe_repr |
91 |
-- try: |
92 |
-- ret = pprint.pformat(val, indent=indent) |
93 |
-- finally: |
94 |
-- pprint._safe_repr = _real_safe_repr |
95 |
-+ pprint._safe_repr = _fake_safe_repr |
96 |
-+ try: |
97 |
-+ ret = pprint.pformat(val, indent=indent) |
98 |
-+ finally: |
99 |
-+ pprint._safe_repr = _real_safe_repr |
100 |
-+ |
101 |
-+ return ret |
102 |
-+ |
103 |
-+ def dumps(val, indent): |
104 |
-+ ret = _fake_json_dumps(val, indent=indent) |
105 |
-+ if not indent: |
106 |
-+ ret = re.sub(r'\n\s*', ' ', ret) |
107 |
-+ return ret |
108 |
- |
109 |
-- return ret |
110 |
- |
111 |
- |
112 |
- def get_profile_json(indent=False): |
113 |
-@@ -393,20 +408,6 @@ def get_profile_json(indent=False): |
114 |
- indent = 2 |
115 |
- else: |
116 |
- indent = 0 |
117 |
-- try: |
118 |
-- import json |
119 |
-- |
120 |
-- def dumps(val, indent): |
121 |
-- if indent: |
122 |
-- return json.dumps(val, sort_keys=True, indent=indent) |
123 |
-- return json.dumps(val, sort_keys=True) |
124 |
-- |
125 |
-- except ImportError: |
126 |
-- def dumps(val, indent): |
127 |
-- ret = _fake_json_dumps(val, indent=indent) |
128 |
-- if not indent: |
129 |
-- ret = re.sub(r'\n\s*', ' ', ret) |
130 |
-- return ret |
131 |
- |
132 |
- data_dict = get_profile() |
133 |
- return dumps(data_dict, indent) |
134 |
|
135 |
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 |
136 |
deleted file mode 100644 |
137 |
index a54b2a4d0cf1..000000000000 |
138 |
--- a/dev-python/boltons/files/boltons-21.0.0-python3.11-tests.patch |
139 |
+++ /dev/null |
140 |
@@ -1,7 +0,0 @@ |
141 |
-object.__getstate__ was added in 3.11 (bpo-26579) and the test is unaware |
142 |
---- a/tests/test_dictutils.py |
143 |
-+++ b/tests/test_dictutils.py |
144 |
-@@ -476,2 +476,3 @@ |
145 |
- '__getitem__', |
146 |
-+ '__getstate__', |
147 |
- '__gt__', |