dib0 / elro_connects

The ELRO Connects uses a propriety protocol on the local network over UDP. This is the reversed engineered python implementation of the protocol.
MIT License
16 stars 7 forks source link

Not compatible with python 3.10 #16

Open depuits opened 2 years ago

depuits commented 2 years ago

When running the code using python 3.10 you get the following error

AttributeError: module 'collections' has no attribute 'Sequence'
Traceback (most recent call last):
  File "/usr/local/bin/elro", line 7, in <module>
    from elro.hub import Hub
  File "/usr/local/lib/python3.10/site-packages/elro/hub.py", line 5, in <module>
    from valideer import accepts
  File "/usr/local/lib/python3.10/site-packages/valideer/__init__.py", line 2, in <module>
    from .validators import  *
  File "/usr/local/lib/python3.10/site-packages/valideer/validators.py", line 466, in <module>
    class HomogeneousSequence(Type):
  File "/usr/local/lib/python3.10/site-packages/valideer/validators.py", line 469, in HomogeneousSequence
    accept_types = collections.Sequence
AttributeError: module 'collections' has no attribute 'Sequence'
hildensia commented 2 years ago

I sent an upstream patch to the valideer team to fix their code base. https://github.com/podio/valideer/pull/28

depuits commented 2 years ago

It would seem that the valideer project is dead. The last update is from 2018 and merge requests don't seem to get merged. I'm guessing the only real solution will be to remove the project from the dependencies and replace the code. As far as I see it is only used for the validation of the input arguments. Couldn't that be replaced using some type checks and regex without the need of a third party library?

hildensia commented 2 years ago

Yes, I think that makes sense (although I really like their interface...). Anyone volunteering?