Open NickLavrov opened 2 months ago
Thank you for letting us know about this. We will add Python 3.12 to CLASSIFIERS in our next release. Doing quick tests, the latest labjack-ljm package on PyPi installs with 3.12 fine, and examples seem fine. We will test with 3.12 more thoroughly when we update.
The older method of installing with local files:
python setup.py install
Cannot find setuptools by default in 3.12, but the current recommended way (run in the package's root directory):
python -m pip install .
Will install the setuptools dependency for the installation. Also, "python -m build" will install the setuptools dependency during the build.
In
setup.py
inCLASSIFIERS
please specify that python 3.12 is supported (if so). Given that there are no external package dependencies, there is nothing to update dependency-wise.There is no test suite included in this repo, but I did this: Plug in LabJack T7 PRO via ethernet to my M1 Mac and run:
find Examples/Basic -name "*.py" | xargs -I {} python {} 2
(the2
is for the loop counter argument inlabjack-ljm-python/Examples/Basic/write_read_loop_with_config.py
so it doesn't loop infinitely). All files ran successfully with python 3.12, with the package installed aspip install -e .
. I did not run all the tests in Examples/More because I don't use the other connection methods or advanced aspects of this package.Looking at how python 3.11 compatibility was added with no changes, I suspect this to not require many changes. One thing is
setuptools
: (from AI) The setuptools package is still available in Python 3.12 and provides the distutils module, which was deprecated in Python 3.10 and removed in Python 3.12. However, distutils is no longer available by default in virtual environments created with venv. To access it, you can run pip install setuptools in the activated virtual environment. (end of AI). This means that whatever build and release process is used here, if using a venv, will need to install setuptools, likely.