Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to use packaging.Version from distutils LooseVersion #232

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

peytondmurray
Copy link
Contributor

@peytondmurray peytondmurray commented Sep 1, 2022

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 ray-project/ray#27851. distutils will be deprecated in Python 3.10 and 3.11, and removed entirely in 3.12.

Changes

  • Replaced distutils.version.Version with packaging.version.Version everywhere
  • Added packaging as a dependency in requirements-test.txt and in setup.py

Tests

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

Copy link
Member

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Would you be able to do the same for lightgbm-ray?

@peytondmurray
Copy link
Contributor Author

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.

Signed-off-by: pdmurray <peynmurray@gmail.com>
@Yard1
Copy link
Member

Yard1 commented Sep 1, 2022

Thanks!

@Yard1 Yard1 merged commit f72f94b into ray-project:master Sep 1, 2022
@peytondmurray peytondmurray deleted the deprecate-distutils branch September 1, 2022 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants