diff --git a/doc/api/next_api_changes/development/22205-ES.rst b/doc/api/next_api_changes/development/22205-ES.rst new file mode 100644 index 000000000000..cfd8f5afe271 --- /dev/null +++ b/doc/api/next_api_changes/development/22205-ES.rst @@ -0,0 +1,15 @@ +Increase to minimum supported versions of Python and dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For Matplotlib 3.6, the :ref:`minimum supported versions ` are +being bumped: + ++------------+-----------------+---------------+ +| Dependency | min in mpl3.5 | min in mpl3.6 | ++============+=================+===============+ +| NumPy | 1.17 | 1.19 | ++------------+-----------------+---------------+ + +This is consistent with our :ref:`min_deps_policy` and `NEP29 +`__ + diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/development.rst b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst index 470b594d522c..9af7fb8fb561 100644 --- a/doc/api/prev_api_changes/api_changes_3.2.0/development.rst +++ b/doc/api/prev_api_changes/api_changes_3.2.0/development.rst @@ -22,7 +22,7 @@ is desired. Packaging DLLs ~~~~~~~~~~~~~~ -Previously, it was possible to package Windows DLLs into the Maptlotlib +Previously, it was possible to package Windows DLLs into the Matplotlib wheel (or sdist) by copying them into the source tree and setting the ``package_data.dlls`` entry in ``setup.cfg``. diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst index ab5e118de9e8..982046c3869e 100644 --- a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst +++ b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst @@ -4,7 +4,7 @@ Development changes Increase to minimum supported versions of Python and dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For Maptlotlib 3.4, the :ref:`minimum supported versions ` are +For Matplotlib 3.4, the :ref:`minimum supported versions ` are being bumped: +------------+-----------------+---------------+ diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index 5da29663ad7d..90cb04c2bff1 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -15,7 +15,7 @@ mandatory dependencies are automatically installed. This list is mainly for reference. * `Python `_ (>= 3.7) -* `NumPy `_ (>= 1.17) +* `NumPy `_ (>= 1.19) * `setuptools `_ * `cycler `_ (>= 0.10.0) * `dateutil `_ (>= 2.7) diff --git a/doc/devel/min_dep_policy.rst b/doc/devel/min_dep_policy.rst index 306ec0ea90dc..d69fd76c4c03 100644 --- a/doc/devel/min_dep_policy.rst +++ b/doc/devel/min_dep_policy.rst @@ -61,7 +61,7 @@ We will support at least minor versions of the development dependencies released in the 12 months prior to our planned release. We will only bump these as needed or versions no longer support our -minimum Python and numpy. +minimum Python and NumPy. System and C-dependencies ========================= @@ -83,6 +83,7 @@ specification of the dependencies. ========== ======== ====== Matplotlib Python NumPy ========== ======== ====== +`3.6`_ 3.7 1.19.0 `3.5`_ 3.7 1.17.0 `3.4`_ 3.7 1.16.0 `3.3`_ 3.6 1.15.0 @@ -100,6 +101,7 @@ Matplotlib Python NumPy 1.0 2.4 1.1 ========== ======== ====== +.. _`3.6`: https://matplotlib.org/3.6.0/devel/dependencies.html .. _`3.5`: https://matplotlib.org/3.5.0/devel/dependencies.html .. _`3.4`: https://matplotlib.org/3.4.0/devel/dependencies.html .. _`3.3`: https://matplotlib.org/3.3.0/users/installing.html#dependencies diff --git a/environment.yml b/environment.yml index 6ed4969f7398..a185c2b72179 100644 --- a/environment.yml +++ b/environment.yml @@ -12,7 +12,7 @@ dependencies: - cycler>=0.10.0 - fonttools>=4.22.0 - kiwisolver>=1.0.1 - - numpy>=1.17 + - numpy>=1.19 - pillow>=6.2 - pygobject - pyparsing diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 5937b547498f..e68c3cb68f7d 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -196,7 +196,7 @@ def _check_versions(): ("cycler", "0.10"), ("dateutil", "2.7"), ("kiwisolver", "1.0.1"), - ("numpy", "1.17"), + ("numpy", "1.19"), ("pyparsing", "2.2.1"), ]: module = importlib.import_module(modname) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index efb25f828afb..b7eb85b2cc8e 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -1025,19 +1025,13 @@ def test_fill_between_interpolate_nan(): y1 = np.asarray([8, 18, np.nan, 18, 8, 18, 24, 18, 8, 18]) y2 = np.asarray([18, 11, 8, 11, 18, 26, 32, 30, np.nan, np.nan]) - # NumPy <1.19 issues warning 'invalid value encountered in greater_equal' - # for comparisons that include nan. - with np.errstate(invalid='ignore'): - greater2 = y2 >= y1 - greater1 = y1 >= y2 - fig, ax = plt.subplots() ax.plot(x, y1, c='k') ax.plot(x, y2, c='b') - ax.fill_between(x, y1, y2, where=greater2, facecolor="green", + ax.fill_between(x, y1, y2, where=y2 >= y1, facecolor="green", interpolate=True, alpha=0.5) - ax.fill_between(x, y1, y2, where=greater1, facecolor="red", + ax.fill_between(x, y1, y2, where=y1 >= y2, facecolor="red", interpolate=True, alpha=0.5) diff --git a/requirements/testing/minver.txt b/requirements/testing/minver.txt index 578cd205f9b5..ca07c883d586 100644 --- a/requirements/testing/minver.txt +++ b/requirements/testing/minver.txt @@ -2,7 +2,7 @@ cycler==0.10 kiwisolver==1.0.1 -numpy==1.17.0 +numpy==1.19.0 packaging==20.0 pillow==6.2.0 pyparsing==2.2.1 diff --git a/setup.py b/setup.py index 4282195dbad5..34093ff3ac54 100644 --- a/setup.py +++ b/setup.py @@ -308,7 +308,7 @@ def make_release_tree(self, base_dir, files): python_requires='>={}'.format('.'.join(str(n) for n in py_min_version)), setup_requires=[ "certifi>=2020.06.20", - "numpy>=1.17", + "numpy>=1.19", "setuptools_scm>=4", "setuptools_scm_git_archive", ], @@ -316,7 +316,7 @@ def make_release_tree(self, base_dir, files): "cycler>=0.10", "fonttools>=4.22.0", "kiwisolver>=1.0.1", - "numpy>=1.17", + "numpy>=1.19", "packaging>=20.0", "pillow>=6.2.0", "pyparsing>=2.2.1,<3.0.0",