brendan-w / python-OBD

OBD-II serial module for reading engine data
GNU General Public License v2.0
1.02k stars 360 forks source link

Python 3.9+ support #239

Closed nyukhalov closed 2 years ago

nyukhalov commented 2 years ago

python-OBD does not work with python 3.9+ because the old pint version uses deprecated collections API:

ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

The issue was fixed in a newer pint. This change, however, sets the minimum supported python version to 3.8, according to pint's README.

alistair23 commented 2 years ago

Doesn't this mean it won't work on Python versions below 3.9? We are still testing versions below that in the CI

nyukhalov commented 2 years ago

Hi @alistair23, pint's README says it runs on python 3.8+. Would you be able to run the CI pipeline on this branch to check if it works?

alistair23 commented 2 years ago

If we are dropping older versions of Python then we should drop them from the CI and make it obvious in the README.

It looks like the CI has been turned off on the Travis side as well. We aren't able to run it. Maybe now is a good time to transition to GitHub actions instead

nyukhalov commented 2 years ago

Makes sense. Is there anything I can help you with to get it done?

nyukhalov commented 2 years ago

Alternatively, I could try to find a pint's version that contains a fix for the issue, but did't drop support for older python versions. Having a proper build matrix on CI would help a lot with testing such a change.

alistair23 commented 2 years ago

It would be great if you could write the GitHub CI! :)

I think using a earlier version of pint with more versions supported would also be great

nyukhalov commented 2 years ago

Sure, added a definition of a CI pipeline using Github Actions: https://github.com/brendan-w/python-OBD/pull/240

pcakhilnadh commented 2 years ago

Does it support py 3.10.x ?

nyukhalov commented 2 years ago

Hey @pcakhilnadh , with this change it does!