Skip to content

Conversation

shaunc
Copy link

@shaunc shaunc commented Jul 3, 2023

Using pytest-cases in python 3.11 results in a long string of deprecation warnings due to use of distutils.LooseVersion. This patch uses LooseVersion from "looseversion" package, which is designed to be a drop-in replacement without the deprecation warning.

@jayqi
Copy link
Contributor

jayqi commented Sep 22, 2023

Noting that I've opened PR #312 which is an alternative approach to addressing the problem that this PR solves. Since pytest-cases is just comparing version specifications of the pytest package, which are all compliant with PEP 440, using LooseVersion is not needed and the more standard packaging.version.Version is sufficient.

The documentation from the looseversion package itself states:

If you are simply comparing versions of Python packages, consider moving to packaging.version.Version, which follows PEP-440. LooseVersion is better suited to interacting with heterogeneous version schemes that do not follow PEP-440.

@smarie
Copy link
Owner

smarie commented Oct 4, 2023

Thanks to both of you @shaunc and @jayqi ! And sorry for the wait, last few months were crazy.
I will be in favor of following what is suggested in the doc, so @jayqi 's proposal in #312. @jayqi could you please pull the latest develop branch so that we can run against all python versions using nox+virtualenv?
If there is any problem with the legacy python versions, then we can reconsider @shaunc 's proposal.
Once again thanks a lot and sorry for the long wait !

@smarie
Copy link
Owner

smarie commented Oct 10, 2023

Superseded by #312
Thanks again @shaunc !

@smarie smarie closed this Oct 10, 2023
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.

3 participants