Skip to content

Commit 4ba3d18

Browse files
authored
Merge branch 'main' into cf-compiler
2 parents caf5111 + 9130caf commit 4ba3d18

File tree

861 files changed

+65738
-34402
lines changed

Some content is hidden

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

861 files changed

+65738
-34402
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -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://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage
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+
20+
https://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage
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

+41-35
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,20 @@ jobs:
3434
'CI: Run cibuildwheel')
3535
)
3636
name: Build sdist
37-
runs-on: ubuntu-20.04
37+
runs-on: ubuntu-latest
3838
outputs:
3939
SDIST_NAME: ${{ steps.sdist.outputs.SDIST_NAME }}
4040

4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4343
with:
4444
fetch-depth: 0
45+
persist-credentials: false
4546

46-
- uses: actions/setup-python@v5
47+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4748
name: Install Python
4849
with:
49-
python-version: 3.9
50+
python-version: '3.10'
5051

5152
# Something changed somewhere that prevents the downloaded-at-build-time
5253
# licenses from being included in built wheels, so pre-download them so
@@ -69,7 +70,7 @@ jobs:
6970
run: twine check dist/*
7071

7172
- name: Upload sdist result
72-
uses: actions/upload-artifact@v4
73+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
7374
with:
7475
name: cibw-sdist
7576
path: dist/*.tar.gz
@@ -100,82 +101,87 @@ jobs:
100101
CIBW_AFTER_BUILD: >-
101102
twine check {wheel} &&
102103
python {package}/ci/check_wheel_licenses.py {wheel}
103-
CIBW_CONFIG_SETTINGS: setup-args="--vsenv"
104+
# On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
105+
# MinGW on PATH that would be picked otherwise), switch to a static build for
106+
# runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
107+
# and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
108+
# keeping shared state with the rest of the Python process/extensions.
109+
CIBW_CONFIG_SETTINGS_WINDOWS: >-
110+
setup-args="--vsenv"
111+
setup-args="-Db_vscrt=mt"
112+
setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
104113
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
105114
CIBW_SKIP: "*-musllinux_aarch64"
106115
CIBW_TEST_COMMAND: >-
107116
python {package}/ci/check_version_number.py
108117
MACOSX_DEPLOYMENT_TARGET: "10.12"
109-
MPL_DISABLE_FH4: "yes"
110118
strategy:
111119
matrix:
112120
include:
113-
- os: ubuntu-20.04
121+
- os: ubuntu-latest
114122
cibw_archs: "x86_64"
115-
- os: ubuntu-20.04
123+
- os: ubuntu-24.04-arm
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"
123131

124132
steps:
125-
- name: Set up QEMU
126-
if: matrix.cibw_archs == 'aarch64'
127-
uses: docker/setup-qemu-action@v3
128-
with:
129-
platforms: arm64
130-
131133
- name: Download sdist
132-
uses: actions/download-artifact@v4
134+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
133135
with:
134136
name: cibw-sdist
135137
path: dist/
136138

139+
- name: Build wheels for CPython 3.13
140+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
141+
with:
142+
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
143+
env:
144+
CIBW_BUILD: "cp313-* cp313t-*"
145+
CIBW_ENABLE: cpython-freethreading
146+
# No free-threading wheels available for aarch64 on Pillow.
147+
CIBW_TEST_SKIP: "cp313t-manylinux_aarch64"
148+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
149+
137150
- name: Build wheels for CPython 3.12
138-
uses: pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
151+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
139152
with:
140153
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
141154
env:
142155
CIBW_BUILD: "cp312-*"
143156
CIBW_ARCHS: ${{ matrix.cibw_archs }}
144157

145158
- name: Build wheels for CPython 3.11
146-
uses: pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
159+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
147160
with:
148161
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149162
env:
150163
CIBW_BUILD: "cp311-*"
151164
CIBW_ARCHS: ${{ matrix.cibw_archs }}
152165

153166
- name: Build wheels for CPython 3.10
154-
uses: pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
167+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
155168
with:
156169
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
157170
env:
158171
CIBW_BUILD: "cp310-*"
159172
CIBW_ARCHS: ${{ matrix.cibw_archs }}
160173

161-
- name: Build wheels for CPython 3.9
162-
uses: pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.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-
169174
- name: Build wheels for PyPy
170-
uses: pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
175+
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
171176
with:
172177
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173178
env:
174-
CIBW_BUILD: "pp39-*"
179+
CIBW_BUILD: "pp310-*"
175180
CIBW_ARCHS: ${{ matrix.cibw_archs }}
176-
if: matrix.cibw_archs != 'aarch64'
181+
CIBW_ENABLE: pypy
182+
if: matrix.cibw_archs != 'aarch64' && matrix.os != 'windows-latest'
177183

178-
- uses: actions/upload-artifact@v4
184+
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
179185
with:
180186
name: cibw-wheels-${{ runner.os }}-${{ matrix.cibw_archs }}
181187
path: ./wheelhouse/*.whl
@@ -193,7 +199,7 @@ jobs:
193199
contents: read
194200
steps:
195201
- name: Download packages
196-
uses: actions/download-artifact@v4
202+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
197203
with:
198204
pattern: cibw-*
199205
path: dist
@@ -203,9 +209,9 @@ jobs:
203209
run: ls dist
204210

205211
- name: Generate artifact attestation for sdist and wheel
206-
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
212+
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
207213
with:
208214
subject-path: dist/matplotlib-*
209215

210216
- name: Publish package distributions to PyPI
211-
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
217+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

0 commit comments

Comments
 (0)