Skip to content

Using packaging.version instead of distutils - #312

Merged
smarie merged 1 commit into
smarie:mainfrom
jayqi:packaging-version
Oct 10, 2023
Merged

Using packaging.version instead of distutils#312
smarie merged 1 commit into
smarie:mainfrom
jayqi:packaging-version

Conversation

@jayqi

@jayqi jayqi commented Sep 22, 2023

Copy link
Copy Markdown
Contributor

This PR migrates from distutils to packaging.version for comparing versions. This follows the recommendations from the distutils deprecation warnings. Distutils is deprecated, and is removed in the upcoming Python 3.12 (pytest-cases is incompatible with Python 3.12 for this reason).

This is an alternative implementation to PR #303, which uses a replacement of LooseVersion. Because this package is simply comparing pytest package versions, which are all PEP 440 compliant, LooseVersion is not required, and the more standard packaging package is sufficient.

Closes #297, closes #307

@jayqi
jayqi force-pushed the packaging-version branch from 5461761 to ce44912 Compare October 4, 2023 15:46
@jayqi

jayqi commented Oct 4, 2023

Copy link
Copy Markdown
Contributor Author

@smarie I've rebased this PR on the current state of the main branch. You need to hit a button in the PR UI to approve the CI to run, since I'm an external contributor to this repo.

@jayqi

jayqi commented Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

Hi @smarie — bumping this PR. It should be up-to-date with the main branch, and you need to approve the CI run in GitHub because I'm an external contributor.

@smarie

smarie commented Oct 10, 2023

Copy link
Copy Markdown
Owner

Indeed @jayqi . Thanks !

@smarie
smarie merged commit f7391b7 into smarie:main Oct 10, 2023
@jayqi
jayqi deleted the packaging-version branch January 28, 2024 02:00
@jayqi
jayqi restored the packaging-version branch January 28, 2024 02:08
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.

DeprecationWarning for distutils Version ModuleNotFoundError: distutils on Python 3.12

2 participants