diff --git a/CHANGES.rst b/CHANGES.rst index 28e3fe5e2..42488a988 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -43,6 +43,7 @@ fixes: - fix: broken integration tests (#1668) - style: replace format() with f-strings (#1667) - migrate from external mock package to stdlib unittest.mock (#1673) +- fix: import of Mapping from collections.abc (#1675) v6.1.9 (2022-06-11) diff --git a/errbot/cli.py b/errbot/cli.py index 5f36f0330..61934501a 100755 --- a/errbot/cli.py +++ b/errbot/cli.py @@ -83,10 +83,10 @@ def get_config(config_path: str): def _read_dict() -> dict: - import collections + from collections.abc import Mapping new_dict = ast.literal_eval(sys.stdin.read()) - if not isinstance(new_dict, collections.Mapping): + if not isinstance(new_dict, Mapping): raise ValueError( f"A dictionary written in python is needed from stdin. " f"Type={type(new_dict)}, Value = {repr(new_dict)}."