scikit-learn-extra icon indicating copy to clipboard operation
scikit-learn-extra copied to clipboard

PEP632: Remove depracted call of distutils.version.LooseVersion

Open braniii opened this issue 2 years ago • 1 comments

Hello,

I am sorry for the short PR yesterday, but I got interrupted. So my concern is that import scikit-learn-extra in a pytest environment leads to raising warnings. I need to admit, that I am not able to reproduce a minimal working example.

I would suggest to remove the depracted call of distutils.version.LooseVersion with packaging.version.Version. The reason is that starting from Python 3.12 the distutils package will be removed, see PEP634. In the packaging module there is no LooseVersion, but regarding the strict versioning of sklearn and numpy this should make no difference.

PS: I've just notice that it is checked against version below the INSTALL_REQUIRES. So it should be save deleting these checks completely. https://github.com/scikit-learn-contrib/scikit-learn-extra/blob/cb70ef0f3a8cbff324c06b3f4e931f8ee148c739/setup.py#L24

braniii avatar Apr 25 '22 15:04 braniii

Python 3.12 support has been added to scikit-learn, see scikit-learn/scikit-learn#27027. So this would be the first step towards supporting py3.12 with the latest sklearn 1.3

braniii avatar Oct 26 '23 14:10 braniii