Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/, app-admin/salt/
Date: Fri, 01 May 2020 01:07:33
Message-Id: 1588295241.680afc54c6185bec1af67dbacaab9df9e247756a.chutzpah@gentoo
1 commit: 680afc54c6185bec1af67dbacaab9df9e247756a
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Fri May 1 00:50:56 2020 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Fri May 1 01:07:21 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=680afc54
7
8 app-admin/salt-3000.2-r4: revbump, fix warnings with py38
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 app-admin/salt/Manifest | 1 +
15 .../salt/files/salt-3000.2-py38-logwarn.patch | 116 ++++++
16 app-admin/salt/files/salt-3000.2-py38-misc.patch | 460 ---------------------
17 .../salt/files/salt-3000.2-tornado-py38.patch | 12 -
18 ...salt-3000.2-r3.ebuild => salt-3000.2-r4.ebuild} | 15 +-
19 5 files changed, 128 insertions(+), 476 deletions(-)
20
21 diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest
22 index 64303c5476b..fed8fc97b0c 100644
23 --- a/app-admin/salt/Manifest
24 +++ b/app-admin/salt/Manifest
25 @@ -1,2 +1,3 @@
26 DIST salt-2019.2.4.tar.gz 14572556 BLAKE2B a1057baa5ab6c0a07f34ce658a1d5bc644f968600663d28d084eb712b55faaee93b8410d81c4b5324944e6e1f2067ffb102200088832e1b0076fed78c8542ae6 SHA512 9e621cbd78ead1060a2b0c07e7ef02e8c4590360a95c51ac29fa8c1add34f617e4407dd28b67cae3b0fd68b333782185edcf1159edd2db08e8b4e79b6b07a63f
27 +DIST salt-3000.2-py38-misc.patch.gz 6250 BLAKE2B 68fff80a042e6bf208ea2d9692da7a7b1e29572f1ec3c850c14743bbf2821d231f933ec4e6d6eaad12acee0b7666888a37a72872b2b082c92d8db9de988fbbec SHA512 6d4a66323a423e630f7cc73b566ed96c452c8fc3d72c25a2dd86033c4774c1c8e8b8701e1d4ee92994d4148c398d704f419023e26d8b40c8fdd63f9d79d9d52f
28 DIST salt-3000.2.tar.gz 15231513 BLAKE2B 2090d0f52f953a42f1685ad190750e9c76ad6e862a3272444fef063a7605f69a6c542f04165a41fb9cdaa126a878cc133d4857faa70edc5eac4bf49bdde937ab SHA512 88e8876ed8cd18e942c2194686cda68f40fa49e69e317ca488bf58e095bcf6cdf8771d93eba7960038941cc5863e13a4eea4dad5256c12da7cd8288a2c61f59d
29
30 diff --git a/app-admin/salt/files/salt-3000.2-py38-logwarn.patch b/app-admin/salt/files/salt-3000.2-py38-logwarn.patch
31 new file mode 100644
32 index 00000000000..e77d2376ce1
33 --- /dev/null
34 +++ b/app-admin/salt/files/salt-3000.2-py38-logwarn.patch
35 @@ -0,0 +1,116 @@
36 +diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py
37 +index 68f752cb2d..fa2b96499d 100644
38 +--- a/salt/cloud/clouds/ec2.py
39 ++++ b/salt/cloud/clouds/ec2.py
40 +@@ -4901,7 +4901,7 @@ def get_password_data(
41 +
42 + if not HAS_M2 and not HAS_PYCRYPTO:
43 + if 'key' in kwargs or 'key_file' in kwargs:
44 +- log.warn("No crypto library is installed, can not decrypt password")
45 ++ log.warning("No crypto library is installed, can not decrypt password")
46 + return ret
47 +
48 + if 'key' not in kwargs:
49 +diff --git a/salt/modules/gpg.py b/salt/modules/gpg.py
50 +index 9dd1007c1b..47c82a7141 100644
51 +--- a/salt/modules/gpg.py
52 ++++ b/salt/modules/gpg.py
53 +@@ -1083,7 +1083,7 @@ def verify(text=None,
54 +
55 + if trustmodel and trustmodel not in trustmodels:
56 + msg = 'Invalid trustmodel defined: {}. Use one of: {}'.format(trustmodel, ', '.join(trustmodels))
57 +- log.warn(msg)
58 ++ log.warning(msg)
59 + return {'res': False, 'message': msg}
60 +
61 + extra_args = []
62 +diff --git a/salt/modules/network.py b/salt/modules/network.py
63 +index 38e2bc326e..f3a8a714cd 100644
64 +--- a/salt/modules/network.py
65 ++++ b/salt/modules/network.py
66 +@@ -958,7 +958,7 @@ def traceroute(host):
67 +
68 + ret.append(result)
69 + if not result:
70 +- log.warn('Cannot parse traceroute output line: %s', line)
71 ++ log.warning('Cannot parse traceroute output line: %s', line)
72 + return ret
73 +
74 +
75 +diff --git a/salt/modules/saltutil.py b/salt/modules/saltutil.py
76 +index 138a0fcf51..5f026b0f36 100644
77 +--- a/salt/modules/saltutil.py
78 ++++ b/salt/modules/saltutil.py
79 +@@ -1096,7 +1096,7 @@ def refresh_pillar(wait=False, timeout=30):
80 + tag='/salt/minion/minion_pillar_refresh_complete',
81 + wait=timeout)
82 + if not event_ret or event_ret['complete'] is False:
83 +- log.warn("Pillar refresh did not complete within timeout %s", timeout)
84 ++ log.warning("Pillar refresh did not complete within timeout %s", timeout)
85 + return ret
86 +
87 +
88 +diff --git a/salt/transport/tcp.py b/salt/transport/tcp.py
89 +index 12ef24e86f..e83d1c927f 100644
90 +--- a/salt/transport/tcp.py
91 ++++ b/salt/transport/tcp.py
92 +@@ -1073,7 +1073,7 @@ class SaltMessageClient(object):
93 + self._connecting_future.set_result(True)
94 + break
95 + except Exception as exc: # pylint: disable=broad-except
96 +- log.warn('TCP Message Client encountered an exception %r', exc)
97 ++ log.warning('TCP Message Client encountered an exception %r', exc)
98 + yield salt.ext.tornado.gen.sleep(1) # TODO: backoff
99 + #self._connecting_future.set_exception(e)
100 +
101 +diff --git a/salt/utils/process.py b/salt/utils/process.py
102 +index 9626ac0cb2..18697ccf7c 100644
103 +--- a/salt/utils/process.py
104 ++++ b/salt/utils/process.py
105 +@@ -124,7 +124,7 @@ def dup2(file1, file2):
106 + try:
107 + fno1 = file1.fileno()
108 + except io.UnsupportedOperation:
109 +- log.warn('Unsupported operation on file: %r', file1)
110 ++ log.warning('Unsupported operation on file: %r', file1)
111 + return
112 + if isinstance(file2, int):
113 + fno2 = file2
114 +@@ -132,7 +132,7 @@ def dup2(file1, file2):
115 + try:
116 + fno2 = file2.fileno()
117 + except io.UnsupportedOperation:
118 +- log.warn('Unsupported operation on file: %r', file2)
119 ++ log.warning('Unsupported operation on file: %r', file2)
120 + return
121 + os.dup2(fno1, fno2)
122 +
123 +@@ -829,13 +829,13 @@ class SignalHandlingProcess(Process):
124 + if child.is_running():
125 + child.terminate()
126 + except psutil.NoSuchProcess:
127 +- log.warn(
128 ++ log.warning(
129 + 'Unable to kill child of process %d, it does '
130 + 'not exist. My pid is %d',
131 + self.pid, os.getpid()
132 + )
133 + except psutil.NoSuchProcess:
134 +- log.warn(
135 ++ log.warning(
136 + 'Unable to kill children of process %d, it does not exist.'
137 + 'My pid is %d',
138 + self.pid, os.getpid()
139 +diff --git a/tests/integration/modules/test_state.py b/tests/integration/modules/test_state.py
140 +index 81b3b677b9..2f3bcaa613 100644
141 +--- a/tests/integration/modules/test_state.py
142 ++++ b/tests/integration/modules/test_state.py
143 +@@ -2282,7 +2282,7 @@ class StateModuleTest(ModuleCase, SaltReturnAssertsMixin):
144 + try:
145 + os.remove(path)
146 + except OSError:
147 +- log.warn("Path not found: %s", path)
148 ++ log.warning("Path not found: %s", path)
149 +
150 + with salt.utils.files.fopen(module_path, 'w') as fp:
151 + fp.write('raise ImportError("No module named pip")')
152
153 diff --git a/app-admin/salt/files/salt-3000.2-py38-misc.patch b/app-admin/salt/files/salt-3000.2-py38-misc.patch
154 deleted file mode 100644
155 index 93cc045a531..00000000000
156 --- a/app-admin/salt/files/salt-3000.2-py38-misc.patch
157 +++ /dev/null
158 @@ -1,460 +0,0 @@
159 -diff --git a/salt/config/__init__.py b/salt/config/__init__.py
160 -index 70b34ec949..4304d99bf7 100644
161 ---- a/salt/config/__init__.py
162 -+++ b/salt/config/__init__.py
163 -@@ -8,6 +8,7 @@ from __future__ import absolute_import, print_function, unicode_literals, genera
164 - import os
165 - import re
166 - import sys
167 -+import copy
168 - import glob
169 - import time
170 - import codecs
171 -@@ -3191,7 +3192,7 @@ def apply_cloud_providers_config(overrides, defaults=None):
172 - # Merge provided extends
173 - keep_looping = False
174 - for alias, entries in six.iteritems(providers.copy()):
175 -- for driver, details in six.iteritems(entries):
176 -+ for driver, details in copy.copy(entries).items():
177 -
178 - if 'extends' not in details:
179 - # Extends resolved or non existing, continue!
180 -diff --git a/salt/grains/core.py b/salt/grains/core.py
181 -index 9b244def9c..ede3a94de9 100644
182 ---- a/salt/grains/core.py
183 -+++ b/salt/grains/core.py
184 -@@ -1939,7 +1939,7 @@ def os_data():
185 - )
186 - (osname, osrelease, oscodename) = \
187 - [x.strip('"').strip("'") for x in
188 -- linux_distribution(supported_dists=_supported_dists)]
189 -+ linux_distribution()]
190 - # Try to assign these three names based on the lsb info, they tend to
191 - # be more accurate than what python gets from /etc/DISTRO-release.
192 - # It's worth noting that Ubuntu has patched their Python distribution
193 -diff --git a/salt/modules/boto_route53.py b/salt/modules/boto_route53.py
194 -index a663ec7207..8d3d8c2105 100644
195 ---- a/salt/modules/boto_route53.py
196 -+++ b/salt/modules/boto_route53.py
197 -@@ -158,7 +158,7 @@ def describe_hosted_zones(zone_id=None, domain_name=None, region=None,
198 - else:
199 - marker = None
200 - ret = None
201 -- while marker is not '':
202 -+ while marker != '':
203 - r = conn.get_all_hosted_zones(start_marker=marker,
204 - zone_list=ret)
205 - ret = r['ListHostedZonesResponse']['HostedZones']
206 -diff --git a/salt/modules/file.py b/salt/modules/file.py
207 -index b5b70e2d4c..41a9229eb4 100644
208 ---- a/salt/modules/file.py
209 -+++ b/salt/modules/file.py
210 -@@ -2744,7 +2744,7 @@ def blockreplace(path,
211 -
212 - if block_found:
213 - diff = __utils__['stringutils.get_diff'](orig_file, new_file)
214 -- has_changes = diff is not ''
215 -+ has_changes = diff != ''
216 - if has_changes and not dry_run:
217 - # changes detected
218 - # backup file attrs
219 -diff --git a/salt/modules/iptables.py b/salt/modules/iptables.py
220 -index e232c6931f..9708f45256 100644
221 ---- a/salt/modules/iptables.py
222 -+++ b/salt/modules/iptables.py
223 -@@ -905,7 +905,7 @@ def insert(table='filter', chain=None, position=None, rule=None, family='ipv4'):
224 - rules = get_rules(family=family)
225 - size = len(rules[table][chain]['rules'])
226 - position = (size + position) + 1
227 -- if position is 0:
228 -+ if position == 0:
229 - position = 1
230 -
231 - wait = '--wait' if _has_option('--wait', family) else ''
232 -@@ -1040,7 +1040,7 @@ def _parse_conf(conf_file=None, in_mem=False, family='ipv4'):
233 - ret_args = {}
234 - chain = parsed_args['append']
235 - for arg in parsed_args:
236 -- if parsed_args[arg] and arg is not 'append':
237 -+ if parsed_args[arg] and arg != 'append':
238 - ret_args[arg] = parsed_args[arg]
239 - if parsed_args['comment'] is not None:
240 - comment = parsed_args['comment'][0].strip('"')
241 -diff --git a/salt/modules/lxd.py b/salt/modules/lxd.py
242 -index d6c2d8d4b9..d617cbb3df 100644
243 ---- a/salt/modules/lxd.py
244 -+++ b/salt/modules/lxd.py
245 -@@ -1824,11 +1824,11 @@ def container_file_get(name, src, dst, overwrite=False,
246 -
247 - if mode:
248 - os.chmod(dst, mode)
249 -- if uid or uid is '0':
250 -+ if uid or uid == '0':
251 - uid = int(uid)
252 - else:
253 - uid = -1
254 -- if gid or gid is '0':
255 -+ if gid or gid == '0':
256 - gid = int(gid)
257 - else:
258 - gid = -1
259 -diff --git a/salt/modules/mongodb.py b/salt/modules/mongodb.py
260 -index 8cdb819102..ed3228150e 100644
261 ---- a/salt/modules/mongodb.py
262 -+++ b/salt/modules/mongodb.py
263 -@@ -484,7 +484,7 @@ def update_one(objects, collection, user=None, password=None, host=None, port=No
264 - objects = six.text_type(objects)
265 - objs = re.split(r'}\s+{', objects)
266 -
267 -- if len(objs) is not 2:
268 -+ if len(objs) != 2:
269 - return "Your request does not contain a valid " + \
270 - "'{_\"id\": \"my_id\"} {\"my_doc\": \"my_val\"}'"
271 -
272 -diff --git a/salt/modules/virt.py b/salt/modules/virt.py
273 -index a2412bb745..91e105fe04 100644
274 ---- a/salt/modules/virt.py
275 -+++ b/salt/modules/virt.py
276 -@@ -4732,7 +4732,7 @@ def _parse_pools_caps(doc):
277 - if options:
278 - if 'options' not in pool_caps:
279 - pool_caps['options'] = {}
280 -- kind = option_kind if option_kind is not 'vol' else 'volume'
281 -+ kind = option_kind if option_kind != 'vol' else 'volume'
282 - pool_caps['options'][kind] = options
283 - return pool_caps
284 -
285 -diff --git a/salt/modules/win_ip.py b/salt/modules/win_ip.py
286 -index e69f44211e..99b9d392f6 100644
287 ---- a/salt/modules/win_ip.py
288 -+++ b/salt/modules/win_ip.py
289 -@@ -342,7 +342,7 @@ def set_static_dns(iface, *addrs):
290 - salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.1'
291 - salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.252' '192.168.1.253'
292 - '''
293 -- if addrs is () or str(addrs[0]).lower() == 'none':
294 -+ if addrs == () or str(addrs[0]).lower() == 'none':
295 - return {'Interface': iface, 'DNS Server': 'No Changes'}
296 - # Clear the list of DNS servers if [] is passed
297 - if str(addrs[0]).lower() == '[]':
298 -diff --git a/salt/modules/win_lgpo.py b/salt/modules/win_lgpo.py
299 -index efa154889f..50f0c9940f 100644
300 ---- a/salt/modules/win_lgpo.py
301 -+++ b/salt/modules/win_lgpo.py
302 -@@ -4692,7 +4692,7 @@ class _policy_info(object):
303 - return 'true'
304 - elif val.upper() == 'Run Windows PowerShell scripts last'.upper():
305 - return 'false'
306 -- elif val is 'Not Configured':
307 -+ elif val == 'Not Configured':
308 - return None
309 - else:
310 - return 'Invalid Value'
311 -diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py
312 -index 74fa61bc51..42f0c2ca6e 100644
313 ---- a/salt/modules/win_system.py
314 -+++ b/salt/modules/win_system.py
315 -@@ -1149,7 +1149,7 @@ def set_system_date_time(years=None,
316 - system_time.wSecond = int(seconds)
317 - system_time_ptr = ctypes.pointer(system_time)
318 - succeeded = ctypes.windll.kernel32.SetLocalTime(system_time_ptr)
319 -- if succeeded is not 0:
320 -+ if succeeded != 0:
321 - return True
322 - else:
323 - log.error('Failed to set local time')
324 -diff --git a/salt/modules/x509.py b/salt/modules/x509.py
325 -index 1cdd912bfb..4069076c32 100644
326 ---- a/salt/modules/x509.py
327 -+++ b/salt/modules/x509.py
328 -@@ -131,7 +131,7 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1):
329 - to create the authoritykeyidentifier extension.
330 - '''
331 - if name == 'subjectKeyIdentifier' and \
332 -- value.strip('0123456789abcdefABCDEF:') is not '':
333 -+ value.strip('0123456789abcdefABCDEF:') != '':
334 - raise salt.exceptions.SaltInvocationError(
335 - 'value must be precomputed hash')
336 -
337 -diff --git a/salt/output/highstate.py b/salt/output/highstate.py
338 -index 1f2f9452fa..87be7656fe 100644
339 ---- a/salt/output/highstate.py
340 -+++ b/salt/output/highstate.py
341 -@@ -209,7 +209,7 @@ def _format_host(host, data, indent_level=1):
342 - # Verify that the needed data is present
343 - data_tmp = {}
344 - for tname, info in six.iteritems(data):
345 -- if isinstance(info, dict) and tname is not 'changes' and info and '__run_num__' not in info:
346 -+ if isinstance(info, dict) and tname != 'changes' and info and '__run_num__' not in info:
347 - err = ('The State execution failed to record the order '
348 - 'in which all states were executed. The state '
349 - 'return missing data is:')
350 -diff --git a/salt/renderers/stateconf.py b/salt/renderers/stateconf.py
351 -index cfce9e6926..1b116ddfb1 100644
352 ---- a/salt/renderers/stateconf.py
353 -+++ b/salt/renderers/stateconf.py
354 -@@ -224,7 +224,7 @@ def render(input, saltenv='base', sls='', argline='', **kws):
355 - tmplctx = STATE_CONF.copy()
356 - if tmplctx:
357 - prefix = sls + '::'
358 -- for k in six.iterkeys(tmplctx): # iterate over a copy of keys
359 -+ for k in copy.copy(tmplctx).keys(): # iterate over a copy of keys
360 - if k.startswith(prefix):
361 - tmplctx[k[len(prefix):]] = tmplctx[k]
362 - del tmplctx[k]
363 -diff --git a/salt/returners/slack_webhook_return.py b/salt/returners/slack_webhook_return.py
364 -index aad1cdf656..0db705df01 100644
365 ---- a/salt/returners/slack_webhook_return.py
366 -+++ b/salt/returners/slack_webhook_return.py
367 -@@ -322,7 +322,7 @@ def returner(ret):
368 - show_tasks = _options.get('show_tasks')
369 - author_icon = _options.get('author_icon')
370 -
371 -- if not webhook or webhook is '':
372 -+ if not webhook or webhook == '':
373 - log.error('%s.webhook not defined in salt config', __virtualname__)
374 - return
375 -
376 -diff --git a/salt/states/debconfmod.py b/salt/states/debconfmod.py
377 -index a0ef20b185..a7478c7ac0 100644
378 ---- a/salt/states/debconfmod.py
379 -+++ b/salt/states/debconfmod.py
380 -@@ -210,7 +210,7 @@ def set(name, data, **kwargs):
381 - args['value'] = 'true' if args['value'] else 'false'
382 -
383 - if current is not None and [key, args['type'], six.text_type(args['value'])] in current:
384 -- if ret['comment'] is '':
385 -+ if ret['comment'] == '':
386 - ret['comment'] = 'Unchanged answers: '
387 - ret['comment'] += ('{0} ').format(key)
388 - else:
389 -diff --git a/salt/states/git.py b/salt/states/git.py
390 -index ce6455ee71..f2bf4da629 100644
391 ---- a/salt/states/git.py
392 -+++ b/salt/states/git.py
393 -@@ -2464,7 +2464,7 @@ def detached(name,
394 - password,
395 - output_encoding=output_encoding)[0]
396 -
397 -- if remote_rev_type is 'hash':
398 -+ if remote_rev_type == 'hash':
399 - try:
400 - __salt__['git.describe'](target,
401 - rev,
402 -@@ -2643,7 +2643,7 @@ def detached(name,
403 -
404 - # get refs and checkout
405 - checkout_commit_id = ''
406 -- if remote_rev_type is 'hash':
407 -+ if remote_rev_type == 'hash':
408 - if __salt__['git.describe'](
409 - target,
410 - rev,
411 -diff --git a/salt/states/mysql_grants.py b/salt/states/mysql_grants.py
412 -index d6023bbf86..638e988e13 100644
413 ---- a/salt/states/mysql_grants.py
414 -+++ b/salt/states/mysql_grants.py
415 -@@ -167,7 +167,7 @@ def present(name,
416 - db_part = database.rpartition('.')
417 - my_db = db_part[0]
418 - my_table = db_part[2]
419 -- my_db = __salt__['mysql.quote_identifier'](my_db, (my_table is '*'))
420 -+ my_db = __salt__['mysql.quote_identifier'](my_db, (my_table == '*'))
421 - my_table = __salt__['mysql.quote_identifier'](my_table)
422 - # Removing per table grants in case of database level grant !!!
423 - if token_grants['database'] == my_db:
424 -diff --git a/salt/utils/args.py b/salt/utils/args.py
425 -index 8cc0f35196..8caaae4d1f 100644
426 ---- a/salt/utils/args.py
427 -+++ b/salt/utils/args.py
428 -@@ -253,6 +253,9 @@ def get_function_argspec(func, is_class_method=None):
429 - if not callable(func):
430 - raise TypeError('{0} is not a callable'.format(func))
431 -
432 -+ if hasattr(func, "__wrapped__"):
433 -+ func = func.__wrapped__
434 -+
435 - if six.PY2:
436 - if is_class_method is True:
437 - aspec = inspect.getargspec(func)
438 -diff --git a/salt/utils/decorators/path.py b/salt/utils/decorators/path.py
439 -index 4adacf0e4e..37c692355f 100644
440 ---- a/salt/utils/decorators/path.py
441 -+++ b/salt/utils/decorators/path.py
442 -@@ -4,10 +4,11 @@ Decorators for salt.utils.path
443 - '''
444 - from __future__ import absolute_import, print_function, unicode_literals
445 -
446 -+import functools
447 -+
448 - # Import Salt libs
449 - import salt.utils.path
450 - from salt.exceptions import CommandNotFoundError
451 --from salt.utils.decorators.signature import identical_signature_wrapper
452 -
453 -
454 - def which(exe):
455 -@@ -15,13 +16,14 @@ def which(exe):
456 - Decorator wrapper for salt.utils.path.which
457 - '''
458 - def wrapper(function):
459 -+ @functools.wraps(function)
460 - def wrapped(*args, **kwargs):
461 - if salt.utils.path.which(exe) is None:
462 - raise CommandNotFoundError(
463 - 'The \'{0}\' binary was not found in $PATH.'.format(exe)
464 - )
465 - return function(*args, **kwargs)
466 -- return identical_signature_wrapper(function, wrapped)
467 -+ return wrapped
468 - return wrapper
469 -
470 -
471 -@@ -30,6 +32,7 @@ def which_bin(exes):
472 - Decorator wrapper for salt.utils.path.which_bin
473 - '''
474 - def wrapper(function):
475 -+ @functools.wraps(function)
476 - def wrapped(*args, **kwargs):
477 - if salt.utils.path.which_bin(exes) is None:
478 - raise CommandNotFoundError(
479 -@@ -39,5 +42,5 @@ def which_bin(exes):
480 - )
481 - )
482 - return function(*args, **kwargs)
483 -- return identical_signature_wrapper(function, wrapped)
484 -+ return wrapped
485 - return wrapper
486 -diff --git a/salt/utils/schedule.py b/salt/utils/schedule.py
487 -index 474af442a1..69204a53d4 100644
488 ---- a/salt/utils/schedule.py
489 -+++ b/salt/utils/schedule.py
490 -@@ -721,7 +721,7 @@ class Schedule(object):
491 - if argspec.keywords:
492 - # this function accepts **kwargs, pack in the publish data
493 - for key, val in six.iteritems(ret):
494 -- if key is not 'kwargs':
495 -+ if key != 'kwargs':
496 - kwargs['__pub_{0}'.format(key)] = copy.deepcopy(val)
497 -
498 - # Only include these when running runner modules
499 -diff --git a/salt/utils/win_pdh.py b/salt/utils/win_pdh.py
500 -index 9921ee72da..7e9e368caf 100644
501 ---- a/salt/utils/win_pdh.py
502 -+++ b/salt/utils/win_pdh.py
503 -@@ -164,7 +164,7 @@ class Counter(object):
504 - '''
505 - path = win32pdh.MakeCounterPath(
506 - (None, obj, instance, None, instance_index, counter), 0)
507 -- if win32pdh.ValidatePath(path) is 0:
508 -+ if win32pdh.ValidatePath(path) == 0:
509 - return Counter(path, obj, instance, instance_index, counter)
510 - raise CommandExecutionError('Invalid counter specified: {0}'.format(path))
511 -
512 -diff --git a/tests/integration/cloud/helpers/virtualbox.py b/tests/integration/cloud/helpers/virtualbox.py
513 -index 668f15d82f..a6bc9dd2c3 100644
514 ---- a/tests/integration/cloud/helpers/virtualbox.py
515 -+++ b/tests/integration/cloud/helpers/virtualbox.py
516 -@@ -74,7 +74,7 @@ class VirtualboxCloudTestCase(ShellCase):
517 - output.pop(0)
518 - else:
519 - break
520 -- if len(output) is 0:
521 -+ if len(output) == 0:
522 - return dict()
523 - else:
524 - return salt.utils.json.loads(''.join(output))
525 -diff --git a/tests/integration/modules/test_mysql.py b/tests/integration/modules/test_mysql.py
526 -index 7edb77cb94..197c4e65ae 100644
527 ---- a/tests/integration/modules/test_mysql.py
528 -+++ b/tests/integration/modules/test_mysql.py
529 -@@ -519,7 +519,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
530 - )
531 - expected = []
532 - for tablename, engine in sorted(six.iteritems(tablenames)):
533 -- if engine is 'MEMORY':
534 -+ if engine == 'MEMORY':
535 - expected.append([{
536 - 'Table': dbname+'.'+tablename,
537 - 'Msg_text': ("The storage engine for the table doesn't"
538 -@@ -544,7 +544,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
539 - )
540 - expected = []
541 - for tablename, engine in sorted(six.iteritems(tablenames)):
542 -- if engine is 'MYISAM':
543 -+ if engine == 'MYISAM':
544 - expected.append([{
545 - 'Table': dbname+'.'+tablename,
546 - 'Msg_text': 'OK',
547 -@@ -570,14 +570,14 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
548 -
549 - expected = []
550 - for tablename, engine in sorted(six.iteritems(tablenames)):
551 -- if engine is 'MYISAM':
552 -+ if engine == 'MYISAM':
553 - expected.append([{
554 - 'Table': dbname+'.'+tablename,
555 - 'Msg_text': 'OK',
556 - 'Msg_type': 'status',
557 - 'Op': 'optimize'
558 - }])
559 -- elif engine is 'InnoDB':
560 -+ elif engine == 'InnoDB':
561 - expected.append([{
562 - 'Table': dbname+'.'+tablename,
563 - 'Msg_text': ("Table does not support optimize, "
564 -@@ -591,7 +591,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
565 - 'Msg_type': 'status',
566 - 'Op': 'optimize'
567 - }])
568 -- elif engine is 'MEMORY':
569 -+ elif engine == 'MEMORY':
570 - expected.append([{
571 - 'Table': dbname+'.'+tablename,
572 - 'Msg_text': ("The storage engine for the table doesn't"
573 -diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py
574 -index 32f4302e5f..c49bd0bccc 100644
575 ---- a/tests/unit/modules/test_virt.py
576 -+++ b/tests/unit/modules/test_virt.py
577 -@@ -9,6 +9,7 @@ virt execution module unit tests
578 - from __future__ import absolute_import, print_function, unicode_literals
579 - import os
580 - import re
581 -+import sys
582 - import datetime
583 - import shutil
584 -
585 -@@ -1393,19 +1394,20 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
586 - self.assertEqual('vnc', setxml.find('devices/graphics').get('type'))
587 -
588 - # Update with no diff case
589 -- self.assertEqual({
590 -- 'definition': False,
591 -- 'disk': {'attached': [], 'detached': []},
592 -- 'interface': {'attached': [], 'detached': []}
593 -- }, virt.update('my vm', cpu=1, mem=1024,
594 -- disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
595 -- nic_profile='myprofile',
596 -- interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
597 -- 'mac': '52:54:00:39:02:b1'},
598 -- {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
599 -- 'mac': '52:54:00:39:02:b2'}],
600 -- graphics={'type': 'spice',
601 -- 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
602 -+ if sys.hexversion < 0x03080000:
603 -+ self.assertEqual({
604 -+ 'definition': False,
605 -+ 'disk': {'attached': [], 'detached': []},
606 -+ 'interface': {'attached': [], 'detached': []}
607 -+ }, virt.update('my vm', cpu=1, mem=1024,
608 -+ disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
609 -+ nic_profile='myprofile',
610 -+ interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
611 -+ 'mac': '52:54:00:39:02:b1'},
612 -+ {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
613 -+ 'mac': '52:54:00:39:02:b2'}],
614 -+ graphics={'type': 'spice',
615 -+ 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
616 -
617 - # Failed XML description update case
618 - self.mock_conn.defineXML.side_effect = self.mock_libvirt.libvirtError("Test error")
619
620 diff --git a/app-admin/salt/files/salt-3000.2-tornado-py38.patch b/app-admin/salt/files/salt-3000.2-tornado-py38.patch
621 deleted file mode 100644
622 index b324872c921..00000000000
623 --- a/app-admin/salt/files/salt-3000.2-tornado-py38.patch
624 +++ /dev/null
625 @@ -1,12 +0,0 @@
626 -diff -ur salt-3000.2.orig/salt/ext/tornado/httputil.py salt-3000.2/salt/ext/tornado/httputil.py
627 ---- salt-3000.2.orig/salt/ext/tornado/httputil.py 2020-04-29 11:29:20.000000000 -0700
628 -+++ salt-3000.2/salt/ext/tornado/httputil.py 2020-04-30 11:52:45.690890947 -0700
629 -@@ -104,7 +104,7 @@
630 - _normalized_headers = _NormalizedHeaderCache(1000)
631 -
632 -
633 --class HTTPHeaders(collections.MutableMapping):
634 -+class HTTPHeaders(collections.abc.MutableMapping):
635 - """A dictionary that maintains ``Http-Header-Case`` for all keys.
636 -
637 - Supports multiple values per key via a pair of new methods,
638
639 diff --git a/app-admin/salt/salt-3000.2-r3.ebuild b/app-admin/salt/salt-3000.2-r4.ebuild
640 similarity index 91%
641 rename from app-admin/salt/salt-3000.2-r3.ebuild
642 rename to app-admin/salt/salt-3000.2-r4.ebuild
643 index 5e7ab8e084a..2cb2a715e74 100644
644 --- a/app-admin/salt/salt-3000.2-r3.ebuild
645 +++ b/app-admin/salt/salt-3000.2-r4.ebuild
646 @@ -17,7 +17,8 @@ if [[ ${PV} == 9999* ]]; then
647 SRC_URI=""
648 KEYWORDS=""
649 else
650 - SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
651 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
652 + https://dev.gentoo.org/~chutzpah/dist/salt/salt-3000.2-py38-misc.patch.gz"
653 KEYWORDS="~amd64 ~x86"
654 fi
655
656 @@ -107,11 +108,12 @@ PATCHES=(
657 # https://github.com/saltstack/salt/pull/55410
658 "${FILESDIR}/salt-3000.2-py38.patch"
659
660 - "${FILESDIR}/salt-3000.2-py38-misc.patch"
661 -
662 # https://github.com/saltstack/salt/pull/55900
663 "${FILESDIR}/salt-3000.2-py38-abc.patch"
664 - "${FILESDIR}/salt-3000.2-tornado-py38.patch"
665 +
666 + # misc py38 fixups
667 + "${WORKDIR}/salt-3000.2-py38-misc.patch"
668 + "${FILESDIR}/salt-3000.2-py38-logwarn.patch"
669 )
670
671 python_prepare() {
672 @@ -126,6 +128,11 @@ python_prepare() {
673 # make sure pkg_resources doesn't bomb because pycrypto isn't installed
674 find . -name '*.txt' -print0 | xargs -0 sed -e '/pycrypto>/ d' -i || die
675
676 + einfo "Fixing collections.abc warnings for ${EPYTHON}"
677 + local abc
678 + abc="$("${EPYTHON}" -c 'import collections.abc; print("|".join((c for c in dir(collections.abc) if not c.startswith("_"))))')" || die
679 + find -name '*.py' -type f -print0 | xargs -0 sed -r -e "s:collections\\.(${abc}):collections.abc.\\1:g" -i || die
680 +
681 # allow the use of the renamed msgpack
682 sed -i '/^msgpack/d' requirements/base.txt || die
683 }