Skip to content

Commit

Permalink
MAINT Bump versions to match oldest-supported-numpy (scikit-learn#22674)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjpfan authored Mar 4, 2022
1 parent fb71eef commit 269bdb9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
.. _`Benchmark`: https://scikit-learn.org/scikit-learn-benchmarks/

.. |PythonMinVersion| replace:: 3.8
.. |NumPyMinVersion| replace:: 1.16.6
.. |NumPyMinVersion| replace:: 1.17.3
.. |SciPyMinVersion| replace:: 1.3.2
.. |JoblibMinVersion| replace:: 1.0.0
.. |ThreadpoolctlMinVersion| replace:: 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion doc/whats_new/v1.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Version 1.1.0
Minimal dependencies
--------------------

Version 1.1.0 of scikit-learn requires python 3.8+, numpy 1.16.6+ and
Version 1.1.0 of scikit-learn requires python 3.8+, numpy 1.17.3+ and
scipy 1.3.2+. Optional minimal dependency is matplotlib 3.1.2+.

Put the changes in their relevant module.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requires = [
# use oldest-supported-numpy which provides the oldest numpy version with
# wheels on PyPI
#
# see: https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg
# see: https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
"oldest-supported-numpy",

"scipy>=1.3.2",
Expand Down
10 changes: 7 additions & 3 deletions sklearn/_min_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import argparse


# numpy scipy and cython should by in sync with pyproject.toml
# scipy and cython should by in sync with pyproject.toml

# NumPy version should match oldest-supported-numpy for the minimum supported
# Python version.
# see: https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
if platform.python_implementation() == "PyPy":
NUMPY_MIN_VERSION = "1.19.0"
NUMPY_MIN_VERSION = "1.19.2"
else:
NUMPY_MIN_VERSION = "1.16.6"
NUMPY_MIN_VERSION = "1.17.3"

SCIPY_MIN_VERSION = "1.3.2"
JOBLIB_MIN_VERSION = "1.0.0"
Expand Down
3 changes: 0 additions & 3 deletions sklearn/utils/tests/test_estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
SkipTest,
)
from sklearn.utils.validation import check_is_fitted
from sklearn.utils.fixes import np_version, parse_version
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.linear_model import LinearRegression, SGDClassifier
from sklearn.mixture import GaussianMixture
Expand Down Expand Up @@ -430,8 +429,6 @@ def partial_fit(self, X, y):


def test_not_an_array_array_function():
if np_version < parse_version("1.17"):
raise SkipTest("array_function protocol not supported in numpy <1.17")
not_array = _NotAnArray(np.ones(10))
msg = "Don't want to call array_function sum!"
with raises(TypeError, match=msg):
Expand Down

0 comments on commit 269bdb9

Please sign in to comment.