ray-project / xgboost_ray

Distributed XGBoost on Ray
Apache License 2.0
139 stars 34 forks source link

Switch to use packaging.Version from distutils LooseVersion #232

Closed peytondmurray closed 2 years ago

peytondmurray commented 2 years ago

Summary

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.

Changes

Tests

I tested this on my local machine with pytest and all the tests that weren't skipped passed.

peytondmurray commented 2 years ago

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.

Yard1 commented 2 years ago

Thanks!