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

distutils.version.LooseVersion should be replaced by packaging.version.Version #17170

Closed
jiasli opened this issue Mar 2, 2021 · 1 comment · Fixed by #17667
Closed

distutils.version.LooseVersion should be replaced by packaging.version.Version #17170

jiasli opened this issue Mar 2, 2021 · 1 comment · Fixed by #17667
Assignees
Labels
Core CLI core infrastructure feature-request
Milestone

Comments

@jiasli
Copy link
Member

jiasli commented Mar 2, 2021

Is your feature request related to a problem? Please describe.

As pointed out by Azure/azure-cli-extensions#2987 (comment), distutils.version.LooseVersion is legacy and conformant only to the superseded PEP 386 (by PEP 440).

In edge build, the version is 2.20.0.post20210302071300, which causes a failure at

elif LooseVersion(VERSIONS['versions']['core']['local']) != LooseVersion(__version__):

'<' not supported between instances of 'int' and 'str'

because post is not a supported versioning convention of distutils.version.LooseVersion.

Describe the solution you'd like

We should migrate to packaging.version.Version.

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 2, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 2, 2021

distutils related issue

@yungezz yungezz added the Core CLI core infrastructure label Mar 3, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 3, 2021
Jing-song added a commit to Jing-song/azure-cli that referenced this issue Apr 13, 2021
Replace distutils.version.LooseVersion with packaging.version.Version
@yonzhan yonzhan added this to the Backlog milestone Apr 13, 2021
Jing-song added a commit to Jing-song/azure-cli that referenced this issue Apr 14, 2021
fengzhou-msft pushed a commit that referenced this issue Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core CLI core infrastructure feature-request
Projects
None yet
5 participants