Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99fc29f

Browse files
Merge branch 'matplotlib:main' into main
2 parents 0e7f73d + a04e35f commit 99fc29f

File tree

111 files changed

+2304
-1304
lines changed

Some content is hidden

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

111 files changed

+2304
-1304
lines changed

.appveyor.yml

Lines changed: 14 additions & 20 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: \ -> "\\"
@@ -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,20 @@ 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
5057

5158
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
59+
- micromamba env create -f environment.yml python=%PYTHON_VERSION% pywin32
60+
- micromamba activate mpl-dev
6761

6862
test_script:
6963
# Now build the thing..
@@ -74,7 +68,7 @@ test_script:
7468
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
7569

7670
# this are optional dependencies so that we don't skip so many tests...
77-
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape
71+
- if x%TEST_ALL% == xyes micromamba install -q ffmpeg inkscape
7872
# miktex is available on conda, but seems to fail with permission errors.
7973
# missing packages on conda-forge for imagemagick
8074
# This install sometimes failed randomly :-(
@@ -95,7 +89,7 @@ artifacts:
9589
type: Zip
9690

9791
on_finish:
98-
- conda install codecov
92+
- micromamba install codecov
9993
- codecov -e PYTHON_VERSION PLATFORM -n "$PYTHON_VERSION Windows"
10094

10195
on_failure:

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ commands:
216216
#
217217

218218
jobs:
219-
docs-python39:
219+
docs-python310:
220220
docker:
221-
- image: cimg/python:3.9
221+
- image: cimg/python:3.10
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-python310

.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/workflows/cibuildwheel.yml

Lines changed: 8 additions & 16 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
@@ -135,45 +135,37 @@ jobs:
135135
path: dist/
136136

137137
- name: Build wheels for CPython 3.12
138-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
138+
uses: pypa/cibuildwheel@7e5a838a63ac8128d71ab2dfd99e4634dd1bca09 # v2.19.2
139139
with:
140140
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
141141
env:
142142
CIBW_BUILD: "cp312-*"
143143
CIBW_ARCHS: ${{ matrix.cibw_archs }}
144144

145145
- name: Build wheels for CPython 3.11
146-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
146+
uses: pypa/cibuildwheel@7e5a838a63ac8128d71ab2dfd99e4634dd1bca09 # v2.19.2
147147
with:
148148
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149149
env:
150150
CIBW_BUILD: "cp311-*"
151151
CIBW_ARCHS: ${{ matrix.cibw_archs }}
152152

153153
- name: Build wheels for CPython 3.10
154-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
154+
uses: pypa/cibuildwheel@7e5a838a63ac8128d71ab2dfd99e4634dd1bca09 # v2.19.2
155155
with:
156156
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
157157
env:
158158
CIBW_BUILD: "cp310-*"
159159
CIBW_ARCHS: ${{ matrix.cibw_archs }}
160160

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-
169161
- name: Build wheels for PyPy
170-
uses: pypa/cibuildwheel@932529cab190fafca8c735a551657247fa8f8eaf # v2.19.1
162+
uses: pypa/cibuildwheel@7e5a838a63ac8128d71ab2dfd99e4634dd1bca09 # v2.19.2
171163
with:
172164
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173165
env:
174-
CIBW_BUILD: "pp39-*"
166+
CIBW_BUILD: "pp310-*"
175167
CIBW_ARCHS: ${{ matrix.cibw_archs }}
176-
if: matrix.cibw_archs != 'aarch64'
168+
if: matrix.cibw_archs != 'aarch64' && matrix.os != 'windows-latest'
177169

178170
- uses: actions/upload-artifact@v4
179171
with:
@@ -203,7 +195,7 @@ jobs:
203195
run: ls dist
204196

205197
- name: Generate artifact attestation for sdist and wheel
206-
uses: actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2
198+
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
207199
with:
208200
subject-path: dist/matplotlib-*
209201

.github/workflows/circleci.yml

Lines changed: 3 additions & 3 deletions
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-python310' }}"
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-python310
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-python310' }}"
2424
permissions:
2525
contents: read
2626
checks: write

.github/workflows/cygwin.yml

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

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

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

