The replacement for distutils.version.LooseVersion, packaging.version.LegacyVersion, was similarly dropped from packaging as of version 22.
The only uses of LooseVersion() checks were to provide compatibility with IPython 0.10 - 0.12. Those versions didn't even support Python 3. Dropping compatibility with ancient IPython is the simplest fix.
distutils
has been removed as of Python 3.12.The replacement for
distutils.version.LooseVersion
,packaging.version.LegacyVersion
, was similarly dropped frompackaging
as of version 22.The only uses of
LooseVersion()
checks were to provide compatibility with IPython 0.10 - 0.12. Those versions didn't even support Python 3. Dropping compatibility with ancient IPython is the simplest fix.