Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6995c27

Browse files
authored
Merge pull request #22205 from QuLogic/np119
Bump minimum NumPy to 1.19
2 parents e2e703b + e08699d commit 6995c27

File tree

10 files changed

+28
-17
lines changed

10 files changed

+28
-17
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Increase to minimum supported versions of Python and dependencies
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
For Matplotlib 3.6, the :ref:`minimum supported versions <dependencies>` are
5+
being bumped:
6+
7+
+------------+-----------------+---------------+
8+
| Dependency | min in mpl3.5 | min in mpl3.6 |
9+
+============+=================+===============+
10+
| NumPy | 1.17 | 1.19 |
11+
+------------+-----------------+---------------+
12+
13+
This is consistent with our :ref:`min_deps_policy` and `NEP29
14+
<https://numpy.org/neps/nep-0029-deprecation_policy.html>`__
15+

doc/api/prev_api_changes/api_changes_3.2.0/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ is desired.
2222

2323
Packaging DLLs
2424
~~~~~~~~~~~~~~
25-
Previously, it was possible to package Windows DLLs into the Maptlotlib
25+
Previously, it was possible to package Windows DLLs into the Matplotlib
2626
wheel (or sdist) by copying them into the source tree and setting the
2727
``package_data.dlls`` entry in ``setup.cfg``.
2828

doc/api/prev_api_changes/api_changes_3.4.0/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Development changes
44
Increase to minimum supported versions of Python and dependencies
55
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66

7-
For Maptlotlib 3.4, the :ref:`minimum supported versions <dependencies>` are
7+
For Matplotlib 3.4, the :ref:`minimum supported versions <dependencies>` are
88
being bumped:
99

1010
+------------+-----------------+---------------+

doc/devel/dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mandatory dependencies are automatically installed. This list is mainly for
1515
reference.
1616

1717
* `Python <https://www.python.org/downloads/>`_ (>= 3.7)
18-
* `NumPy <https://numpy.org>`_ (>= 1.17)
18+
* `NumPy <https://numpy.org>`_ (>= 1.19)
1919
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
2020
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
2121
* `dateutil <https://pypi.org/project/python-dateutil/>`_ (>= 2.7)

doc/devel/min_dep_policy.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ We will support at least minor versions of the development
6161
dependencies released in the 12 months prior to our planned release.
6262

6363
We will only bump these as needed or versions no longer support our
64-
minimum Python and numpy.
64+
minimum Python and NumPy.
6565

6666
System and C-dependencies
6767
=========================
@@ -83,6 +83,7 @@ specification of the dependencies.
8383
========== ======== ======
8484
Matplotlib Python NumPy
8585
========== ======== ======
86+
`3.6`_ 3.7 1.19.0
8687
`3.5`_ 3.7 1.17.0
8788
`3.4`_ 3.7 1.16.0
8889
`3.3`_ 3.6 1.15.0
@@ -100,6 +101,7 @@ Matplotlib Python NumPy
100101
1.0 2.4 1.1
101102
========== ======== ======
102103

104+
.. _`3.6`: https://matplotlib.org/3.6.0/devel/dependencies.html
103105
.. _`3.5`: https://matplotlib.org/3.5.0/devel/dependencies.html
104106
.. _`3.4`: https://matplotlib.org/3.4.0/devel/dependencies.html
105107
.. _`3.3`: https://matplotlib.org/3.3.0/users/installing.html#dependencies

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- cycler>=0.10.0
1313
- fonttools>=4.22.0
1414
- kiwisolver>=1.0.1
15-
- numpy>=1.17
15+
- numpy>=1.19
1616
- pillow>=6.2
1717
- pygobject
1818
- pyparsing

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _check_versions():
196196
("cycler", "0.10"),
197197
("dateutil", "2.7"),
198198
("kiwisolver", "1.0.1"),
199-
("numpy", "1.17"),
199+
("numpy", "1.19"),
200200
("pyparsing", "2.2.1"),
201201
]:
202202
module = importlib.import_module(modname)

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,19 +1025,13 @@ def test_fill_between_interpolate_nan():
10251025
y1 = np.asarray([8, 18, np.nan, 18, 8, 18, 24, 18, 8, 18])
10261026
y2 = np.asarray([18, 11, 8, 11, 18, 26, 32, 30, np.nan, np.nan])
10271027

1028-
# NumPy <1.19 issues warning 'invalid value encountered in greater_equal'
1029-
# for comparisons that include nan.
1030-
with np.errstate(invalid='ignore'):
1031-
greater2 = y2 >= y1
1032-
greater1 = y1 >= y2
1033-
10341028
fig, ax = plt.subplots()
10351029

10361030
ax.plot(x, y1, c='k')
10371031
ax.plot(x, y2, c='b')
1038-
ax.fill_between(x, y1, y2, where=greater2, facecolor="green",
1032+
ax.fill_between(x, y1, y2, where=y2 >= y1, facecolor="green",
10391033
interpolate=True, alpha=0.5)
1040-
ax.fill_between(x, y1, y2, where=greater1, facecolor="red",
1034+
ax.fill_between(x, y1, y2, where=y1 >= y2, facecolor="red",
10411035
interpolate=True, alpha=0.5)
10421036

10431037

requirements/testing/minver.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
cycler==0.10
44
kiwisolver==1.0.1
5-
numpy==1.17.0
5+
numpy==1.19.0
66
packaging==20.0
77
pillow==6.2.0
88
pyparsing==2.2.1

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,15 +308,15 @@ def make_release_tree(self, base_dir, files):
308308
python_requires='>={}'.format('.'.join(str(n) for n in py_min_version)),
309309
setup_requires=[
310310
"certifi>=2020.06.20",
311-
"numpy>=1.17",
311+
"numpy>=1.19",
312312
"setuptools_scm>=4",
313313
"setuptools_scm_git_archive",
314314
],
315315
install_requires=[
316316
"cycler>=0.10",
317317
"fonttools>=4.22.0",
318318
"kiwisolver>=1.0.1",
319-
"numpy>=1.17",
319+
"numpy>=1.19",
320320
"packaging>=20.0",
321321
"pillow>=6.2.0",
322322
"pyparsing>=2.2.1,<3.0.0",

0 commit comments

Comments
 (0)