soft-matter / trackpy

Python particle tracking toolkit
http://soft-matter.github.io/trackpy
Other
441 stars 131 forks source link

Fix scipy and distutils deprecation warnings #706

Closed crisp-snakey closed 1 year ago

crisp-snakey commented 1 year ago

Scipy 1.8 introduced depraction warnings for importing the submodules of ndimage. The solution is to import the functions directly from the ndimage module itself and not through one of the sub-modules that it is (accidentally) exposed through. Furthermore distutils has been slated for deprecation for quite a while now and will be removed in python 3.12. The utils.py file uses functionality from it to handle various versions of pandas. The distutils LooseVersion functionality is re-exposed through the looseversion package and is supposed to be a drop-in replacement for version the distutils counterpart.

nkeim commented 1 year ago

Thanks! Looks great. We also need to mention looseversion in doc/installation.rst. Normally I can do this but it requires you to be placing this PR from a different branch (not master). Would you mind doing it instead?

At line 131, to the list of dependencies please add

* `looseversion <https://pypi.org/project/looseversion/>`__
crisp-snakey commented 1 year ago

I've listed the dependency in the documentation like you asked.

nkeim commented 1 year ago

Thanks for this soon-to-be essential contribution!! Merging now.

alessiamarcolini commented 1 year ago

Hi @nkeim is there a timeline for releasing this? :)

nkeim commented 1 year ago

Hi @alessiamarcolini ! Thank you for your patience. Yes, I've finally had a little time to work on some issues that were blocking a release. Please watch for a release candidate in the next few days.