Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3274d6a

Browse filesBrowse files
authored
Merge pull request #29904 from tacaswell/api/py311_min
API: bump minimum supported version of Python and numpy
2 parents 0ba29f5 + d645969 commit 3274d6a
Copy full SHA for 3274d6a

File tree

Expand file treeCollapse file tree

14 files changed

+85
-30
lines changed
Filter options
Expand file treeCollapse file tree

14 files changed

+85
-30
lines changed

‎.github/workflows/cibuildwheel.yml

Copy file name to clipboardExpand all lines: .github/workflows/cibuildwheel.yml
+4-9Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
4848
name: Install Python
4949
with:
50-
python-version: '3.10'
50+
python-version: '3.11'
5151

5252
# Something changed somewhere that prevents the downloaded-at-build-time
5353
# licenses from being included in built wheels, so pre-download them so
@@ -163,22 +163,17 @@ jobs:
163163
CIBW_BUILD: "cp311-*"
164164
CIBW_ARCHS: ${{ matrix.cibw_archs }}
165165

166-
- name: Build wheels for CPython 3.10
167-
uses: pypa/cibuildwheel@d04cacbc9866d432033b1d09142936e6a0e2121a # v2.23.2
168-
with:
169-
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
170-
env:
171-
CIBW_BUILD: "cp310-*"
172-
CIBW_ARCHS: ${{ matrix.cibw_archs }}
173166

174167
- name: Build wheels for PyPy
175168
uses: pypa/cibuildwheel@d04cacbc9866d432033b1d09142936e6a0e2121a # v2.23.2
176169
with:
177170
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
178171
env:
179-
CIBW_BUILD: "pp310-*"
172+
CIBW_BUILD: "pp311-*"
180173
CIBW_ARCHS: ${{ matrix.cibw_archs }}
181174
CIBW_ENABLE: pypy
175+
# No wheels available for Pillow with pp311 yet.
176+
CIBW_TEST_SKIP: "pp311*"
182177
if: matrix.cibw_archs != 'aarch64' && matrix.os != 'windows-latest'
183178

184179
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

‎.github/workflows/mypy-stubtest.yml

Copy file name to clipboardExpand all lines: .github/workflows/mypy-stubtest.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python 3
2020
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
2121
with:
22-
python-version: '3.10'
22+
python-version: '3.11'
2323

2424
- name: Set up reviewdog
2525
uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893 # v1.3.9
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
set -o pipefail
3535
tox -e stubtest | \
36-
sed -e "s!.tox/stubtest/lib/python3.10/site-packages!lib!g" | \
36+
sed -e "s!.tox/stubtest/lib/python3.11/site-packages!lib!g" | \
3737
reviewdog \
3838
-efm '%Eerror: %m' \
3939
-efm '%CStub: in file %f:%l' \

‎.github/workflows/reviewdog.yml

Copy file name to clipboardExpand all lines: .github/workflows/reviewdog.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python 3
2020
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
2121
with:
22-
python-version: '3.10'
22+
python-version: '3.11'
2323

2424
- name: Install ruff
2525
run: pip3 install ruff
@@ -48,7 +48,7 @@ jobs:
4848
- name: Set up Python 3
4949
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
5050
with:
51-
python-version: '3.10'
51+
python-version: '3.11'
5252

5353
- name: Install mypy
5454
run: pip3 install -r requirements/testing/mypy.txt -r requirements/testing/all.txt

‎.github/workflows/tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/tests.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
python-version: '3.12'
6868
- os: macos-13 # This runner is on Intel chips.
6969
# merge numpy and pandas install in nighties test when this runner is dropped
70-
python-version: '3.10'
70+
python-version: '3.11'
7171
- os: macos-14 # This runner is on M1 (arm64) chips.
7272
python-version: '3.12'
7373
# https://github.com/matplotlib/matplotlib/issues/29732

‎azure-pipelines.yml

