8000 Merge pull request #20384 from meeseeksmachine/auto-backport-of-pr-20… · matplotlib/matplotlib@ed3bd51 · GitHub
[go: up one dir, main page]

Skip to content

Commit ed3bd51

Browse files
authored
Merge pull request #20384 from meeseeksmachine/auto-backport-of-pr-20154-on-v3.4.2-doc
Backport PR #20154 on branch v3.4.2-doc (ci: Bump Ubuntu to 18.04 LTS.)
2 parents f801f04 + ddf292c commit ed3bd51

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ jobs:
2222
matrix:
2323
include:
2424
- name-suffix: "(Minimum Versions)"
25-
os: ubuntu-16.04
25+
os: ubuntu-18.04
2626
python-version: 3.7
2727
extra-requirements: '-c requirements/testing/minver.txt'
2828
pyqt5-ver: '==5.8 sip==4.19.7' # oldest versions with a Py3.7 wheel.
2929
delete-font-cache: true
3030
XVFB_RUN: xvfb-run -a
31-
- os: ubuntu-16.04
31+
- os: ubuntu-18.04
3232
python-version: 3.7
3333
extra-requirements: '-r requirements/testing/extra.txt'
3434
XVFB_RUN: xvfb-run -a
3535
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
36-
- os: ubuntu-16.04
36+
- os: ubuntu-18.04
3737
python-version: 3.8
3838
extra-requirements: '-r requirements/testing/extra.txt'
3939
XVFB_RUN: xvfb-run -a
@@ -128,10 +128,10 @@ jobs:
128128
~/.cache/matplotlib
129129
!~/.cache/matplotlib/tex.cache
130130
!~/.cache/matplotlib/test_cache
131-
key: ${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-${{ github.sha }}
131+
key: 1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-${{ github.sha }}
132132
restore-keys: |
133-
${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
134-
${{ runner.os }}-py${{ matrix.python-version }}-mpl-
133+
1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
134+
1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-
135135
136136
- name: Install Python dependencies
137137
run: |
@@ -156,12 +156,8 @@ jobs:
156156
# libraries cannot be loaded at runtime, so an actual import is a
157157
# better check).
158158
if [[ "${{ runner.os }}" != 'macOS' ]]; then
159-
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12;
160-
# pycairo 1.20+ requires a new version of Cairo, unavailable on
161-
# Ubuntu 16.04, so PyGObject must be installed without build
162-
# isolation in order to pick up the lower pre-installed version.
163-
python -m pip install --upgrade 'pycairo<1.20.0' 'cairocffi>=0.8' &&
164-
python -m pip install --upgrade --no-build-isolation PyGObject &&
159+
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
160+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
165161
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
166162
echo 'PyGObject is available' ||
167163
echo 'PyGObject is not available'
@@ -180,7 +176,7 @@ jobs:
180176
echo 'PySide2 is not available'
181177
fi
182178
python -m pip install --upgrade \
183-
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
179+
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \
184180
wxPython &&
185181
python -c 'import wx' &&
186182
echo 'wxPython is available' ||
@@ -226,3 +222,9 @@ jobs:
226222
if: ${{ runner.os != 'macOS' }}
227223
- name: Upload code coverage
228224
uses: codecov/codecov-action@v1
225+
226+
- uses: actions/upload-artifact@v2
227+
if: failure()
228+
with:
229+
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} result images"
230+
path: ./result_images

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
strategy:
77
matrix:
88
Linux_py37:
9-
vmImage: 'ubuntu-16.04'
9+
vmImage: 'ubuntu-18.04'
1010
python.version: '3.7'
1111
Linux_py38:
12-
vmImage: 'ubuntu-16.04'
12+
vmImage: 'ubuntu-18.04'
1313
python.version: '3.8'
1414
Linux_py39:
15-
vmImage: 'ubuntu-16.04'
15+
vmImage: 'ubuntu-18.04'
1616
python.version: '3.9'
1717
macOS_py37:
1818
vmImage: 'macOS-10.15'

lib/matplotlib/backends/backend_pgf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,9 @@ def __init__(self, filename, *, keep_empty=True, metadata=None):
968968
'Creator', 'Producer', 'CreationDate', 'ModDate', and
969969
'Trapped&# 67F4 39;. Values have been predefined for 'Creator', 'Producer'
970970
and 'CreationDate'. They can be removed by setting them to `None`.
971+
972+
Note that some versions of LaTeX engines may ignore the 'Producer'
973+
key and set it to themselves.
971974
"""
972975
self._output_name = filename
973976
self._n_figures = 0
Binary file not shown.

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,17 @@ def test_pdf_pages_metadata_check(monkeypatch, system):
257257
if '/PTEX.Fullbanner' in info:
258258
del info['/PTEX.Fullbanner']
259259

260+
# Some LaTeX engines ignore this setting, and state themselves as producer.
261+
producer = info.pop('/Producer')
262+
assert producer == f'Matplotlib pgf backend v{mpl.__version__}' or (
263+
system == 'lualatex' and 'LuaTeX' in producer)
264+
260265
assert info == {
261266
'/Author': 'me',
262267
'/CreationDate': 'D:19700101000000Z',
263268
'/Creator': f'Matplotlib v{mpl.__version__}, https://matplotlib.org',
264269
'/Keywords': 'test,pdf,multipage',
265270
'/ModDate': 'D:19680801000000Z',
266-
'/Producer': f'Matplotlib pgf backend v{mpl.__version__}',
267271
'/Subject': 'Test page',
268272
'/Title': 'Multipage PDF with pgf',
269273
'/Trapped': '/True',

0 commit comments

Comments
 (0)
0