From 6a256a83965a48b90a1900e31609f7ca717f9aee Mon Sep 17 00:00:00 2001 From: Hugo Date: Sat, 21 Dec 2019 13:11:12 +0200 Subject: [PATCH 1/5] make doccheck: turn warnings into errors --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 1a912039e..510c4e2cc 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -42,7 +42,7 @@ clean: -rm -rf $(BUILDDIR)/* html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + $(SPHINXBUILD) -b html -W $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." From b3547dc2c0a574545604649fb8a69eb8ea37b2ba Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 21 Dec 2019 13:46:38 +0200 Subject: [PATCH 2/5] --keep-going to show all of the problems Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 510c4e2cc..ba79d9070 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -42,7 +42,7 @@ clean: -rm -rf $(BUILDDIR)/* html: - $(SPHINXBUILD) -b html -W $(ALLSPHINXOPTS) $(BUILDDIR)/html + $(SPHINXBUILD) -b html -W --keep-going $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." From 113477fbeeec718c01449dec93f40eaa66782f27 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sat, 21 Dec 2019 14:05:50 +0200 Subject: [PATCH 3/5] Fix unexpected unindents --- src/PIL/Image.py | 2 ++ src/PIL/ImageOps.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index ed90a26f7..b36f64735 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2181,12 +2181,14 @@ class Image: It may also be an :py:class:`~PIL.Image.ImageTransformHandler` object:: + class Example(Image.ImageTransformHandler): def transform(size, method, data, resample, fill=1): # Return result It may also be an object with a :py:meth:`~method.getdata` method that returns a tuple supplying new **method** and **data** values:: + class Example(object): def getdata(self): method = Image.EXTENT diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py index 3a6dabf5e..4391af569 100644 --- a/src/PIL/ImageOps.py +++ b/src/PIL/ImageOps.py @@ -234,6 +234,7 @@ def pad(image, size, method=Image.BICUBIC, color=None, centering=(0.5, 0.5)): :param color: The background color of the padded image. :param centering: Control the position of the original image within the padded version. + (0.5, 0.5) will keep the image centered (0, 0) will keep the image aligned to the top left (1, 1) will keep the image aligned to the bottom From d025fbe16de642d96a861653293636e4fd82f322 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sat, 21 Dec 2019 15:48:00 +0200 Subject: [PATCH 4/5] Install TkInter for Python 3, not 2 --- .travis/install.sh | 2 +- docs/installation.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 747acb448..48bcf0016 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -3,7 +3,7 @@ set -e sudo apt-get update -sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-tk\ +sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\ ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\ cmake imagemagick libharfbuzz-dev libfribidi-dev diff --git a/docs/installation.rst b/docs/installation.rst index 385b570b6..a68668973 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -335,7 +335,7 @@ Or for Python 3:: Prerequisites are installed on **Ubuntu 16.04 LTS** with:: $ sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \ - libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \ + libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \ libharfbuzz-dev libfribidi-dev Then see ``depends/install_raqm.sh`` to install libraqm. From fbb14f67a30b612454bc7cf9a5f73d6b35e7eb14 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 23 Dec 2019 12:26:59 +0200 Subject: [PATCH 5/5] Only check docs on Travis At least whilst there's a problem on GHA: https://github.community/t5/GitHub-Actions/GitHub-Action-for-python-import-of-quot-tkinter-quot-fails/td-p/40644 --- .github/workflows/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78307b7a1..0a4dcc544 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,12 +83,6 @@ jobs: name: errors path: Tests/errors - - name: Docs - if: matrix.python-version == 3.8 - run: | - pip install sphinx-rtd-theme - make doccheck - - name: After success if: success() run: |