From df8d1fd3c2077ca785b0948912162e03727ace6c Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Fri, 4 Feb 2022 16:21:58 -0700 Subject: MAINT: Replace LooseVersion by _pep440. LooseVersion is provided by Python distutils, which is going away in 3.12. This PR vendors _pep440 from scipy and uses it as a replacement. Numpy distutils is not touched, replacing LooseVersion in that package was considered too risky, and numpy distutils will need to go away when Python distutils does. --- numpy/core/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/core/setup.py') diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 63962ab79..a13480907 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -422,12 +422,13 @@ def configuration(parent_package='',top_path=None): exec_mod_from_location) from numpy.distutils.system_info import (get_info, blas_opt_info, lapack_opt_info) + from numpy.version import release as is_released config = Configuration('core', parent_package, top_path) local_dir = config.local_path codegen_dir = join(local_dir, 'code_generators') - if is_released(config): + if is_released: warnings.simplefilter('error', MismatchCAPIWarning) # Check whether we have a mismatch between the set C API VERSION and the -- cgit v1.2.1