jupyter/qtconsole

distutils DeprecationWarning

juliangilbey opened this issue · 1 comments

The codebase currently imports from distutils:

from distutils.version import LooseVersion

This is raising a DeprecationWarning as distutils is slated for removal in Python 3.12:

qtconsole/qtconsoleapp.py:10
  /tmp/autopkgtest-lxc.uallnw_n/downtmp/build.4n1/src/qtconsole/qtconsoleapp.py:10: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    from distutils.version import LooseVersion

One could look at https://pypi.org/project/looseversion/ as a possible alternative, but they also suggest https://packaging.pypa.io/en/latest/version.html#packaging.version.Version

If there is no alternative to LooseVersion in the standard lib, we could use the Qt functionality for it. See the PR above.