pycrc icon indicating copy to clipboard operation
pycrc copied to clipboard

broken on python 3.10 ?

Open fenugrec opened this issue 3 years ago • 2 comments

Traceback (most recent call last):
  File "/usr/bin/pycrc", line 26, in <module>
    from pycrc.main import main
  File "/usr/lib/python3.10/site-packages/pycrc/main.py", line 46, in <module>
    import pycrc.codegen as cg
  File "/usr/lib/python3.10/site-packages/pycrc/codegen.py", line 37, in <module>
    import pycrc.symtable
  File "/usr/lib/python3.10/site-packages/pycrc/symtable.py", line 49, in <module>
    class SymbolTable(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

Looks like collections.MutableMapping was deprecated at some point ?

fenugrec avatar May 10 '22 14:05 fenugrec

Possible fix (I don't actually know what I'm doing) : two lines to change,

from collections.abc import MutableMapping
.....
class SymbolTable(MutableMapping):

fenugrec avatar May 10 '22 14:05 fenugrec

Sorry for the late answer; I have been locked out from github, and had to create a new account. The fix should be in https://github.com/tpircher/pycrc

tpircher avatar Nov 04 '22 10:11 tpircher