Skip to content

Commit

Permalink
Replace distutils.LooseVersion by packaging.version.Version
Browse files Browse the repository at this point in the history
related to #2204
  • Loading branch information
serge-sans-paille committed May 7, 2024
1 parent b9c0f8a commit 537a826
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Changelog = "https://pythran.readthedocs.io/en/latest/Changelog.html"

[project.optional-dependencies]
doc = ["numpy", "nbsphinx", "scipy", "guzzle_sphinx_theme"]
test = ["ipython", "nbval", "cython", "wheel"]
test = ["ipython", "nbval", "cython", "wheel", "packaging"]

[project.scripts]
pythran = "pythran.run:run"
Expand Down
4 changes: 2 additions & 2 deletions pythran/tests/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks
import os
from distutils.version import LooseVersion
from packaging.version import Version
import numpy
import unittest

Expand All @@ -18,7 +18,7 @@ class TestCases(TestFromDir):

TestCases.populate(TestCases)

if LooseVersion(numpy.__version__) >= '1.20':
if Version(numpy.__version__) >= Version('1.20'):
del TestCases.test_train_equalizer_norun0
del TestCases.test_train_eq_run0
del TestCases.test_train_eq_run1
Expand Down

0 comments on commit 537a826

Please sign in to comment.