Skip to content

Commit 19daf49

Browse files
committed
Merge branch 'main' into output-base-name
2 parents f94a932 + 5503774 commit 19daf49

File tree

749 files changed

+33985
-24962
lines changed

Some content is hidden

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

749 files changed

+33985
-24962
lines changed

.appveyor.yml

Lines changed: 16 additions & 21 deletions
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+
# Pinned due to https://github.com/mamba-org/mamba/issues/3467
49+
Invoke-Webrequest
50+
-URI https://github.com/mamba-org/micromamba-releases/releases/download/1.5.10-0/micromamba-win-64.tar.bz2
51+
-OutFile C:\projects\micromamba.tar.bz2
52+
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar.bz2 -aoa -oC:\projects\
53+
- ps: C:\PROGRA~1\7-Zip\7z.exe x C:\projects\micromamba.tar -ttar -aoa -oC:\projects\
54+
- 'set PATH=C:\projects\Library\bin;%PATH%'
55+
- micromamba shell init --shell cmd.exe
56+
- micromamba config set always_yes true
57+
- micromamba config prepend channels conda-forge
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,7 +90,7 @@ artifacts:
9590
type: Zip
9691

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

10196
on_failure:

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ 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
105105
command: |
106-
python -m pip install --user meson-python numpy pybind11 setuptools-scm
106+
python -m pip install --user -r requirements/dev/build-requirements.txt
107107
python -m pip install --user \
108108
numpy<< parameters.numpy_version >> \
109109
-r requirements/doc/doc-requirements.txt
@@ -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

Lines changed: 4 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 54 additions & 29 deletions
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,11 +100,20 @@ 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: >-
107115
python {package}/ci/check_version_number.py
116+
MACOSX_DEPLOYMENT_TARGET: "10.12"
108117
MPL_DISABLE_FH4: "yes"
109118
strategy:
110119
matrix:
@@ -115,16 +124,10 @@ jobs:
115124
cibw_archs: "aarch64"
116125
- os: windows-latest
117126
cibw_archs: "auto64"
118-
- os: macos-11
127+
- os: macos-12
119128
cibw_archs: "x86_64"
120-
# NOTE: macos_target can be moved back into global environment after
121-
# meson-python 0.16.0 is released.
122-
macos_target: "10.12"
123129
- os: macos-14
124130
cibw_archs: "arm64"
125-
# NOTE: macos_target can be moved back into global environment after
126-
# meson-python 0.16.0 is released.
127-
macos_target: "11.0"
128131

129132
steps:
130133
- name: Set up QEMU
@@ -139,51 +142,66 @@ jobs:
139142
name: cibw-sdist
140143
path: dist/
141144

145+
- name: Build wheels for CPython 3.13
146+
uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
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+
142165
- name: Build wheels for CPython 3.12
143-
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
166+
uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
144167
with:
145168
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
146169
env:
147170
CIBW_BUILD: "cp312-*"
148171
CIBW_ARCHS: ${{ matrix.cibw_archs }}
149-
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
150172

151173
- name: Build wheels for CPython 3.11
152-
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
174+
uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
153175
with:
154176
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
155177
env:
156178
CIBW_BUILD: "cp311-*"
157179
CIBW_ARCHS: ${{ matrix.cibw_archs }}
158-
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
159180

160181
- name: Build wheels for CPython 3.10
161-
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
182+
uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
162183
with:
163184
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
164185
env:
165186
CIBW_BUILD: "cp310-*"
166187
CIBW_ARCHS: ${{ matrix.cibw_archs }}
167-
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
168-
169-
- name: Build wheels for CPython 3.9
170-
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
171-
with:
172-
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173-
env:
174-
CIBW_BUILD: "cp39-*"
175-
CIBW_ARCHS: ${{ matrix.cibw_archs }}
176-
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
177188

178189
- name: Build wheels for PyPy
179-
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
190+
uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
180191
with:
181192
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
182193
env:
183-
CIBW_BUILD: "pp39-*"
194+
CIBW_BUILD: "pp310-*"
184195
CIBW_ARCHS: ${{ matrix.cibw_archs }}
185-
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
186-
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'
187205

188206
- uses: actions/upload-artifact@v4
189207
with:
@@ -199,6 +217,8 @@ jobs:
199217
environment: release
200218
permissions:
201219
id-token: write
220+
attestations: write
221+
contents: read
202222
steps:
203223
- name: Download packages
204224
uses: actions/download-artifact@v4
@@ -210,5 +230,10 @@ jobs:
210230
- name: Print out packages
211231
run: ls dist
212232

233+
- name: Generate artifact attestation for sdist and wheel
234+
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
235+
with:
236+
subject-path: dist/matplotlib-*
237+
213238
- name: Publish package distributions to PyPI
214-
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
239+
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3

.github/workflows/circleci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@ 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
1010
name: Run CircleCI artifacts redirector
1111
steps:
1212
- name: GitHub Action step
13-
uses: larsoner/circleci-artifacts-redirector-action@master
13+
uses:
14+
scientific-python/circleci-artifacts-redirector-action@4e13a10d89177f4bfc8007a7064bdbeda848d8d1 # v1.0.0
1415
with:
1516
repo-token: ${{ secrets.GITHUB_TOKEN }}
1617
api-token: ${{ secrets.CIRCLECI_TOKEN }}
1718
artifact-path: 0/doc/build/html/index.html
18-
circleci-jobs: docs-python39
19+
circleci-jobs: docs-python3
1920
job-title: View the built docs
2021

2122
post_warnings_as_review:
22-
if: "${{ github.event.context == 'ci/circleci: docs-python39' }}"
23+
if: "${{ github.event.context == 'ci/circleci: docs-python3' }}"
2324
permissions:
2425
contents: read
2526
checks: write

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
uses: github/codeql-action/init@v3
3333
with:
3434
languages: ${{ matrix.language }}
35-
setup-python-dependencies: false
3635

3736
- name: Build compiled code
3837
if: matrix.language == 'c-cpp'

.github/workflows/conflictcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Check if PRs have merge conflicts
20-
uses: eps1lon/actions-label-merge-conflict@e62d7a53ff8be8b97684bffb6cfbbf3fc1115e2e # v3.0.0
20+
uses: eps1lon/actions-label-merge-conflict@1b1b1fcde06a9b3d089f3464c96417961dde1168 # v3.0.2
2121
with:
2222
dirtyLabel: "status: needs rebase"
2323
repoToken: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)