Closed peytondmurray closed 2 years ago
This PR removes uses of distutils.version.LooseVersion in favor of packaging.version.Version at the suggestion of the deprecation warning generated when a user makes use of LooseVersion. This PR addresses one of the deprecation warnings identified in https://github.com/ray-project/ray/issues/27851. distutils will be deprecated in Python 3.10 and 3.11, and removed entirely in 3.12.
distutils.version.LooseVersion
packaging.version.Version
LooseVersion
distutils
distutils.version.Version
packaging
requirements-test.txt
setup.py
I tested this on my local machine with pytest and all the tests that weren't skipped passed.
pytest
Thanks! Would you be able to do the same for lightgbm-ray?
Definitely, I'll take a look later today!
Looks like there's a formatting issue - I'll run the formatter and push again.
Thanks!
Summary
This PR removes uses of
distutils.version.LooseVersion
in favor ofpackaging.version.Version
at the suggestion of the deprecation warning generated when a user makes use ofLooseVersion
. This PR addresses one of the deprecation warnings identified in https://github.com/ray-project/ray/issues/27851.distutils
will be deprecated in Python 3.10 and 3.11, and removed entirely in 3.12.Changes
distutils.version.Version
withpackaging.version.Version
everywherepackaging
as a dependency inrequirements-test.txt
and insetup.py
Tests
I tested this on my local machine with
pytest
and all the tests that weren't skipped passed.