Skip to content

Commit 03ccff6

Browse files
authored
Merge branch 'main' into clf_subplots_adjust
2 parents e39db47 + eec68e4 commit 03ccff6

File tree

743 files changed

+35193
-30471
lines changed

Some content is hidden

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

743 files changed

+35193
-30471
lines changed

.appveyor.yml

+17-22
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# With infos from
22
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
33
# https://packaging.python.org/en/latest/appveyor/
4-
# https://github.com/rmcgibbo/python-appveyor-conda-example
54
---
65

76
# Backslashes in quotes need to be escaped: \ -> "\\"
@@ -18,7 +17,7 @@ skip_commits:
1817

1918
clone_depth: 50
2019

21-
image: Visual Studio 2017
20+
image: Visual Studio 2019
2221

2322
environment:
2423

@@ -30,7 +29,6 @@ environment:
3029

3130
matrix:
3231
- PYTHON_VERSION: "3.11"
33-
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
3432
TEST_ALL: "yes"
3533

3634
# We always use a 64-bit machine, but can build x86 distributions
@@ -46,24 +44,21 @@ cache:
4644
- '%USERPROFILE%\.cache\matplotlib'
4745

4846
init:
49-
- echo %PYTHON_VERSION% %CONDA_INSTALL_LOCN%
47+
- ps:
48+
Invoke-Webrequest
49+
-URI https://micro.mamba.pm/api/micromamba/win-64/latest
50+
-OutFile C:\projects\micromamba.tar.bz2
51+
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar.bz2 -aoa -oC:\projects\
52+
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar -ttar -aoa -oC:\projects\
53+
- 'set PATH=C:\projects\Library\bin;%PATH%'
54+
- micromamba shell init --shell cmd.exe
55+
- micromamba config set always_yes true
56+
- micromamba config prepend channels conda-forge
57+
- micromamba info
5058

5159
install:
52-
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
53-
- conda config --set always_yes true
54-
- conda config --set show_channel_urls yes
55-
- conda config --prepend channels conda-forge
56-
57-
# For building, use a new environment
58-
# Add python version to environment
59-
# `^ ` escapes spaces for indentation
60-
- echo ^ ^ - python=%PYTHON_VERSION% >> environment.yml
61-
- conda env create -f environment.yml
62-
- activate mpl-dev
63-
- conda install -c conda-forge pywin32
64-
- echo %PYTHON_VERSION% %TARGET_ARCH%
65-
# Show the installed packages + versions
66-
- conda list
60+
- micromamba env create -f environment.yml python=%PYTHON_VERSION% pywin32
61+
- micromamba activate mpl-dev
6762

6863
test_script:
6964
# Now build the thing..
@@ -74,7 +69,7 @@ test_script:
7469
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
7570

7671
# this are optional dependencies so that we don't skip so many tests...
77-
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape
72+
- if x%TEST_ALL% == xyes micromamba install -q ffmpeg inkscape
7873
# miktex is available on conda, but seems to fail with permission errors.
7974
# missing packages on conda-forge for imagemagick
8075
# This install sometimes failed randomly :-(
@@ -95,8 +90,8 @@ artifacts:
9590
type: Zip
9691

9792
on_finish:
98-
- conda install codecov
99-
- codecov -e PYTHON_VERSION PLATFORM -n "$PYTHON_VERSION Windows"
93+
- micromamba install codecov
94+
- codecov -e PYTHON_VERSION PLATFORM -n "%PYTHON_VERSION% Windows"
10095

10196
on_failure:
10297
# Generate a html for visual tests

.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/bug_report.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ body:
1515
attributes:
1616
label: Code for reproduction
1717
description: >-
18-
If possible, please provide a minimum self-contained example.
18+
If possible, please provide a minimum self-contained example. If you
19+
have used generative AI as an aid see
20+
https://dev.matplotlib.org/devel/contributing.html#generative_ai.
1921
placeholder: Paste your code here. This field is automatically formatted as Python code.
2022
render: Python
2123
validations:

.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/PULL_REQUEST_TEMPLATE.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ out the development guide https://matplotlib.org/devdocs/devel/index.html
44
-->
55

66
## PR summary
7-
<!-- Please provide at least 1-2 sentences describing the pull request in detail
8-
(Why is this change required? What problem does it solve?) and link to relevant
9-
issues and PRs.
7+
<!-- Please describe the pull request, using the questions below as guidance, and link to any relevant issues and PRs:
108
11-
Also please summarize the changes in the title, for example "Raise ValueError on
9+
- Why is this change necessary?
10+
- What problem does it solve?
11+
- What is the reasoning for this implementation?
12+
13+
Additionally, please summarize the changes in the title, for example "Raise ValueError on
1214
non-numeric input to set_xlim" and avoid non-descriptive titles such as "Addresses
1315
issue #8576".
16+
17+
If possible, please provide a minimum self-contained example. If you have used
18+
generative AI as an aid in preparing this PR, see
19+
https://dev.matplotlib.org/devel/contributing.html#generative_ai.
20+
1421
-->
1522

