Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.10 compatibility - Use of deprecated alias to Collections.abc.Sequence #171

Closed
delta1513 opened this issue Feb 17, 2023 · 1 comment

Comments

@delta1513
Copy link

Just stumbled upon this project and decided to take it for a little spin when I found that I was getting this error when trying out the truth tables tutorial:

>>> X = exprvars('x', 3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mark/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 201, in exprvars
    return _vars(Expression, name, *dims)
  File "/home/mark/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 976, in _vars
    return farray(objs, shape, ftype)
  File "/home/mark/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 430, in __init__
    self._items, autoshape, autoftype = _itemize(objs)
  File "/home/mark/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 1032, in _itemize
    if not isinstance(objs, collections.Sequence):
AttributeError: module 'collections' has no attribute 'Sequence'

Looks like an easy fix, might even make a fork and PR myself but going from Python 3.9 to 3.10, the aliases to Collections.abc.* have been removed from Collections.* as shown here and in the docs.

Feel free to assign me to this issue and I'll have a PR made soon.

@delta1513
Copy link
Author

I just realised that this was already in a PR ( #167 ) so it looks like it was the fact that the PyPi package was not updated (?)

I'll build manually and close this issue if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant