Skip to content

Commit b5251f4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into typing-fix-coords
2 parents 4db147a + 56153b9 commit b5251f4

File tree

471 files changed

+23855
-17199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

471 files changed

+23855
-17199
lines changed

.circleci/config.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ commands:
9898
parameters:
9999
numpy_version:
100100
type: string
101-
default: ""
101+
default: "~=2.0.0"
102102
steps:
103103
- run:
104104
name: Install Python dependencies
@@ -147,7 +147,7 @@ commands:
147147
export RELEASE_TAG='-t release'
148148
fi
149149
mkdir -p logs
150-
make html O="-T $RELEASE_TAG -j1 -w /tmp/sphinxerrorswarnings.log"
150+
make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log"
151151
rm -r build/html/_sources
152152
working_directory: doc
153153
- save_cache:
@@ -216,9 +216,9 @@ commands:
216216
#
217217

218218
jobs:
219-
docs-python39:
219+
docs-python3:
220220
docker:
221-
- image: cimg/python:3.9
221+
- image: cimg/python:3.12
222222
resource_class: large
223223
steps:
224224
- checkout
@@ -259,4 +259,4 @@ workflows:
259259
jobs:
260260
# NOTE: If you rename this job, then you must update the `if` condition
261261
# and `circleci-jobs` option in `.github/workflows/circleci.yml`.
262-
- docs-python39
262+
- docs-python3

.flake8

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ exclude =
3434

3535
per-file-ignores =
3636
lib/matplotlib/_cm.py: E202, E203, E302
37-
lib/matplotlib/_mathtext.py: E221, E251
38-
lib/matplotlib/_mathtext_data.py: E203, E261
37+
lib/matplotlib/_mathtext.py: E221
38+
lib/matplotlib/_mathtext_data.py: E203
3939
lib/matplotlib/backends/backend_template.py: F401
4040
lib/matplotlib/mathtext.py: E221
4141
lib/matplotlib/pylab.py: F401, F403
4242
lib/matplotlib/pyplot.py: F811
4343
lib/matplotlib/tests/test_mathtext.py: E501
44-
lib/matplotlib/transforms.py: E201, E202, E203
44+
lib/matplotlib/transforms.py: E201, E202
4545
lib/matplotlib/tri/_triinterpolate.py: E201, E221
4646
lib/mpl_toolkits/axes_grid1/axes_size.py: E272
4747
lib/mpl_toolkits/axisartist/angle_helper.py: E221
48+
lib/mpl_toolkits/mplot3d/proj3d.py: E201
4849

4950
doc/conf.py: E402
5051
galleries/users_explain/quick_start.py: E402

.github/ISSUE_TEMPLATE/tag_proposal.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Tag Proposal
33
description: Suggest a new tag or subcategory for the gallery of examples
44
title: "[Tag]: "
5-
labels: [Tag proposal]
5+
labels: ["Documentation: tags"]
66
body:
77
- type: markdown
88
attributes:

.github/labeler.yml

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
- 'doc/conf.py'
9090
- 'doc/Makefile'
9191
- 'doc/make.bat'
92+
- 'doc/sphinxext/**'
9293
"Documentation: devdocs":
9394
- changed-files:
9495
- any-glob-to-any-file:

.github/workflows/cibuildwheel.yml

+45-17
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/setup-python@v5
4747
name: Install Python
4848
with:
49-
python-version: 3.9
49+
python-version: '3.10'
5050

5151
# Something changed somewhere that prevents the downloaded-at-build-time
5252
# licenses from being included in built wheels, so pre-download them so
@@ -100,7 +100,15 @@ jobs:
100100
CIBW_AFTER_BUILD: >-
101101
twine check {wheel} &&
102102
python {package}/ci/check_wheel_licenses.py {wheel}
103-
CIBW_CONFIG_SETTINGS: setup-args="--vsenv"
103+
# On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
104+
# MinGW on PATH that would be picked otherwise), switch to a static build for
105+
# runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
106+
# and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
107+
# keeping shared state with the rest of the Python process/extensions.
108+
CIBW_CONFIG_SETTINGS_WINDOWS: >-
109+
setup-args="--vsenv"
110+
setup-args="-Db_vscrt=mt"
111+
setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
104112
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
105113
CIBW_SKIP: "*-musllinux_aarch64"
106114
CIBW_TEST_COMMAND: >-
@@ -134,46 +142,66 @@ jobs:
134142
name: cibw-sdist
135143
path: dist/
136144

145+
- name: Build wheels for CPython 3.13
146+
uses: pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
147+
with:
148+
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149+
env:
150+
CIBW_BUILD: "cp313-* cp313t-*"
151+
# No free-threading wheels for NumPy; musllinux skipped for main builds also.
152+
CIBW_SKIP: "cp313t-win_amd64 *-musllinux_aarch64"
153+
CIBW_BUILD_FRONTEND:
154+
"pip; args: --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
155+
CIBW_FREE_THREADED_SUPPORT: true
156+
# No free-threading wheels available for aarch64 on Pillow.
157+
CIBW_TEST_SKIP: "cp313t-manylinux_aarch64"
158+
# We need pre-releases to get the nightly wheels.
159+
CIBW_BEFORE_TEST: >-
160+
pip install --pre
161+
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
162+
contourpy numpy pillow
163+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
164+
137165
- name: Build wheels for CPython 3.12
138-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
166+
uses: pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
139167
with:
140168
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
141169
env:
142170
CIBW_BUILD: "cp312-*"
143171
CIBW_ARCHS: ${{ matrix.cibw_archs }}
144172