1623

.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-19
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: >-
@@ -116,7 +124,7 @@ jobs:
116124
cibw_archs: "aarch64"
117125
- os: windows-latest
118126
cibw_archs: "auto64"
119-
- os: macos-12
127+
- os: macos-13
120128
cibw_archs: "x86_64"
121129
- os: macos-14
122130
cibw_archs: "arm64"
@@ -134,46 +142,64 @@ jobs:
134142
name: cibw-sdist
135143
path: dist/
136144

145+
- name: Build wheels for CPython 3.13
146+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
147+
with:
148+
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149+
env:
150+
CIBW_BUILD: "cp313-* cp313t-*"
151+
CIBW_BUILD_FRONTEND:
152+
"pip; args: --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
153+
CIBW_FREE_THREADED_SUPPORT: true
154+
# No free-threading wheels available for aarch64 on Pillow.
155+
CIBW_TEST_SKIP: "cp313t-manylinux_aarch64"
156+
# We need pre-releases to get the nightly wheels.
157+
CIBW_BEFORE_TEST: >-
158+
pip install --pre
159+
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
160+
contourpy numpy pillow
161+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
162+
137163
- name: Build wheels for CPython 3.12
138-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
164+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
139165
with:
140166
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
141167
env:
142168
CIBW_BUILD: "cp312-*"
143169
CIBW_ARCHS: ${{ matrix.cibw_archs }}
144170

145171
- name: Build wheels for CPython 3.11
146-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
172+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
147173
with:
148174
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149175
env:
150176
CIBW_BUILD: "cp311-*"
151177
CIBW_ARCHS: ${{ matrix.cibw_archs }}
152178

153179
- name: Build wheels for CPython 3.10
154-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
180+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
155181
with:
156182
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
157183
env:
158184
CIBW_BUILD: "cp310-*"
159185
CIBW_ARCHS: ${{ matrix.cibw_archs }}
160186

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-
169187
- name: Build wheels for PyPy
170-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
188+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
171189
with:
172190
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173191
env:
174-
CIBW_BUILD: "pp39-*"
192+
CIBW_BUILD: "pp310-*"
175193
CIBW_ARCHS: ${{ matrix.cibw_archs }}
176-
if: matrix.cibw_archs != 'aarch64'
194+
# Work around for https://github.com/pypa/setuptools/issues/4571
195+
# This can be removed once kiwisolver has wheels for PyPy 3.10
196+
# https://github.com/nucleic/kiwi/pull/182
197+
CIBW_BEFORE_TEST: >-
198+
export PIP_CONSTRAINT=pypy-constraint.txt &&
199+
echo "setuptools!=72.2.0" > $PIP_CONSTRAINT &&
200+
pip install kiwisolver &&
201+
unset PIP_CONSTRAINT
202+
if: matrix.cibw_archs != 'aarch64' && matrix.os != 'windows-latest'
177203

178204
- uses: actions/upload-artifact@v4
179205
with:
@@ -203,9 +229,9 @@ jobs:
203229
run: ls dist
204230

205231
- name: Generate artifact attestation for sdist and wheel
206-
uses: actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2
232+
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1.4.4
207233
with:
208234
subject-path: dist/matplotlib-*
209235

210236
- name: Publish package distributions to PyPI
211-
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
237+
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2

.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-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ on:
2929
# 5:47 UTC on Saturdays
3030
- cron: "47 5 * * 6"
3131
workflow_dispatch:
32-
workflow: "*"
3332

3433
permissions:
3534
contents: read
@@ -49,10 +48,12 @@ jobs:
4948
test-cygwin:
5049
runs-on: windows-latest
5150
name: Python 3.${{ matrix.python-minor-version }} on Cygwin
51+
# Enable these when Cygwin has Python 3.12.
5252
if: >-
5353
github.event_name == 'workflow_dispatch' ||
54-
github.event_name == 'schedule' ||
54+
(false && github.event_name == 'schedule') ||
5555
(
56+
false &&
5657
github.repository == 'matplotlib/matplotlib' &&
5758
!contains(github.event.head_commit.message, '[ci skip]') &&
5859
!contains(github.event.head_commit.message, '[skip ci]') &&
@@ -72,7 +73,7 @@ jobs:
7273
)
7374
strategy:
7475
matrix:
75-
python-minor-version: [9]
76+
python-minor-version: [12]
7677

7778
steps:
7879
- 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' \

0 commit comments

Comments
 (0)