Copy file name to clipboardExpand all lines: azure-pipelines.yml
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,8 @@ stages:
4949
- job: Pytest
5050
strategy:
5151
matrix:
52-
Windows_py310:
53-
vmImage: 'windows-2019' # keep one job pinned to the oldest image
54-
python.version: '3.10'
5552
Windows_py311:
56-
vmImage: 'windows-latest'
53+
vmImage: 'windows-2019' # keep one job pinned to the oldest image
5754
python.version: '3.11'
5855
Windows_py312:
5956
vmImage: 'windows-latest'
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Increase to minimum supported versions of dependencies
3+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4+
5+
For Matplotlib 3.11, the :ref:`minimum supported versions <dependencies>` are
6+
being bumped:
7+
8+
+------------+-----------------+----------------+
9+
| Dependency | min in mpl3.10 | min in mpl3.11 |
10+
+============+=================+================+
11+
| Python | 3.10 | 3.11 |
12+
| NumPy | 1.23 | 1.25 |
13+
+------------+-----------------+----------------+
14+
15+
This is consistent with our :ref:`min_deps_policy` and `SPEC0
16+
<https://scientific-python.org/specs/spec-0000/>`__

‎doc/devel/min_dep_policy.rst

Copy file name to clipboardExpand all lines: doc/devel/min_dep_policy.rst
+48Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ specification of the dependencies.
115115
========== ======== ======
116116
Matplotlib Python NumPy
117117
========== ======== ======
118+
3.11 3.11 1.25.0
118119
`3.10`_ 3.10 1.23.0
119120
`3.9`_ 3.9 1.23.0
120121
`3.8`_ 3.9 1.21.0
@@ -154,3 +155,50 @@ Matplotlib Python NumPy
154155
.. _`1.5`: https://matplotlib.org/1.5.0/users/installing.html#required-dependencies
155156
.. _`1.4`: https://matplotlib.org/1.4.0/users/installing.html#required-dependencies
156157
.. _`1.3`: https://matplotlib.org/1.3.0/users/installing.html#build-requirements
158+
159+
160+
Updating Python and NumPy versions
161+
==================================
162+
163+
To update the minimum versions of Python we need to update:
164+
165+
- ``pyproject.toml`` (classifiers, requires-python, ``[tool.ruff]`` target-version)
166+
- ``environment.yml``
167+
- ``doc/install/dependencies.rst``
168+
- ``doc/devel/min_dep_policy.rst`` (this file)
169+
- CI configuration files (circle, GHA, azure)
170+
- ``tox.ini``
171+
172+
To update the minimum NumPy we need to update:
173+
174+
- ``pyproject.toml``
175+
- ``environment.yml``
176+
- ``doc/install/dependencies.rst``
177+
- ``doc/devel/min_dep_policy.rst`` (this file)
178+
- ``requirements/testing/minver.txt``
179+
- ``lib/matplotlib/__init__.py`` (matplotlib._check_versions())
180+
181+
182+
The work to leverage new features or remove workarounds for no-longer supported
183+
versions should be done in a follow-on PRs to keep the version bump PRs well
184+
scoped.
185+
186+
In both cases add an api_changes/development with the following template:
187+
188+
.. code-block:: rst
189+
190+
Increase to minimum supported versions of dependencies
191+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
192+
193+
For Matplotlib 3.ZZ, the :ref:`minimum supported versions <dependencies>` are
194+
being bumped:
195+
196+
+------------+-----------------+----------------+
197+
| Dependency | min in mpl3.N | min in mpl3.M |
198+
+============+=================+================+
199+
| Python | 3.XX | 3.AA |
200+
| NumPy | 1.YY | 1.BB |
201+
+------------+-----------------+----------------+
202+
203+
This is consistent with our :ref:`min_deps_policy` and `SPEC0
204+
<https://scientific-python.org/specs/spec-0000/>`__

‎doc/install/dependencies.rst

Copy file name to clipboardExpand all lines: doc/install/dependencies.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ When installing through a package manager like ``pip`` or ``conda``, the
2020
mandatory dependencies are automatically installed. This list is mainly for
2121
reference.
2222

