Skip to content

Commit

Permalink
Auto merge of #28651 - mvforell:master, r=jdm
Browse files Browse the repository at this point in the history
Update more deprecated python imports.

`mach` still uses some deprecated imports that were removed in Python 3.10, and currently fails when using Python 3.10.

This is in the same line as #28649.
  • Loading branch information
bors-servo committed Dec 26, 2021
2 parents 38b853b + 127463a commit 0865db3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/mach/mach/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _(*args, **kwargs):
return _


class ConfigSettings(collections.Mapping):
class ConfigSettings(collections.abc.Mapping):
"""Interface for configuration settings.
This is the main interface to the configuration.
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/mach/mach/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 0865db3

Please sign in to comment.