summaryrefslogtreecommitdiff
path: root/numpy/random/tests/test_extending.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/random/tests/test_extending.py')
-rw-r--r--numpy/random/tests/test_extending.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/random/tests/test_extending.py b/numpy/random/tests/test_extending.py
index d362092b5..58adb66c7 100644
--- a/numpy/random/tests/test_extending.py
+++ b/numpy/random/tests/test_extending.py
@@ -31,13 +31,13 @@ try:
except ImportError:
cython = None
else:
- from distutils.version import LooseVersion
- # Cython 0.29.21 is required for Python 3.9 and there are
+ from numpy.compat import _pep440
+ # Cython 0.29.24 is required for Python 3.10 and there are
# other fixes in the 0.29 series that are needed even for earlier
# Python versions.
# Note: keep in sync with the one in pyproject.toml
- required_version = LooseVersion('0.29.21')
- if LooseVersion(cython_version) < required_version:
+ required_version = '0.29.24'
+ if _pep440.parse(cython_version) < _pep440.Version(required_version):
# too old or wrong cython, skip the test
cython = None