Skip to content

Commit

Permalink
Bump minimum NumPy to 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Jan 11, 2022
1 parent eaadeb6 commit 1b52120
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 15 deletions.
15 changes: 15 additions & 0 deletions doc/api/next_api_changes/development/22205-ES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Increase to minimum supported versions of Python and dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For Maptlotlib 3.6, the :ref:`minimum supported versions <dependencies>` 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
<https://numpy.org/neps/nep-0029-deprecation_policy.html>`__

2 changes: 1 addition & 1 deletion doc/devel/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mandatory dependencies are automatically installed. This list is mainly for
reference.

* `Python <https://www.python.org/downloads/>`_ (>= 3.7)
* `NumPy <https://numpy.org>`_ (>= 1.17)
* `NumPy <https://numpy.org>`_ (>= 1.19)
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
* `dateutil <https://pypi.org/project/python-dateutil/>`_ (>= 2.7)
Expand Down
4 changes: 3 additions & 1 deletion doc/devel/min_dep_policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=========================
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 2 additions & 8 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion requirements/testing/minver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,15 @@ 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",
],
install_requires=[
"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",
Expand Down

0 comments on commit 1b52120

Please sign in to comment.