From 127463a2c55198ffe9fb371a362a53a406c16f96 Mon Sep 17 00:00:00 2001 From: Max von Forell Date: Sun, 26 Dec 2021 15:40:05 +0100 Subject: [PATCH] Update more deprecated python imports. Signed-off-by: Max von Forell --- python/mach/mach/config.py | 4 ++-- python/mach/mach/decorators.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py index 7210eca8230..edb4d2e93b9 100644 --- a/python/mach/mach/config.py +++ b/python/mach/mach/config.py @@ -144,7 +144,7 @@ def reraise_attribute_error(func): return _ -class ConfigSettings(collections.Mapping): +class ConfigSettings(collections.abc.Mapping): """Interface for configuration settings. This is the main interface to the configuration. @@ -190,7 +190,7 @@ class ConfigSettings(collections.Mapping): will result in exceptions being raised. """ - class ConfigSection(collections.MutableMapping, object): + class ConfigSection(collections.abc.MutableMapping, object): """Represents an individual config section.""" def __init__(self, config, name, settings): object.__setattr__(self, '_config', config) diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py index f73af846d4b..15b8ca58387 100644 --- a/python/mach/mach/decorators.py +++ b/python/mach/mach/decorators.py @@ -152,7 +152,7 @@ def CommandProvider(cls): 'Conditions argument must take a list ' + \ 'of functions. Found %s instead.' - if not isinstance(command.conditions, collections.Iterable): + if not isinstance(command.conditions, collections.abc.Iterable): msg = msg % (command.name, type(command.conditions)) raise MachError(msg)