ni / nixnet-python

NI-XNET Python API
https://nixnet.readthedocs.io/en/latest/
MIT License
25 stars 22 forks source link

Support for python 3.10 #290

Open zf-pawel opened 2 years ago

zf-pawel commented 2 years ago

Hi, I have noticed that there were some commits that solved problems with python 3.10, are there any plans to make release with python 3.10 support?

It is the only package that stops us from migration to 3.10, I would be thankful for any ETA.

daista commented 1 year ago

Hi,

We are also interested in Python 3.10 support. All of our development was under 3.10 so far, but just because of this package seems like we will be forced to move back to 3.9. Would be good to know ETA to make an informed decision.

feuerball commented 1 year ago

you only need to change the imports i guess, should work then.

mblemberg commented 1 year ago

you only need to change the imports i guess, should work then.

could you elaborate?

mblemberg commented 1 year ago

you only need to change the imports i guess, should work then.

could you elaborate?

For others who may be wondering, the imports that need to be fixed for python 3.10+ are the import collections calls. They need to be replaced with one of the following, depending on the module:

from collections.abc import Mapping form collections.abc import Sequence from collections.abc import Iterable from collections.abc import Sized

and the subsequent references to those imported classes need to be updated as well. This was already done in 8fe225b but the changes have not been pushed to pypi.

You can install the updated package by running pip install git+https://github.com/ni/nixnet-python@8fe225b to install from source after the commit that fixed the issue.