From 1956d351d91bd8917d1ba689e74436ff7174c52f Mon Sep 17 00:00:00 2001 From: mpariente Date: Wed, 19 Aug 2020 21:05:02 +0200 Subject: [PATCH] [src] Fix python3.8 warning about collection.abs + v0.3.1rc1 and v0.3.1rc0 --- asteroid/__init__.py | 2 +- asteroid/utils/generic_utils.py | 6 +++--- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/asteroid/__init__.py b/asteroid/__init__.py index a811ee1d0..9b382d5f0 100644 --- a/asteroid/__init__.py +++ b/asteroid/__init__.py @@ -3,7 +3,7 @@ from .models import ConvTasNet, DPRNNTasNet, DPTNet, LSTMTasNet project_root = str(pathlib.Path(__file__).expanduser().absolute().parent.parent) -__version__ = "0.3.0" +__version__ = "0.3.1rc1" def show_available_models(): diff --git a/asteroid/utils/generic_utils.py b/asteroid/utils/generic_utils.py index 4886c9069..230f5bad7 100644 --- a/asteroid/utils/generic_utils.py +++ b/asteroid/utils/generic_utils.py @@ -1,5 +1,5 @@ import inspect -import collections +from collections.abc import MutableMapping import numpy as np @@ -30,7 +30,7 @@ def flatten_dict(d, parent_key="", sep="_"): flatten-nested-dictionaries-compressing-keys?answertab=votes#tab-top Args: - d (collections.MutableMapping): Dictionary to be flattened. + d (MutableMapping): Dictionary to be flattened. parent_key (str): String to use as a prefix to all subsequent keys. sep (str): String to use as a separator between two key levels. @@ -40,7 +40,7 @@ def flatten_dict(d, parent_key="", sep="_"): items = [] for k, v in d.items(): new_key = parent_key + sep + k if parent_key else k - if isinstance(v, collections.MutableMapping): + if isinstance(v, MutableMapping): items.extend(flatten_dict(v, new_key, sep=sep).items()) else: items.append((new_key, v)) diff --git a/setup.py b/setup.py index e39968a0c..c5e9714f6 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -asteroid_version = "0.3.0" +asteroid_version = "0.3.1rc1" with open("README.md", encoding="utf-8") as fh: long_description = fh.read()