diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2022-02-08 10:53:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 10:53:21 -0700 |
commit | a6f55fe293502dd94eccb3799efdbaaa1d5ff1df (patch) | |
tree | 7de5a6bd467439d3c96c610b2529c2abb562b026 /numpy/random/tests/test_extending.py | |
parent | 9d3735a6c0781585a4a6cd767f68967d3897b38b (diff) | |
parent | df8d1fd3c2077ca785b0948912162e03727ace6c (diff) | |
download | numpy-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.py | 8 |
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 |