23-
* `Python <https://www.python.org/downloads/>`_ (>= 3.10)
23+
* `Python <https://www.python.org/downloads/>`_ (>= 3.11)
2424
* `contourpy <https://pypi.org/project/contourpy/>`_ (>= 1.0.1)
2525
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
2626
* `dateutil <https://pypi.org/project/python-dateutil/>`_ (>= 2.7)
2727
* `fontTools <https://fonttools.readthedocs.io/en/latest/>`_ (>= 4.22.0)
2828
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.3.1)
29-
* `NumPy <https://numpy.org>`_ (>= 1.23)
29+
* `NumPy <https://numpy.org>`_ (>= 1.25)
3030
* `packaging <https://pypi.org/project/packaging/>`_ (>= 20.0)
3131
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 9.0)
3232
* `pyparsing <https://pypi.org/project/pyparsing/>`_ (>= 3)

‎environment.yml

Copy file name to clipboardExpand all lines: environment.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ dependencies:
2020
- kiwisolver>=1.3.1
2121
- pybind11>=2.13.2
2222
- meson-python>=0.13.1
23-
- numpy
23+
- numpy>=1.25
2424
- pillow>=9
2525
- pkg-config
2626
- pygobject
2727
- pyparsing>=3
2828
- pyqt
29-
- python>=3.10
29+
- python>=3.11
3030
- python-dateutil>=2.1
3131
- setuptools_scm
3232
- wxpython

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def _check_versions():
253253
("cycler", "0.10"),
254254
("dateutil", "2.7"),
255255
("kiwisolver", "1.3.1"),
256-
("numpy", "1.23"),
256+
("numpy", "1.25"),
257257
("pyparsing", "2.3.1"),
258258
]:
259259
module = importlib.import_module(modname)

‎pyproject.toml

Copy file name to clipboardExpand all lines: pyproject.toml
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ classifiers=[
1616
"License :: OSI Approved :: Python Software Foundation License",
1717
"Programming Language :: Python",
1818
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.10",
2019
"Programming Language :: Python :: 3.11",
2120
"Programming Language :: Python :: 3.12",
2221
"Programming Language :: Python :: 3.13",
@@ -35,13 +34,13 @@ dependencies = [
3534
"cycler >= 0.10",
3635
"fonttools >= 4.22.0",
3736
"kiwisolver >= 1.3.1",
38-
"numpy >= 1.23",
37+
"numpy >= 1.25",
3938
"packaging >= 20.0",
4039
"pillow >= 9",
4140
"pyparsing >= 3",
4241
"python-dateutil >= 2.7",
4342
]
44-
requires-python = ">=3.10"
43+
requires-python = ">=3.11"
4544

4645
[project.optional-dependencies]
4746
# Should be a copy of the build dependencies below.
@@ -105,7 +104,7 @@ exclude = [
105104
"*.ipynb"
106105
]
107106
line-length = 88
108-
target-version = "py310"
107+
target-version = "py311"
109108

110109
[tool.ruff.lint]
111110
ignore = [

‎requirements/testing/extra.txt

Copy file name to clipboardExpand all lines: requirements/testing/extra.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Extra pip requirements for the Python 3.10+ builds
1+
# Extra pip requirements
22

33
--prefer-binary
44
ipykernel

‎requirements/testing/minver.txt

Copy file name to clipboardExpand all lines: requirements/testing/minver.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ importlib-resources==3.2.0
77
kiwisolver==1.3.2
88
meson-python==0.13.1
99
meson==1.1.0
10-
numpy==1.23.0
10+
numpy==1.25.0
1111
packaging==20.0
1212
pillow==9.0.1
1313
pyparsing==3.0.0

‎tox.ini

Copy file name to clipboardExpand all lines: tox.ini
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py310, py311, py312, stubtest
7+
envlist = py311, py312, py313, stubtest
88

99
[testenv]
1010
changedir = /tmp

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.