From 4887771e4a67dcd766736ec8c00b04ffb5d5ca92 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 26 Jan 2019 15:26:54 +0000 Subject: [PATCH] compat.sim: fix deprecated stdlib import. --- nmigen/compat/sim/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nmigen/compat/sim/__init__.py b/nmigen/compat/sim/__init__.py index 9ee7d91..009492f 100644 --- a/nmigen/compat/sim/__init__.py +++ b/nmigen/compat/sim/__init__.py @@ -1,6 +1,6 @@ import functools -import collections import inspect +from collections.abc import Iterable from ...back.pysim import * @@ -23,7 +23,7 @@ def run_simulation(fragment_or_module, generators, clocks={"sync": 10}, vcd_name for domain, period in clocks.items(): sim.add_clock(period / 1e9, domain=domain) for domain, processes in generators.items(): - if isinstance(processes, collections.Iterable) and not inspect.isgenerator(processes): + if isinstance(processes, Iterable) and not inspect.isgenerator(processes): for process in processes: sim.add_sync_process(process, domain=domain) else: -- 2.30.2