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

Skip to content

Commit 34bbb24

Browse files
authored
Merge branch 'matplotlib:main' into hasans-matplotlib/main
2 parents a7dc972 + 651a874 commit 34bbb24

File tree

97 files changed

+4526
-1015
lines changed

Some content is hidden

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

97 files changed

+4526
-1015
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ environment:
2222
--cov-report= --cov=lib --log-level=DEBUG
2323

2424
matrix:
25-
- PYTHON_VERSION: "3.8"
25+
- PYTHON_VERSION: "3.9"
2626
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
2727
TEST_ALL: "no"
28-
- PYTHON_VERSION: "3.9"
28+
- PYTHON_VERSION: "3.10"
2929
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
3030
TEST_ALL: "no"
3131

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ commands:
205205
#
206206

207207
jobs:
208-
docs-python38:
208+
docs-python39:
209209
docker:
210-
- image: cimg/python:3.8
210+
- image: cimg/python:3.9
211211
resource_class: large
212212
steps:
213213
- checkout
@@ -250,4 +250,4 @@ workflows:
250250
jobs:
251251
# NOTE: If you rename this job, then you must update the `if` condition
252252
# and `circleci-jobs` option in `.github/workflows/circleci.yml`.
253-
- docs-python38
253+
- docs-python39

.github/workflows/cibuildsdist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
strategy:
3838
matrix:
3939
os: [ubuntu-20.04]
40-
python-version: ['3.8', '3.9', '3.10', '3.11']
40+
python-version: ['3.9', '3.10', '3.11']
4141

4242
steps:
4343
- uses: actions/checkout@v3

.github/workflows/cibuildwheel.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,10 @@ jobs:
100100
MPL_DISABLE_FH4: "yes"
101101
CIBW_ARCHS: ${{ matrix.cibw_archs }}
102102

103-
- name: Build wheels for CPython 3.8
104-
uses: pypa/[email protected]
105-
env:
106-
CIBW_BUILD: "cp38-*"
107-
CIBW_SKIP: "*-musllinux*"
108-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
109-
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
110-
CIBW_BEFORE_BUILD: >-
111-
pip install certifi numpy==1.19.2 &&
112-
git clean -fxd build
113-
MPL_DISABLE_FH4: "yes"
114-
CIBW_ARCHS: ${{ matrix.cibw_archs }}
115-
116103
- name: Build wheels for PyPy
117104
uses: pypa/[email protected]
118105
env:
119-
CIBW_BUILD: "pp38-* pp39-*"
106+
CIBW_BUILD: "pp39-*"
120107
CIBW_SKIP: "*-musllinux*"
121108
CIBW_BEFORE_BUILD: >-
122109
pip install certifi oldest-supported-numpy &&

.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-python38' }}"
6+
if: "${{ github.event.context == 'ci/circleci: docs-python39' }}"
77
permissions:
88
statuses: write
99
runs-on: ubuntu-latest
@@ -14,11 +14,11 @@ jobs:
1414
with:
1515
repo-token: ${{ secrets.GITHUB_TOKEN }}
1616
artifact-path: 0/doc/build/html/index.html
17-
circleci-jobs: docs-python38
17+
circleci-jobs: docs-python39
1818
job-title: View the built docs
1919

2020
post_warnings_as_review:
21-
if: "${{ github.event.context == 'ci/circleci: docs-python38' }}"
21+
if: "${{ github.event.context == 'ci/circleci: docs-python39' }}"
2222
permissions:
2323
contents: read
2424
checks: write

