Skip to content

Backport PR #20154 on branch v3.4.x (ci: Bump Ubuntu to 18.04 LTS.) #20307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ jobs:
matrix:
include:
- name-suffix: "(Minimum Versions)"
os: ubuntu-16.04
os: ubuntu-18.04
python-version: 3.7
extra-requirements: '-c requirements/testing/minver.txt'
pyqt5-ver: '==5.8 sip==4.19.7' # oldest versions with a Py3.7 wheel.
delete-font-cache: true
XVFB_RUN: xvfb-run -a
- os: ubuntu-16.04
- os: ubuntu-18.04
python-version: 3.7
extra-requirements: '-r requirements/testing/extra.txt'
XVFB_RUN: xvfb-run -a
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
- os: ubuntu-16.04
- os: ubuntu-18.04
python-version: 3.8
extra-requirements: '-r requirements/testing/extra.txt'
XVFB_RUN: xvfb-run -a
Expand Down Expand Up @@ -128,10 +128,10 @@ jobs:
~/.cache/matplotlib
!~/.cache/matplotlib/tex.cache
!~/.cache/matplotlib/test_cache
key: ${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-${{ github.sha }}
key: 1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
${{ runner.os }}-py${{ matrix.python-version }}-mpl-
1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-

- name: Install Python dependencies
run: |
Expand All @@ -156,12 +156,8 @@ jobs:
# libraries cannot be loaded at runtime, so an actual import is a
# better check).
if [[ "${{ runner.os }}" != 'macOS' ]]; then
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12;
# pycairo 1.20+ requires a new version of Cairo, unavailable on
# Ubuntu 16.04, so PyGObject must be installed without build
# isolation in order to pick up the lower pre-installed version.
python -m pip install --upgrade 'pycairo<1.20.0' 'cairocffi>=0.8' &&
python -m pip install --upgrade --no-build-isolation PyGObject &&
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
echo 'PyGObject is available' ||
echo 'PyGObject is not available'
Expand All @@ -180,7 +176,7 @@ jobs:
echo 'PySide2 is not available'
fi
python -m pip install --upgrade \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \
wxPython &&
python -c 'import wx' &&
echo 'wxPython is available' ||
Expand Down Expand Up @@ -226,3 +222,9 @@ jobs:
if: ${{ runner.os != 'macOS' }}
- name: Upload code coverage
uses: codecov/codecov-action@v1

- uses: actions/upload-artifact@v2
if: failure()
with:
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} result images"
path: ./result_images
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
strategy:
matrix:
Linux_py37:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
python.version: '3.7'
Linux_py38:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
python.version: '3.8'
Linux_py39:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
python.version: '3.9'
macOS_py37:
vmImage: 'macOS-10.15'
Expand Down
3 changes: 3 additions & 0 deletions lib/matplotlib/backends/backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,9 @@ def __init__(self, filename, *, keep_empty=True, metadata=None):
'Creator', 'Producer', 'CreationDate', 'ModDate', and
'Trapped'. Values have been predefined for 'Creator', 'Producer'
and 'CreationDate'. They can be removed by setting them to `None`.

Note that some versions of LaTeX engines may ignore the 'Producer'
key and set it to themselves.
"""
self._output_name = filename
self._n_figures = 0
Expand Down
Binary file not shown.
6 changes: 5 additions & 1 deletion lib/matplotlib/tests/test_backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,17 @@ def test_pdf_pages_metadata_check(monkeypatch, system):
if '/PTEX.Fullbanner' in info:
del info['/PTEX.Fullbanner']

# Some LaTeX engines ignore this setting, and state themselves as producer.
producer = info.pop('/Producer')
assert producer == f'Matplotlib pgf backend v{mpl.__version__}' or (
system == 'lualatex' and 'LuaTeX' in producer)

assert info == {
'/Author': 'me',
'/CreationDate': 'D:19700101000000Z',
'/Creator': f'Matplotlib v{mpl.__version__}, https://matplotlib.org',
'/Keywords': 'test,pdf,multipage',
'/ModDate': 'D:19680801000000Z',
'/Producer': f'Matplotlib pgf backend v{mpl.__version__}',
'/Subject': 'Test page',
'/Title': 'Multipage PDF with pgf',
'/Trapped': '/True',
Expand Down