145173
- name: Build wheels for CPython 3.11
146-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
174+
uses: pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
147175
with:
148176
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149177
env:
150178
CIBW_BUILD: "cp311-*"
151179
CIBW_ARCHS: ${{ matrix.cibw_archs }}
152180

153181
- name: Build wheels for CPython 3.10
154-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
182+
uses: pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
155183
with:
156184
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
157185
env:
158186
CIBW_BUILD: "cp310-*"
159187
CIBW_ARCHS: ${{ matrix.cibw_archs }}
160188

161-
- name: Build wheels for CPython 3.9
162-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
163-
with:
164-
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
165-
env:
166-
CIBW_BUILD: "cp39-*"
167-
CIBW_ARCHS: ${{ matrix.cibw_archs }}
168-
169189
- name: Build wheels for PyPy
170-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
190+
uses: pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
171191
with:
172192
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173193
env:
174-
CIBW_BUILD: "pp39-*"
194+
CIBW_BUILD: "pp310-*"
175195
CIBW_ARCHS: ${{ matrix.cibw_archs }}
176-
if: matrix.cibw_archs != 'aarch64'
196+
# Work around for https://github.com/pypa/setuptools/issues/4571
197+
# This can be removed once kiwisolver has wheels for PyPy 3.10
198+
# https://github.com/nucleic/kiwi/pull/182
199+
CIBW_BEFORE_TEST: >-
200+
export PIP_CONSTRAINT=pypy-constraint.txt &&
201+
echo "setuptools!=72.2.0" > $PIP_CONSTRAINT &&
202+
pip install kiwisolver &&
203+
unset PIP_CONSTRAINT
204+
if: matrix.cibw_archs != 'aarch64' && matrix.os != 'windows-latest'
177205

178206
- uses: actions/upload-artifact@v4
179207
with:
@@ -203,7 +231,7 @@ jobs:
203231
run: ls dist
204232

205233
- name: Generate artifact attestation for sdist and wheel
206-
uses: actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2
234+
uses: actions/attest-build-provenance@310b0a4a3b0b78ef57ecda988ee04b132db73ef8 # v1.4.1
207235
with:
208236
subject-path: dist/matplotlib-*
209237

.github/workflows/circleci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "CircleCI artifact handling"
33
on: [status]
44
jobs:
55
circleci_artifacts_redirector_job:
6-
if: "${{ github.event.context == 'ci/circleci: docs-python39' }}"
6+
if: "${{ github.event.context == 'ci/circleci: docs-python3' }}"
77
permissions:
88
statuses: write
99
runs-on: ubuntu-latest
@@ -16,11 +16,11 @@ jobs:
1616
repo-token: ${{ secrets.GITHUB_TOKEN }}
1717
api-token: ${{ secrets.CIRCLECI_TOKEN }}
1818
artifact-path: 0/doc/build/html/index.html
19-
circleci-jobs: docs-python39
19+
circleci-jobs: docs-python3
2020
job-title: View the built docs
2121

2222
post_warnings_as_review:
23-
if: "${{ github.event.context == 'ci/circleci: docs-python39' }}"
23+
if: "${{ github.event.context == 'ci/circleci: docs-python3' }}"
2424
permissions:
2525
contents: read
2626
checks: write

.github/workflows/cygwin.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ jobs:
4949
test-cygwin:
5050
runs-on: windows-latest
5151
name: Python 3.${{ matrix.python-minor-version }} on Cygwin
52+
# Enable these when Cygwin has Python 3.12.
5253
if: >-
5354
github.event_name == 'workflow_dispatch' ||
54-
github.event_name == 'schedule' ||
55+
(false && github.event_name == 'schedule') ||
5556
(
57+
false &&
5658
github.repository == 'matplotlib/matplotlib' &&
5759
!contains(github.event.head_commit.message, '[ci skip]') &&
5860
!contains(github.event.head_commit.message, '[skip ci]') &&
@@ -72,7 +74,7 @@ jobs:
7274
)
7375
strategy:
7476
matrix:
75-
python-minor-version: [9]
77+
python-minor-version: [12]
7678

7779
steps:
7880
- name: Fix line endings

.github/workflows/mypy-stubtest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Python 3
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.9
19+
python-version: '3.10'
2020

2121
- name: Set up reviewdog
2222
uses: reviewdog/action-setup@v1
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
set -o pipefail
3232
tox -e stubtest | \
33-
sed -e "s!.tox/stubtest/lib/python3.9/site-packages!lib!g" | \
33+
sed -e "s!.tox/stubtest/lib/python3.10/site-packages!lib!g" | \
3434
reviewdog \
3535
-efm '%Eerror: %m' \
3636
-efm '%CStub: in file %f:%l' \

.github/workflows/reviewdog.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python 3
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.9
20+
python-version: '3.10'
2121

2222
- name: Install flake8
2323
run: pip3 install -r requirements/testing/flake8.txt
@@ -42,7 +42,7 @@ jobs:
4242
- name: Set up Python 3
4343
uses: actions/setup-python@v5
4444
with:
45-
python-version: 3.9
45+
python-version: '3.10'
4646

4747
- name: Install mypy
4848
run: pip3 install -r requirements/testing/mypy.txt -r requirements/testing/all.txt

0 commit comments

Comments
 (0)