.github/workflows/tests.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,28 @@ jobs:
5050
include:
5151
- name-suffix: "(Minimum Versions)"
5252
os: ubuntu-20.04
53-
python-version: 3.9
53+
python-version: '3.10'
5454
extra-requirements: '-c requirements/testing/minver.txt'
55-
pyqt5-ver: '==5.12.2 sip==5.0.0' # oldest versions with a Py3.9 wheel.
56-
pyqt6-ver: '==6.1.0 PyQt6-Qt6==6.1.0'
57-
pyside2-ver: '==5.15.1' # oldest version with working Py3.9 wheel.
58-
pyside6-ver: '==6.0.0'
5955
delete-font-cache: true
56+
# Oldest versions with Py3.10 wheels.
57+
pyqt5-ver: '==5.15.5 sip==6.3.0'
58+
pyqt6-ver: '==6.2.0 PyQt6-Qt6==6.2.0'
59+
pyside2-ver: '==5.15.2.1'
60+
pyside6-ver: '==6.2.0'
6061
- os: ubuntu-20.04
61-
python-version: 3.9
62+
python-version: '3.10'
6263
# One CI run tests ipython/matplotlib-inline before backend mapping moved to mpl
63-
extra-requirements: '-r requirements/testing/extra.txt "ipython==7.19" "matplotlib-inline<0.1.7"'
64+
extra-requirements:
65+
-r requirements/testing/extra.txt
66+
"ipython==7.29.0"
67+
"ipykernel==5.5.6"
68+
"matplotlib-inline<0.1.7"
6469
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
6570
# https://github.com/matplotlib/matplotlib/pull/26052#issuecomment-1574595954
6671
# https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html
6772
pyqt6-ver: '!=6.5.1,!=6.6.0'
6873
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
6974
pyside6-ver: '!=6.5.1'
70-
- os: ubuntu-20.04
71-
python-version: '3.10'
72-
extra-requirements: '-r requirements/testing/extra.txt'
73-
# https://github.com/matplotlib/matplotlib/pull/26052#issuecomment-1574595954
74-
# https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html
75-
pyqt6-ver: '!=6.5.1,!=6.6.0'
76-
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
77-
pyside6-ver: '!=6.5.1'
7875
- os: ubuntu-22.04
7976
python-version: '3.11'
8077
# https://www.riverbankcomputing.com/pipermail/pyqt/2023-November/045606.html
@@ -88,8 +85,8 @@ jobs:
8885
pyqt6-ver: '!=6.6.0'
8986
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
9087
pyside6-ver: '!=6.5.1'
91-
- os: macos-12 # This runnre is on Intel chips.
92-
python-version: 3.9
88+
- os: macos-12 # This runner is on Intel chips.
89+
python-version: '3.10'
9390
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
9491
pyside6-ver: '!=6.5.1'
9592
- os: macos-14 # This runner is on M1 (arm64) chips.

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exclude: |
1414
)
1515
repos:
1616
- repo: https://github.com/pre-commit/pre-commit-hooks
17-
rev: v4.5.0
17+
rev: v4.6.0
1818
hooks:
1919
- id: check-added-large-files
2020
- id: check-docstring-first
@@ -28,7 +28,7 @@ repos:
2828
- id: trailing-whitespace
2929
exclude_types: [svg]
3030
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.9.0
31+
rev: v1.10.1
3232
hooks:
3333
- id: mypy
3434
additional_dependencies:
@@ -42,7 +42,7 @@ repos:
4242
files: lib/matplotlib # Only run when files in lib/matplotlib are changed.
4343
pass_filenames: false
4444
- repo: https://github.com/pycqa/flake8
45-
rev: 7.0.0
45+
rev: 7.1.0
4646
hooks:
4747
- id: flake8
4848
additional_dependencies:
@@ -51,7 +51,7 @@ repos:
5151
- flake8-force
5252
args: ["--docstring-convention=all"]
5353
- repo: https://github.com/codespell-project/codespell
54-
rev: v2.2.6
54+
rev: v2.3.0
5555
hooks:
5656
- id: codespell
5757
files: ^.*\.(py|c|cpp|h|m|md|rst|yml)$
@@ -79,7 +79,7 @@ repos:
7979
- id: yamllint
8080
args: ["--strict", "--config-file=.yamllint.yml"]
8181
- repo: https://github.com/python-jsonschema/check-jsonschema
82-
rev: 0.28.4
82+
rev: 0.28.6
8383
hooks:
8484
# TODO: Re-enable this when https://github.com/microsoft/azure-pipelines-vscode/issues/567 is fixed.
8585
# - id: check-azure-pipelines

azure-pipelines.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,20 @@ stages:
4949
- job: Pytest
5050
strategy:
5151
matrix:
52-
Linux_py39:
53-
vmImage: 'ubuntu-20.04' # keep one job pinned to the oldest image
54-
python.version: '3.9'
5552
Linux_py310:
56-
vmImage: 'ubuntu-latest'
53+
vmImage: 'ubuntu-20.04' # keep one job pinned to the oldest image
5754
python.version: '3.10'
5855
Linux_py311:
5956
vmImage: 'ubuntu-latest'
6057
python.version: '3.11'
61-
macOS_py39:
62-
vmImage: 'macOS-latest'
63-
python.version: '3.9'
6458
macOS_py310:
6559
vmImage: 'macOS-latest'
6660
python.version: '3.10'
6761
macOS_py311:
6862
vmImage: 'macOS-latest'
6963
python.version: '3.11'
70-
Windows_py39:
71-
vmImage: 'windows-2019' # keep one job pinned to the oldest image
72-
python.version: '3.9'
7364
Windows_py310:
74-
vmImage: 'windows-latest'
65+
vmImage: 'windows-2019' # keep one job pinned to the oldest image
7566
python.version: '3.10'
7667
Windows_py311:
7768
vmImage: 'windows-latest'

ci/mypy-stubtest-allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ matplotlib.tri.*TriInterpolator.gradient
4646
matplotlib.backend_bases.FigureCanvasBase._T
4747
matplotlib.backend_managers.ToolManager._T
4848
matplotlib.spines.Spine._T
49+
50+
# Parameter inconsistency due to 3.10 deprecation
51+
matplotlib.figure.FigureBase.get_figure

doc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ help:
1818
clean:
1919
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2020
rm -rf "$(SOURCEDIR)/build"
21+
rm -rf "$(SOURCEDIR)/_tags"
2122
rm -rf "$(SOURCEDIR)/api/_as_gen"
2223
rm -rf "$(SOURCEDIR)/gallery"
2324
rm -rf "$(SOURCEDIR)/plot_types"

0 commit comments

Comments
 (0)