summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2020-04-29 19:11:32 -0700
committerPatrick McLean <chutzpah@gentoo.org>2020-04-29 22:24:06 -0700
commit912520578b89e0d26c486784807c25e13f74d55f (patch)
treeec452162513c0a4f90649a9b34e5543d37bcf535 /app-admin/salt/files
parentnet-libs/nodejs: Version 13.14.0 (diff)
downloadgentoo-912520578b89e0d26c486784807c25e13f74d55f.tar.gz
gentoo-912520578b89e0d26c486784807c25e13f74d55f.tar.bz2
gentoo-912520578b89e0d26c486784807c25e13f74d55f.zip
app-admin/salt-3000.2-r2: revbump, add py38
Closes: https://bugs.gentoo.org/718188 Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-admin/salt/files')
-rw-r--r--app-admin/salt/files/salt-3000.2-py38-abc.patch79
-rw-r--r--app-admin/salt/files/salt-3000.2-py38-misc.patch460
-rw-r--r--app-admin/salt/files/salt-3000.2-py38.patch60
3 files changed, 599 insertions, 0 deletions
diff --git a/app-admin/salt/files/salt-3000.2-py38-abc.patch b/app-admin/salt/files/salt-3000.2-py38-abc.patch
new file mode 100644
index 000000000000..e9f64b664178
--- /dev/null
+++ b/app-admin/salt/files/salt-3000.2-py38-abc.patch
@@ -0,0 +1,79 @@
+From 11c23a526ae926ca082ee7ad92246e085c51b8e6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=A9bastien=20Blaisot?= <sebastien@blaisot.org>
+Date: Fri, 17 Jan 2020 17:06:42 +0100
+Subject: [PATCH] Import abstract base classes from collection.abc in python
+ 3.3+
+
+---
+ salt/modules/file.py | 6 +++++-
+ salt/modules/win_file.py | 5 ++++-
+ salt/states/file.py | 6 +++++-
+ salt/utils/dictdiffer.py | 5 ++++-
+ 4 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/salt/modules/file.py b/salt/modules/file.py
+index 771b204d63fe..d1ec5e4c295d 100644
+--- a/salt/modules/file.py
++++ b/salt/modules/file.py
+@@ -29,7 +29,11 @@
+ import glob
+ import hashlib
+ import mmap
+-from collections import Iterable, Mapping, namedtuple
++try:
++ from collections.abc import Iterable, Mapping
++except ImportError:
++ from collections import Iterable, Mapping
++from collections import namedtuple
+ from functools import reduce # pylint: disable=redefined-builtin
+
+ # pylint: disable=import-error,no-name-in-module,redefined-builtin
+diff --git a/salt/modules/win_file.py b/salt/modules/win_file.py
+index 4fd3eebcdd81..5bc983786a98 100644
+--- a/salt/modules/win_file.py
++++ b/salt/modules/win_file.py
+@@ -17,7 +17,10 @@
+ import logging
+ # pylint: disable=W0611
+ import operator # do not remove
+-from collections import Iterable, Mapping # do not remove
++try:
++ from collections.abc import Iterable, Mapping # do not remove
++except ImportError:
++ from collections import Iterable, Mapping # do not remove
+ from functools import reduce # do not remove
+ import datetime # do not remove.
+ import tempfile # do not remove. Used in salt.modules.file.__clean_tmp
+diff --git a/salt/states/file.py b/salt/states/file.py
+index 23c3d3c53955..36231c69cff6 100644
+--- a/salt/states/file.py
++++ b/salt/states/file.py
+@@ -291,7 +291,11 @@ def run():
+ import sys
+ import time
+ import traceback
+-from collections import Iterable, Mapping, defaultdict
++try:
++ from collections.abc import Iterable, Mapping
++except ImportError:
++ from collections import Iterable, Mapping
++from collections import defaultdict
+ from datetime import datetime, date # python3 problem in the making?
+
+ # Import salt libs
+diff --git a/salt/utils/dictdiffer.py b/salt/utils/dictdiffer.py
+index 30e87e885436..da6bd5ed944c 100644
+--- a/salt/utils/dictdiffer.py
++++ b/salt/utils/dictdiffer.py
+@@ -13,7 +13,10 @@
+ '''
+ from __future__ import absolute_import, print_function, unicode_literals
+ import copy
+-from collections import Mapping
++try:
++ from collections.abc import Mapping
++except ImportError:
++ from collections import Mapping
+ from salt.ext import six
+
+
diff --git a/app-admin/salt/files/salt-3000.2-py38-misc.patch b/app-admin/salt/files/salt-3000.2-py38-misc.patch
new file mode 100644
index 000000000000..93cc045a5310
--- /dev/null
+++ b/app-admin/salt/files/salt-3000.2-py38-misc.patch
@@ -0,0 +1,460 @@
+diff --git a/salt/config/__init__.py b/salt/config/__init__.py
+index 70b34ec949..4304d99bf7 100644
+--- a/salt/config/__init__.py
++++ b/salt/config/__init__.py
+@@ -8,6 +8,7 @@ from __future__ import absolute_import, print_function, unicode_literals, genera
+ import os
+ import re
+ import sys
++import copy
+ import glob
+ import time
+ import codecs
+@@ -3191,7 +3192,7 @@ def apply_cloud_providers_config(overrides, defaults=None):
+ # Merge provided extends
+ keep_looping = False
+ for alias, entries in six.iteritems(providers.copy()):
+- for driver, details in six.iteritems(entries):
++ for driver, details in copy.copy(entries).items():
+
+ if 'extends' not in details:
+ # Extends resolved or non existing, continue!
+diff --git a/salt/grains/core.py b/salt/grains/core.py
+index 9b244def9c..ede3a94de9 100644
+--- a/salt/grains/core.py
++++ b/salt/grains/core.py
+@@ -1939,7 +1939,7 @@ def os_data():
+ )
+ (osname, osrelease, oscodename) = \
+ [x.strip('"').strip("'") for x in
+- linux_distribution(supported_dists=_supported_dists)]
++ linux_distribution()]
+ # Try to assign these three names based on the lsb info, they tend to
+ # be more accurate than what python gets from /etc/DISTRO-release.
+ # It's worth noting that Ubuntu has patched their Python distribution
+diff --git a/salt/modules/boto_route53.py b/salt/modules/boto_route53.py
+index a663ec7207..8d3d8c2105 100644
+--- a/salt/modules/boto_route53.py
++++ b/salt/modules/boto_route53.py
+@@ -158,7 +158,7 @@ def describe_hosted_zones(zone_id=None, domain_name=None, region=None,
+ else:
+ marker = None
+ ret = None
+- while marker is not '':
++ while marker != '':
+ r = conn.get_all_hosted_zones(start_marker=marker,
+ zone_list=ret)
+ ret = r['ListHostedZonesResponse']['HostedZones']
+diff --git a/salt/modules/file.py b/salt/modules/file.py
+index b5b70e2d4c..41a9229eb4 100644
+--- a/salt/modules/file.py
++++ b/salt/modules/file.py
+@@ -2744,7 +2744,7 @@ def blockreplace(path,
+
+ if block_found:
+ diff = __utils__['stringutils.get_diff'](orig_file, new_file)
+- has_changes = diff is not ''
++ has_changes = diff != ''
+ if has_changes and not dry_run:
+ # changes detected
+ # backup file attrs
+diff --git a/salt/modules/iptables.py b/salt/modules/iptables.py
+index e232c6931f..9708f45256 100644
+--- a/salt/modules/iptables.py
++++ b/salt/modules/iptables.py
+@@ -905,7 +905,7 @@ def insert(table='filter', chain=None, position=None, rule=None, family='ipv4'):
+ rules = get_rules(family=family)
+ size = len(rules[table][chain]['rules'])
+ position = (size + position) + 1
+- if position is 0:
++ if position == 0:
+ position = 1
+
+ wait = '--wait' if _has_option('--wait', family) else ''
+@@ -1040,7 +1040,7 @@ def _parse_conf(conf_file=None, in_mem=False, family='ipv4'):
+ ret_args = {}
+ chain = parsed_args['append']
+ for arg in parsed_args:
+- if parsed_args[arg] and arg is not 'append':
++ if parsed_args[arg] and arg != 'append':
+ ret_args[arg] = parsed_args[arg]
+ if parsed_args['comment'] is not None:
+ comment = parsed_args['comment'][0].strip('"')
+diff --git a/salt/modules/lxd.py b/salt/modules/lxd.py
+index d6c2d8d4b9..d617cbb3df 100644
+--- a/salt/modules/lxd.py
++++ b/salt/modules/lxd.py
+@@ -1824,11 +1824,11 @@ def container_file_get(name, src, dst, overwrite=False,
+
+ if mode:
+ os.chmod(dst, mode)
+- if uid or uid is '0':
++ if uid or uid == '0':
+ uid = int(uid)
+ else:
+ uid = -1
+- if gid or gid is '0':
++ if gid or gid == '0':
+ gid = int(gid)
+ else:
+ gid = -1
+diff --git a/salt/modules/mongodb.py b/salt/modules/mongodb.py
+index 8cdb819102..ed3228150e 100644
+--- a/salt/modules/mongodb.py
++++ b/salt/modules/mongodb.py
+@@ -484,7 +484,7 @@ def update_one(objects, collection, user=None, password=None, host=None, port=No
+ objects = six.text_type(objects)
+ objs = re.split(r'}\s+{', objects)
+
+- if len(objs) is not 2:
++ if len(objs) != 2:
+ return "Your request does not contain a valid " + \
+ "'{_\"id\": \"my_id\"} {\"my_doc\": \"my_val\"}'"
+
+diff --git a/salt/modules/virt.py b/salt/modules/virt.py
+index a2412bb745..91e105fe04 100644
+--- a/salt/modules/virt.py
++++ b/salt/modules/virt.py
+@@ -4732,7 +4732,7 @@ def _parse_pools_caps(doc):
+ if options:
+ if 'options' not in pool_caps:
+ pool_caps['options'] = {}
+- kind = option_kind if option_kind is not 'vol' else 'volume'
++ kind = option_kind if option_kind != 'vol' else 'volume'
+ pool_caps['options'][kind] = options
+ return pool_caps
+
+diff --git a/salt/modules/win_ip.py b/salt/modules/win_ip.py
+index e69f44211e..99b9d392f6 100644
+--- a/salt/modules/win_ip.py
++++ b/salt/modules/win_ip.py
+@@ -342,7 +342,7 @@ def set_static_dns(iface, *addrs):
+ salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.1'
+ salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.252' '192.168.1.253'
+ '''
+- if addrs is () or str(addrs[0]).lower() == 'none':
++ if addrs == () or str(addrs[0]).lower() == 'none':
+ return {'Interface': iface, 'DNS Server': 'No Changes'}
+ # Clear the list of DNS servers if [] is passed
+ if str(addrs[0]).lower() == '[]':
+diff --git a/salt/modules/win_lgpo.py b/salt/modules/win_lgpo.py
+index efa154889f..50f0c9940f 100644
+--- a/salt/modules/win_lgpo.py
++++ b/salt/modules/win_lgpo.py
+@@ -4692,7 +4692,7 @@ class _policy_info(object):
+ return 'true'
+ elif val.upper() == 'Run Windows PowerShell scripts last'.upper():
+ return 'false'
+- elif val is 'Not Configured':
++ elif val == 'Not Configured':
+ return None
+ else:
+ return 'Invalid Value'
+diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py
+index 74fa61bc51..42f0c2ca6e 100644
+--- a/salt/modules/win_system.py
++++ b/salt/modules/win_system.py
+@@ -1149,7 +1149,7 @@ def set_system_date_time(years=None,
+ system_time.wSecond = int(seconds)
+ system_time_ptr = ctypes.pointer(system_time)
+ succeeded = ctypes.windll.kernel32.SetLocalTime(system_time_ptr)
+- if succeeded is not 0:
++ if succeeded != 0:
+ return True
+ else:
+ log.error('Failed to set local time')
+diff --git a/salt/modules/x509.py b/salt/modules/x509.py
+index 1cdd912bfb..4069076c32 100644
+--- a/salt/modules/x509.py
++++ b/salt/modules/x509.py
+@@ -131,7 +131,7 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1):
+ to create the authoritykeyidentifier extension.
+ '''
+ if name == 'subjectKeyIdentifier' and \
+- value.strip('0123456789abcdefABCDEF:') is not '':
++ value.strip('0123456789abcdefABCDEF:') != '':
+ raise salt.exceptions.SaltInvocationError(
+ 'value must be precomputed hash')
+
+diff --git a/salt/output/highstate.py b/salt/output/highstate.py
+index 1f2f9452fa..87be7656fe 100644
+--- a/salt/output/highstate.py
++++ b/salt/output/highstate.py
+@@ -209,7 +209,7 @@ def _format_host(host, data, indent_level=1):
+ # Verify that the needed data is present
+ data_tmp = {}
+ for tname, info in six.iteritems(data):
+- if isinstance(info, dict) and tname is not 'changes' and info and '__run_num__' not in info:
++ if isinstance(info, dict) and tname != 'changes' and info and '__run_num__' not in info:
+ err = ('The State execution failed to record the order '
+ 'in which all states were executed. The state '
+ 'return missing data is:')
+diff --git a/salt/renderers/stateconf.py b/salt/renderers/stateconf.py
+index cfce9e6926..1b116ddfb1 100644
+--- a/salt/renderers/stateconf.py
++++ b/salt/renderers/stateconf.py
+@@ -224,7 +224,7 @@ def render(input, saltenv='base', sls='', argline='', **kws):
+ tmplctx = STATE_CONF.copy()
+ if tmplctx:
+ prefix = sls + '::'
+- for k in six.iterkeys(tmplctx): # iterate over a copy of keys
++ for k in copy.copy(tmplctx).keys(): # iterate over a copy of keys
+ if k.startswith(prefix):
+ tmplctx[k[len(prefix):]] = tmplctx[k]
+ del tmplctx[k]
+diff --git a/salt/returners/slack_webhook_return.py b/salt/returners/slack_webhook_return.py
+index aad1cdf656..0db705df01 100644
+--- a/salt/returners/slack_webhook_return.py
++++ b/salt/returners/slack_webhook_return.py
+@@ -322,7 +322,7 @@ def returner(ret):
+ show_tasks = _options.get('show_tasks')
+ author_icon = _options.get('author_icon')
+
+- if not webhook or webhook is '':
++ if not webhook or webhook == '':
+ log.error('%s.webhook not defined in salt config', __virtualname__)
+ return
+
+diff --git a/salt/states/debconfmod.py b/salt/states/debconfmod.py
+index a0ef20b185..a7478c7ac0 100644
+--- a/salt/states/debconfmod.py
++++ b/salt/states/debconfmod.py
+@@ -210,7 +210,7 @@ def set(name, data, **kwargs):
+ args['value'] = 'true' if args['value'] else 'false'
+
+ if current is not None and [key, args['type'], six.text_type(args['value'])] in current:
+- if ret['comment'] is '':
++ if ret['comment'] == '':
+ ret['comment'] = 'Unchanged answers: '
+ ret['comment'] += ('{0} ').format(key)
+ else:
+diff --git a/salt/states/git.py b/salt/states/git.py
+index ce6455ee71..f2bf4da629 100644
+--- a/salt/states/git.py
++++ b/salt/states/git.py
+@@ -2464,7 +2464,7 @@ def detached(name,
+ password,
+ output_encoding=output_encoding)[0]
+
+- if remote_rev_type is 'hash':
++ if remote_rev_type == 'hash':
+ try:
+ __salt__['git.describe'](target,
+ rev,
+@@ -2643,7 +2643,7 @@ def detached(name,
+
+ # get refs and checkout
+ checkout_commit_id = ''
+- if remote_rev_type is 'hash':
++ if remote_rev_type == 'hash':
+ if __salt__['git.describe'](
+ target,
+ rev,
+diff --git a/salt/states/mysql_grants.py b/salt/states/mysql_grants.py
+index d6023bbf86..638e988e13 100644
+--- a/salt/states/mysql_grants.py
++++ b/salt/states/mysql_grants.py
+@@ -167,7 +167,7 @@ def present(name,
+ db_part = database.rpartition('.')
+ my_db = db_part[0]
+ my_table = db_part[2]
+- my_db = __salt__['mysql.quote_identifier'](my_db, (my_table is '*'))
++ my_db = __salt__['mysql.quote_identifier'](my_db, (my_table == '*'))
+ my_table = __salt__['mysql.quote_identifier'](my_table)
+ # Removing per table grants in case of database level grant !!!
+ if token_grants['database'] == my_db:
+diff --git a/salt/utils/args.py b/salt/utils/args.py
+index 8cc0f35196..8caaae4d1f 100644
+--- a/salt/utils/args.py
++++ b/salt/utils/args.py
+@@ -253,6 +253,9 @@ def get_function_argspec(func, is_class_method=None):
+ if not callable(func):
+ raise TypeError('{0} is not a callable'.format(func))
+
++ if hasattr(func, "__wrapped__"):
++ func = func.__wrapped__
++
+ if six.PY2:
+ if is_class_method is True:
+ aspec = inspect.getargspec(func)
+diff --git a/salt/utils/decorators/path.py b/salt/utils/decorators/path.py
+index 4adacf0e4e..37c692355f 100644
+--- a/salt/utils/decorators/path.py
++++ b/salt/utils/decorators/path.py
+@@ -4,10 +4,11 @@ Decorators for salt.utils.path
+ '''
+ from __future__ import absolute_import, print_function, unicode_literals
+
++import functools
++
+ # Import Salt libs
+ import salt.utils.path
+ from salt.exceptions import CommandNotFoundError
+-from salt.utils.decorators.signature import identical_signature_wrapper
+
+
+ def which(exe):
+@@ -15,13 +16,14 @@ def which(exe):
+ Decorator wrapper for salt.utils.path.which
+ '''
+ def wrapper(function):
++ @functools.wraps(function)
+ def wrapped(*args, **kwargs):
+ if salt.utils.path.which(exe) is None:
+ raise CommandNotFoundError(
+ 'The \'{0}\' binary was not found in $PATH.'.format(exe)
+ )
+ return function(*args, **kwargs)
+- return identical_signature_wrapper(function, wrapped)
++ return wrapped
+ return wrapper
+
+
+@@ -30,6 +32,7 @@ def which_bin(exes):
+ Decorator wrapper for salt.utils.path.which_bin
+ '''
+ def wrapper(function):
++ @functools.wraps(function)
+ def wrapped(*args, **kwargs):
+ if salt.utils.path.which_bin(exes) is None:
+ raise CommandNotFoundError(
+@@ -39,5 +42,5 @@ def which_bin(exes):
+ )
+ )
+ return function(*args, **kwargs)
+- return identical_signature_wrapper(function, wrapped)
++ return wrapped
+ return wrapper
+diff --git a/salt/utils/schedule.py b/salt/utils/schedule.py
+index 474af442a1..69204a53d4 100644
+--- a/salt/utils/schedule.py
++++ b/salt/utils/schedule.py
+@@ -721,7 +721,7 @@ class Schedule(object):
+ if argspec.keywords:
+ # this function accepts **kwargs, pack in the publish data
+ for key, val in six.iteritems(ret):
+- if key is not 'kwargs':
++ if key != 'kwargs':
+ kwargs['__pub_{0}'.format(key)] = copy.deepcopy(val)
+
+ # Only include these when running runner modules
+diff --git a/salt/utils/win_pdh.py b/salt/utils/win_pdh.py
+index 9921ee72da..7e9e368caf 100644
+--- a/salt/utils/win_pdh.py
++++ b/salt/utils/win_pdh.py
+@@ -164,7 +164,7 @@ class Counter(object):
+ '''
+ path = win32pdh.MakeCounterPath(
+ (None, obj, instance, None, instance_index, counter), 0)
+- if win32pdh.ValidatePath(path) is 0:
++ if win32pdh.ValidatePath(path) == 0:
+ return Counter(path, obj, instance, instance_index, counter)
+ raise CommandExecutionError('Invalid counter specified: {0}'.format(path))
+
+diff --git a/tests/integration/cloud/helpers/virtualbox.py b/tests/integration/cloud/helpers/virtualbox.py
+index 668f15d82f..a6bc9dd2c3 100644
+--- a/tests/integration/cloud/helpers/virtualbox.py
++++ b/tests/integration/cloud/helpers/virtualbox.py
+@@ -74,7 +74,7 @@ class VirtualboxCloudTestCase(ShellCase):
+ output.pop(0)
+ else:
+ break
+- if len(output) is 0:
++ if len(output) == 0:
+ return dict()
+ else:
+ return salt.utils.json.loads(''.join(output))
+diff --git a/tests/integration/modules/test_mysql.py b/tests/integration/modules/test_mysql.py
+index 7edb77cb94..197c4e65ae 100644
+--- a/tests/integration/modules/test_mysql.py
++++ b/tests/integration/modules/test_mysql.py
+@@ -519,7 +519,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
+ )
+ expected = []
+ for tablename, engine in sorted(six.iteritems(tablenames)):
+- if engine is 'MEMORY':
++ if engine == 'MEMORY':
+ expected.append([{
+ 'Table': dbname+'.'+tablename,
+ 'Msg_text': ("The storage engine for the table doesn't"
+@@ -544,7 +544,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
+ )
+ expected = []
+ for tablename, engine in sorted(six.iteritems(tablenames)):
+- if engine is 'MYISAM':
++ if engine == 'MYISAM':
+ expected.append([{
+ 'Table': dbname+'.'+tablename,
+ 'Msg_text': 'OK',
+@@ -570,14 +570,14 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
+
+ expected = []
+ for tablename, engine in sorted(six.iteritems(tablenames)):
+- if engine is 'MYISAM':
++ if engine == 'MYISAM':
+ expected.append([{
+ 'Table': dbname+'.'+tablename,
+ 'Msg_text': 'OK',
+ 'Msg_type': 'status',
+ 'Op': 'optimize'
+ }])
+- elif engine is 'InnoDB':
++ elif engine == 'InnoDB':
+ expected.append([{
+ 'Table': dbname+'.'+tablename,
+ 'Msg_text': ("Table does not support optimize, "
+@@ -591,7 +591,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
+ 'Msg_type': 'status',
+ 'Op': 'optimize'
+ }])
+- elif engine is 'MEMORY':
++ elif engine == 'MEMORY':
+ expected.append([{
+ 'Table': dbname+'.'+tablename,
+ 'Msg_text': ("The storage engine for the table doesn't"
+diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py
+index 32f4302e5f..c49bd0bccc 100644
+--- a/tests/unit/modules/test_virt.py
++++ b/tests/unit/modules/test_virt.py
+@@ -9,6 +9,7 @@ virt execution module unit tests
+ from __future__ import absolute_import, print_function, unicode_literals
+ import os
+ import re
++import sys
+ import datetime
+ import shutil
+
+@@ -1393,19 +1394,20 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
+ self.assertEqual('vnc', setxml.find('devices/graphics').get('type'))
+
+ # Update with no diff case
+- self.assertEqual({
+- 'definition': False,
+- 'disk': {'attached': [], 'detached': []},
+- 'interface': {'attached': [], 'detached': []}
+- }, virt.update('my vm', cpu=1, mem=1024,
+- disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
+- nic_profile='myprofile',
+- interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
+- 'mac': '52:54:00:39:02:b1'},
+- {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
+- 'mac': '52:54:00:39:02:b2'}],
+- graphics={'type': 'spice',
+- 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
++ if sys.hexversion < 0x03080000:
++ self.assertEqual({
++ 'definition': False,
++ 'disk': {'attached': [], 'detached': []},
++ 'interface': {'attached': [], 'detached': []}
++ }, virt.update('my vm', cpu=1, mem=1024,
++ disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
++ nic_profile='myprofile',
++ interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
++ 'mac': '52:54:00:39:02:b1'},
++ {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
++ 'mac': '52:54:00:39:02:b2'}],
++ graphics={'type': 'spice',
++ 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
+
+ # Failed XML description update case
+ self.mock_conn.defineXML.side_effect = self.mock_libvirt.libvirtError("Test error")
diff --git a/app-admin/salt/files/salt-3000.2-py38.patch b/app-admin/salt/files/salt-3000.2-py38.patch
new file mode 100644
index 000000000000..1c543a085b10
--- /dev/null
+++ b/app-admin/salt/files/salt-3000.2-py38.patch
@@ -0,0 +1,60 @@
+From 5259ba8ef6e5949815641edc563deab67ba68582 Mon Sep 17 00:00:00 2001
+From: Mathias Fussenegger <f.mathias@zignar.net>
+Date: Fri, 22 Nov 2019 17:05:27 +0100
+Subject: [PATCH] Remove _supported_dists import for python-3.8 support
+
+`_supported_dists` has been removed from platform in Python 3.8:
+
+ https://github.com/python/cpython/commit/8b94b41ab7b12f745dea744e8940631318816935#diff-47c8e5750258a08a6dd9de3e9c3774acL267-L271
+
+This instead inlines all the values that have been there.
+
+Without this change running `salt-ssh` with Python 3.8 run into an
+import error.
+---
+ salt/grains/core.py | 31 +++++++++++++++++++++++++++----
+ 1 file changed, 27 insertions(+), 4 deletions(-)
+
+diff --git a/salt/grains/core.py b/salt/grains/core.py
+index 04c1ae91b5f5..77694abe84f9 100644
+--- a/salt/grains/core.py
++++ b/salt/grains/core.py
+@@ -35,11 +35,34 @@
+ __proxyenabled__ = ['*']
+ __FQDN__ = None
+
+-# Extend the default list of supported distros. This will be used for the
++# Default list of supported distros. This will be used for the
+ # /etc/DISTRO-release checking that is part of linux_distribution()
+-from platform import _supported_dists
+-_supported_dists += ('arch', 'mageia', 'meego', 'vmware', 'bluewhite64',
+- 'slamd64', 'ovs', 'system', 'mint', 'oracle', 'void')
++_supported_dists = (
++ 'SuSE',
++ 'UnitedLinux',
++ 'arch',
++ 'bluewhite64',
++ 'centos',
++ 'debian',
++ 'fedora',
++ 'gentoo',
++ 'mageia',
++ 'mandrake',
++ 'mandriva',
++ 'meego',
++ 'mint',
++ 'oracle',
++ 'ovs',
++ 'redhat',
++ 'rocks',
++ 'slackware',
++ 'slamd64',
++ 'system',
++ 'turbolinux',
++ 'vmware',
++ 'void',
++ 'yellowdog',
++)
+
+ # linux_distribution deprecated in py3.7
+ try: