From: whitequark Date: Sat, 26 Jan 2019 15:26:54 +0000 (+0000) Subject: compat.sim: fix deprecated stdlib import. X-Git-Tag: working~44 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4887771e4a67dcd766736ec8c00b04ffb5d5ca92;p=nmigen.git compat.sim: fix deprecated stdlib import. --- 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: