summaryrefslogtreecommitdiff
path: root/numpy/random/tests/test_extending.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2022-02-08 10:53:21 -0700
committerGitHub <noreply@github.com>2022-02-08 10:53:21 -0700
commita6f55fe293502dd94eccb3799efdbaaa1d5ff1df (patch)
tree7de5a6bd467439d3c96c610b2529c2abb562b026 /numpy/random/tests/test_extending.py
parent9d3735a6c0781585a4a6cd767f68967d3897b38b (diff)
parentdf8d1fd3c2077ca785b0948912162e03727ace6c (diff)
downloadnumpy-a6f55fe293502dd94eccb3799efdbaaa1d5ff1df.tar.gz
Merge pull request #21000 from charris/replace-looseversion
MAINT: Replace LooseVersion by _pep440.
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