UCSBarchlab / PyRTL

A collection of classes providing simple hardware specification, simulation, tracing, and testing suitable for teaching and research. Simplicity, usability, clarity, and extensibility are the overarching goals, rather than performance or optimization.
http://ucsbarchlab.github.io/PyRTL
BSD 3-Clause "New" or "Revised" License
253 stars 76 forks source link

Import `collections.abc.Mapping` #410

Closed corwin-of-amber closed 2 years ago

corwin-of-amber commented 2 years ago

To support newer Pythons (>= 3.9), this line: https://github.com/UCSBarchlab/PyRTL/blob/5de365219705cdc1116f3d7efe938f49e888d449/pyrtl/simulation.py#L1031

Should use collections.abc.Mapping instead of collections.Mapping.

If you need to support both Python 2.x and Python 3.x, you can use one of the methods proposed here: https://stackoverflow.com/questions/53978542/how-to-use-collections-abc-from-both-python-3-8-and-python-2-7

corwin-of-amber commented 2 years ago

Thanks 🚀 🎸

bjourne commented 2 years ago

Think you can release a new pypi package with this fix?