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 from distutils LooseVersion to Version #22

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

maresb
Copy link
Collaborator

@maresb maresb commented Feb 28, 2023

Fix DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

Checklist

  • Added a news entry

Fixes DeprecationWarning: distutils Version classes are deprecated.
Use packaging.version instead.
@maresb
Copy link
Collaborator Author

maresb commented Feb 28, 2023

Warning: I haven't run the tests locally, and I'm not sure if there are differences between distutils.version.LooseVersion and packaging.Version.

Copy link

@jfrost-mo jfrost-mo left a comment

Choose a reason for hiding this comment

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

Looks fine to me. Version has slightly different semantics to LooseVersion, but really only around handling of very weird version numbers. This shouldn't be an issue, as conda and mamba both use sane versions.

I've lightly tested, and it appears to work with the changes, including in python 3.12.

@jfrost-mo
Copy link

@mariusvniekerk sorry for the ping, but would it be possible to get this reviewed and merged? Its currently causing ensureconda to fail on Python 3.12.

@maresb
Copy link
Collaborator Author

maresb commented Nov 10, 2023

Ping @mariusvniekerk, any way to get a quick merge/release for this?

@vzcrab
Copy link

vzcrab commented Jan 29, 2024

Sorry for ping again, it's stuck too long.

@mariusvniekerk mariusvniekerk merged commit 4f4840d into conda-incubator:main Feb 3, 2024
@maresb maresb deleted the packaging-version branch February 3, 2024 16:35
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.

4 participants