KaveIO / PhiK

Phi_K correlation analyzer library
Other
156 stars 28 forks source link

Drop Python 3.7 and add Python 3.12 support #75

Closed mbaak closed 10 months ago

mbaak commented 10 months ago

Drop Python 3.7 support, which has reached end of life. And add wheels for Python 3.12.

mbaak commented 10 months ago

@RUrlus I'm working through some of the issues. First step is to get the existing tests all working again. Fyi in Python 3.12 pkg_resources needs setuptools installed. This will become deprecated at some point, and will then need a different solution, but still works for now. (Will cross that bridge when we get there.)

RUrlus commented 10 months ago

Should be fairly easy to switch to a new pyproject.toml setup. I'll have a look.

RUrlus commented 10 months ago

@mbaak I added a new build system that is not reliant on setuptools and is future proof.

There is something wrong with the integration test with the new build system or the config. The unit tests pass other than a number of depreciation warnings we need to handle.

RUrlus commented 10 months ago

@mbaak we're running into the pkg_resources again. Installing setuptools for 3.12 doesn't seem to help. Strangely installing it for the other Python versions actually triggers the same deprecation warning.

I think we should move away peg_resources

mbaak commented 10 months ago

Ok. Let me see how to work around using it ...

mbaak commented 10 months ago

Now an issue for Python 3.12: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated Will have a look at that.

mbaak commented 10 months ago

For python 3.12 this is the blocker, dateutil, which pandas and matplotlib rely upon: https://github.com/dateutil/dateutil/issues/1314 (it's been 2.5 years since an update and many people are complaining.)

mbaak commented 10 months ago

This seems to work: pytest tests/test_phik.py -W ignore::DeprecationWarning testing it now.

RUrlus commented 10 months ago

Thanks @mbaak! Approved

mbaak commented 10 months ago

@RUrlus the tests are okay now.