.github/workflows/cygwin.yml

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
---
2+
name: Cygwin Tests
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- v[0-9]+.[0-9]+.[0-9x]+
12+
tags:
13+
- v*
14+
paths:
15+
- 'src/**'
16+
- '.github/workflows/cygwin.yml'
17+
pull_request:
18+
types:
19+
- opened
20+
- synchronize
21+
- reopened
22+
- labeled
23+
branches-ignore:
24+
- v[0-9]+.[0-9]+.[0-9x]+-doc
25+
paths:
26+
- 'src/**'
27+
- '.github/workflows/cygwin.yml'
28+
schedule:
29+
# 5:47 UTC on Saturdays
30+
- cron: "47 5 * * 6"
31+
workflow_dispatch:
32+
workflow: "*"
33+
34+
permissions:
35+
contents: read
36+
37+
env:
38+
NO_AT_BRIDGE: 1 # Necessary for GTK3 interactive test.
39+
OPENBLAS_NUM_THREADS: 1
40+
PYTHONFAULTHANDLER: 1
41+
SHELLOPTS: igncr
42+
CYGWIN_NOWINPATH: 1
43+
CHERE_INVOKING: 1
44+
TMP: /tmp
45+
TEMP: /tmp
46+
47+
jobs:
48+
49+
test-cygwin:
50+
runs-on: windows-latest
51+
name: Python 3.${{ matrix.python-minor-version }} on Cygwin
52+
if: |
53+
github.event_name == 'workflow_dispatch' ||
54+
(
55+
github.repository == 'matplotlib/matplotlib' &&
56+
!contains(github.event.head_commit.message, '[ci skip]') &&
57+
!contains(github.event.head_commit.message, '[skip ci]') &&
58+
!contains(github.event.head_commit.message, '[skip github]') &&
59+
(
60+
github.event_name == 'push' ||
61+
github.event_name == 'pull_request' &&
62+
(
63+
(
64+
github.event.action == 'labeled' &&
65+
github.event.label.name == 'Run cygwin'
66+
) ||
67+
contains(github.event.pull_request.labels.*.name, 'Run cygwin')
68+
)
69+
)
70+
)
71+
strategy:
72+
matrix:
73+
python-minor-version: [8, 9]
74+
75+
steps:
76+
- name: Fix line endings
77+
run: git config --global core.autocrlf input
78+
79+
- uses: actions/checkout@v3
80+
with:
81+
fetch-depth: 0
82+
83+
- uses: cygwin/cygwin-install-action@v2
84+
with:
85+
packages: >-
86+
ccache gcc-g++ gdb git graphviz libcairo-devel libffi-devel
87+
libgeos-devel libQt5Core-devel pkgconf libglib2.0-devel
88+
noto-cjk-fonts
89+
python3${{ matrix.python-minor-version }}-devel
90+
python3${{ matrix.python-minor-version }}-pip
91+
python3${{ matrix.python-minor-version }}-wheel
92+
python3${{ matrix.python-minor-version }}-setuptools
93+
python3${{ matrix.python-minor-version }}-cycler
94+
python3${{ matrix.python-minor-version }}-dateutil
95+
python3${{ matrix.python-minor-version }}-fonttools
96+
python3${{ matrix.python-minor-version }}-imaging
97+
python3${{ matrix.python-minor-version }}-kiwisolver
98+
python3${{ matrix.python-minor-version }}-numpy
99+
python3${{ matrix.python-minor-version }}-packaging
100+
python3${{ matrix.python-minor-version }}-pyparsing
101+
python3${{ matrix.python-minor-version }}-sip
102+
python3${{ matrix.python-minor-version }}-sphinx
103+
python-cairo-devel
104+
python3${{ matrix.python-minor-version }}-cairo
105+
python3${{ matrix.python-minor-version }}-gi
106+
python3${{ matrix.python-minor-version }}-matplotlib
107+
xorg-server-extra libxcb-icccm4 libxcb-image0
108+
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0
109+
libxcb-xinerama0
110+
make autoconf autoconf2.5 automake automake1.10 libtool m4
111+
libqhull-devel libfreetype-devel
112+
libjpeg-devel libwebp-devel
113+
114+
- name: Set runner username to root and id to 0
115+
shell: bash.exe -eo pipefail -o igncr "{0}"
116+
# GitHub Actions runs everything as Administrator. I don't
117+
# know how to test for this, so set the uid for the CI job so
118+
# that the existing unix root detection will work.
119+
run: |
120+
/bin/mkpasswd.exe -c | sed -e "s/$(id -u)/0/" >/etc/passwd
121+
122+
- name: Mark test repo safe
123+
shell: bash.exe -eo pipefail -o igncr "{0}"
124+
run: |
125+
git.exe config --global --add safe.directory /proc/cygdrive/d/a/matplotlib/matplotlib
126+
git config --global --add safe.directory /cygdrive/d/a/matplotlib/matplotlib
127+
C:/cygwin/bin/git.exe config --global --add safe.directory D:/a/matplotlib/matplotlib
128+
/usr/bin/git config --global --add safe.directory /cygdrive/d/a/matplotlib/matplotlib
129+
130+
- name: Use dash for /bin/sh
131+
shell: bash.exe -eo pipefail -o igncr "{0}"
132+
run: |
133+
ls -l /bin/sh.exe /bin/bash.exe /bin/dash.exe
134+
/bin/rm -f /bin/sh.exe || exit 1
135+
cp -sf /bin/dash.exe /bin/sh.exe || exit 1
136+
ls -l /bin/sh.exe /bin/bash.exe /bin/dash.exe
137+
# FreeType build fails with bash, succeeds with dash
138+
139+
- name: Cache pip
140+
uses: actions/cache@v3
141+
with:
142+
path: C:\cygwin\home\runneradmin\.cache\pip
143+
key: Cygwin-py3.${{ matrix.python-minor-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
144+
restore-keys: |
145+
${{ matrix.os }}-py3.${{ matrix.python-minor-version }}-pip-
146+
147+
- name: Cache ccache
148+
uses: actions/cache@v3
149+
with:
150+
path: C:\cygwin\home\runneradmin\.ccache
151+
key: Cygwin-py3.${{ matrix.python-minor-version }}-ccache-${{ hashFiles('src/*') }}
152+
restore-keys: Cygwin-py3.${{ matrix.python-minor-version }}-ccache-
153+
154+
- name: Cache Matplotlib
155+
uses: actions/cache@v3
156+
with:
157+
path: |
158+
C:\cygwin\home\runneradmin\.cache\matplotlib
159+
!C:\cygwin\home\runneradmin\.cache\matplotlib\tex.cache
160+
!C:\cygwin\home\runneradmin\.cache\matplotlib\test_cache
161+
key: 1-Cygwin-py3.${{ matrix.python-minor-version }}-mpl-${{ github.ref }}-${{ github.sha }}
162+
restore-keys: |
163+
1-Cygwin-py3.${{ matrix.python-minor-version }}-mpl-${{ github.ref }}-
164+
1-Cygwin-py3.${{ matrix.python-minor-version }}-mpl-
165+
166+
- name: Ensure correct Python version
167+
shell: bash.exe -eo pipefail -o igncr "{0}"
168+
run: |
169+
/usr/sbin/alternatives --set python /usr/bin/python3.${{ matrix.python-minor-version }}
170+
/usr/sbin/alternatives --set python3 /usr/bin/python3.${{ matrix.python-minor-version }}
171+
172+
- name: Install Python dependencies
173+
shell: bash.exe -eo pipefail -o igncr "{0}"
174+
run: |
175+
python -m pip install --upgrade pip 'setuptools<60' wheel
176+
python -m pip install kiwisolver 'numpy!=1.21.*' pillow importlib_resources
177+
grep -v -F -e psutil requirements/testing/all.txt >requirements_test.txt
178+
python -m pip install --upgrade 'contourpy>=1.0.1' cycler fonttools \
179+
packaging pyparsing python-dateutil setuptools-scm \
180+
-r requirements_test.txt sphinx ipython
181+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
182+
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
183+
echo 'PyGObject is available' ||
184+
echo 'PyGObject is not available'
185+
python -m pip install --upgrade pyqt5 &&
186+
python -c 'import PyQt5.QtCore' &&
187+
echo 'PyQt5 is available' ||
188+
echo 'PyQt5 is not available'
189+
python -mpip install --upgrade pyside2 &&
190+
python -c 'import PySide2.QtCore' &&
191+
echo 'PySide2 is available' ||
192+
echo 'PySide2 is not available'
193+
python -m pip uninstall --yes wxpython || echo 'wxPython already uninstalled'
194+
195+
- name: Install Matplotlib
196+
shell: bash.exe -eo pipefail -o igncr "{0}"
197+
env:
198+
AUTOCONF: /usr/bin/autoconf-2.69
199+
MAKEFLAGS: dw
200+
run: |
201+
ccache -s
202+
git describe
203+
cat <<EOT >> mplsetup.cfg
204+
[rc_options]
205+
backend=Agg
206+
207+
[libs]
208+
system_freetype = False
209+
system_qhull = True
210+
EOT
211+
cat mplsetup.cfg
212+
# All dependencies must have been pre-installed, so that the minver
213+
# constraints are held.
214+
python -m pip install --no-deps -ve .
215+
216+
- name: Find DLLs to rebase
217+
shell: bash.exe -eo pipefail -o igncr "{0}"
218+
run: |
219+
find {/usr,/usr/local}/{bin,lib/python3.*/site-packages} /usr/lib/lapack . -name \*.exe -o -name \*.dll -print >files_to_rebase.txt
220+
221+
- name: Rebase DLL list
222+
shell: ash.exe "{0}"
223+
run: "rebase --database --filelist=files_to_rebase.txt"
224+
# Inplace modification of DLLs to assign non-overlapping load
225+
# addresses so fork() works as expected. Ash is used as it
226+
# does not link against any Cygwin DLLs that might need to be
227+
# rebased.
228+
229+
- name: Check that Matplotlib imports
230+
shell: bash.exe -eo pipefail -o igncr "{0}"
231+
run: |
232+
/usr/bin/python -c "import matplotlib as mpl; import matplotlib.pyplot as plt"
233+
234+
- name: Set ffmpeg path
235+
shell: bash.exe -eo pipefail -o igncr "{0}"
236+
run: |
237+
oldmplrc=$(python -c "from matplotlib import matplotlib_fname as mplrc_file; print(mplrc_file())")
238+
echo "${oldmplrc}"
239+
mkdir -p ~/.matplotlib/
240+
sed -E -e 's~#animation\.ffmpeg_path:.+~animation.ffmpeg_path: /usr/bin/ffmpeg.exe~' "${oldmplrc}" >~/.matplotlib/matplotlibrc
241+
242+
- name: Run pytest
243+
shell: bash.exe -eo pipefail -o igncr "{0}"
244+
id: cygwin-run-pytest
245+
run: |
246+
xvfb-run python -mpytest -raR -n auto \
247+
--maxfail=50 --timeout=300 --durations=25 \
248+
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
249+
250+
- name: Upload code coverage
251+
uses: codecov/codecov-action@v3

.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python 3
1818
uses: actions/setup-python@v4
1919
with:
20-
python-version: 3.8
20+
python-version: 3.9
2121

2222
- name: Install flake8
2323
run: pip3 install -r requirements/testing/flake8.txt

.github/workflows/tests.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,24 @@ jobs:
3737
include:
3838
- name-suffix: "(Minimum Versions)"
3939
os: ubuntu-20.04
40-
python-version: 3.8
40+
python-version: 3.9
4141
extra-requirements: '-c requirements/testing/minver.txt'
42-
pyqt5-ver: '==5.11.2 sip==5.0.0' # oldest versions with a Py3.8 wheel.
42+
pyqt5-ver: '==5.12.2 sip==5.0.0' # oldest versions with a Py3.9 wheel.
4343
pyqt6-ver: '==6.1.0 PyQt6-Qt6==6.1.0'
44-
pyside2-ver: '==5.14.0' # oldest version with working Py3.8 wheel.
44+
pyside2-ver: '==5.15.1' # oldest version with working Py3.9 wheel.
4545
pyside6-ver: '==6.0.0'
4646
delete-font-cache: true
47-
- os: ubuntu-20.04
48-
python-version: 3.8
49-
extra-requirements: '-r requirements/testing/extra.txt'
50-
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
5147
- os: ubuntu-20.04
5248
python-version: 3.9
5349
extra-requirements: '-r requirements/testing/extra.txt'
50+
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
5451
- os: ubuntu-20.04
5552
python-version: '3.10'
5653
extra-requirements: '-r requirements/testing/extra.txt'
5754
- os: ubuntu-20.04
5855
python-version: '3.11'
5956
- os: macos-latest
60-
python-version: 3.8
57+
python-version: 3.9
6158

6259
steps:
6360
- uses: actions/checkout@v3
@@ -177,7 +174,7 @@ jobs:
177174
178175
# Install optional dependencies from PyPI.
179176
# Sphinx is needed to run sphinxext tests
180-
python -m pip install --upgrade sphinx
177+
python -m pip install --upgrade sphinx!=6.1.2
181178
182179
# GUI toolkits are pip-installable only for some versions of Python
183180
# so don't fail if we can't install them. Make it easier to check
@@ -227,7 +224,7 @@ jobs:
227224
# Only install the nightly dependencies during the scheduled event
228225
if: ${{ github.event_name == 'schedule' && matrix.name-suffix != '(Minimum Versions)' }}
229226
run: |
230-
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple --upgrade numpy pandas
227+
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple --upgrade --only-binary=:all: numpy pandas
231228
232229
- name: Install Matplotlib
233230
run: |

0 commit comments

Comments
 (0)