From 9b239f41455805e4057f0779d562901a63ff7865 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