compat.sim: fix deprecated stdlib import.
authorwhitequark <whitequark@whitequark.org>
Sat, 26 Jan 2019 15:26:54 +0000 (15:26 +0000)
committerwhitequark <whitequark@whitequark.org>
Sat, 26 Jan 2019 15:26:54 +0000 (15:26 +0000)
nmigen/compat/sim/__init__.py

index 9ee7d91a6d48f215f793a6657cc739330c529d50..009492f3631b87ec4bc058a2b9abde86cf7aaaf2 100644 (file)
@@ -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: