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

python 3.12 dropped distutils, test needs replacement #229

Open
panlinux opened this issue Feb 19, 2024 · 0 comments
Open

python 3.12 dropped distutils, test needs replacement #229

panlinux opened this issue Feb 19, 2024 · 0 comments

Comments

@panlinux
Copy link

Hi,

python 3.12 dropped distutils, and there is a test in python-sparkpost using distutils.version.StrictVersion.

I suggest this simple replacement:

--- a/test/django/utils.py
+++ b/test/django/utils.py
@@ -1,7 +1,7 @@
-from distutils.version import StrictVersion
+from packaging.version import Version
 
 from django import get_version
 
 
 def at_least_version(version):
-    return StrictVersion(get_version()) > StrictVersion(version)
+    return Version(get_version()) > Version(version)
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

No branches or pull requests

1 participant