From e11612f589fca9f94e5c96f983ed775e9fd5a1b9 Mon Sep 17 00:00:00 2001 From: nulano Date: Tue, 16 Jun 2020 04:05:34 +0200 Subject: [PATCH 01/13] cache winbuild --- .github/workflows/test-windows.yml | 38 +++++++++++++++++++++++++----- winbuild/build_prepare.py | 19 ++++++++++----- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 7ae26b883..05937c17b 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -36,7 +36,7 @@ jobs: path: winbuild\depends - name: Cache pip - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~\AppData\Local\pip\Cache key: @@ -58,7 +58,7 @@ jobs: - name: pip install wheel pytest pytest-cov run: python -m pip install wheel pytest pytest-cov - - name: Prepare dependencies + - name: Install dependencies run: | 7z x winbuild\depends\nasm-2.14.02-win64.zip "-o$env:RUNNER_WORKSPACE\" Write-Host "::add-path::$env:RUNNER_WORKSPACE\nasm-2.14.02" @@ -67,38 +67,66 @@ jobs: Write-Host "::add-path::C:\Program Files (x86)\gs\gs9.50\bin" xcopy /s winbuild\depends\test_images\* Tests\images\ + shell: pwsh - & python.exe winbuild\build_prepare.py -v --python=$env:pythonLocation + - name: Cache build + id: build-cache + uses: actions/cache@v2 + with: + path: winbuild\build + key: + ${{ hashFiles('winbuild\build_prepare.py') }}-${{ hashFiles('.github\workflows\test-windows.yml') }}-${{ env.pythonLocation }} + + - name: Prepare build + if: steps.build-cache.outputs.cache-hit != 'true' + run: | + & python.exe winbuild\build_prepare.py -v --python=$env:pythonLocation --srcdir shell: pwsh - name: Build dependencies / libjpeg-turbo + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_libjpeg.cmd" - name: Build dependencies / zlib + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_zlib.cmd" - name: Build dependencies / LibTiff + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_libtiff.cmd" - name: Build dependencies / WebP + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_libwebp.cmd" - name: Build dependencies / FreeType + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_freetype.cmd" - name: Build dependencies / LCMS2 + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_lcms2.cmd" - name: Build dependencies / OpenJPEG + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_openjpeg.cmd" # GPL licensed; skip if building wheels - name: Build dependencies / libimagequant - if: "github.event_name != 'push'" + if: false run: "& winbuild\\build\\build_dep_libimagequant.cmd" # Raqm dependencies - name: Build dependencies / HarfBuzz + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_harfbuzz.cmd" - name: Build dependencies / FriBidi + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_fribidi.cmd" - name: Build dependencies / Raqm + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_libraqm.cmd" + # trim ~150MB x 9 + - name: Optimize build cache + if: steps.build-cache.outputs.cache-hit != 'true' + run: rmdir /S /Q winbuild\build\src + shell: cmd + - name: Build Pillow run: | & winbuild\build\build_pillow.cmd install @@ -143,14 +171,12 @@ jobs: - name: Build wheel id: wheel - if: "github.event_name == 'push'" run: | for /f "tokens=3 delims=/" %%a in ("${{ github.ref }}") do echo ::set-output name=dist::dist-%%a winbuild\\build\\build_pillow.cmd bdist_wheel" shell: cmd - uses: actions/upload-artifact@v2 - if: "github.event_name == 'push'" with: name: ${{ steps.wheel.outputs.dist }} path: dist\*.whl diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 0ba8a135c..97ed1e873 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -378,10 +378,10 @@ def extract_dep(url, filename): print("Extracting " + filename) if filename.endswith(".zip"): with zipfile.ZipFile(file) as zf: - zf.extractall(build_dir) + zf.extractall(sources_dir) elif filename.endswith(".tar.gz") or filename.endswith(".tgz"): with tarfile.open(file, "r:gz") as tgz: - tgz.extractall(build_dir) + tgz.extractall(sources_dir) else: raise RuntimeError("Unknown archive type: " + filename) @@ -416,7 +416,7 @@ def build_dep(name): extract_dep(dep["url"], dep["filename"]) for patch_file, patch_list in dep.get("patch", {}).items(): - patch_file = os.path.join(build_dir, dir, patch_file.format(**prefs)) + patch_file = os.path.join(sources_dir, dir, patch_file.format(**prefs)) with open(patch_file, "r") as f: text = f.read() for patch_from, patch_to in patch_list.items(): @@ -429,7 +429,7 @@ def build_dep(name): "@echo " + ("=" * 70), "@echo ==== {:<60} ====".format(banner), "@echo " + ("=" * 70), - "cd /D %s" % os.path.join(build_dir, dir), + "cd /D %s" % os.path.join(sources_dir, dir), *prefs["header"], *dep.get("build", []), *get_footer(dep), @@ -477,6 +477,7 @@ if __name__ == "__main__": "ARCHITECTURE", "x86" if struct.calcsize("P") == 4 else "x64" ) build_dir = os.environ.get("PILLOW_BUILD", os.path.join(winbuild_dir, "build")) + sources_dir = "" for arg in sys.argv[1:]: if arg == "-v": verbose = True @@ -494,6 +495,8 @@ if __name__ == "__main__": architecture = arg[15:] elif arg.startswith("--dir="): build_dir = arg[6:] + elif arg == "--srcdir": + sources_dir = os.path.sep + "src" else: raise ValueError("Unknown parameter: " + arg) @@ -524,10 +527,13 @@ if __name__ == "__main__": lib_dir = os.path.join(build_dir, "lib") # build directory for *.bin files bin_dir = os.path.join(build_dir, "bin") + # directory for storing project files + sources_dir = build_dir + sources_dir shutil.rmtree(build_dir, ignore_errors=True) - for path in [build_dir, inc_dir, lib_dir, bin_dir]: - os.makedirs(path) + os.makedirs(build_dir, exist_ok=False) + for path in [inc_dir, lib_dir, bin_dir, sources_dir]: + os.makedirs(path, exist_ok=True) prefs = { # Python paths / preferences @@ -543,6 +549,7 @@ if __name__ == "__main__": "inc_dir": inc_dir, "lib_dir": lib_dir, "bin_dir": bin_dir, + "src_dir": sources_dir, # Compilers / Tools **msvs, "cmake": "cmake.exe", # TODO find CMAKE automatically From eb83f0bac2009d894c3832316bea9517dfd56272 Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 21 Jun 2020 12:32:37 +0200 Subject: [PATCH 02/13] keep imagequant enabled for PRs --- .github/workflows/test-windows.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 05937c17b..5dcee2441 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -105,9 +105,9 @@ jobs: if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_openjpeg.cmd" - # GPL licensed; skip if building wheels + # GPL licensed - name: Build dependencies / libimagequant - if: false + if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_libimagequant.cmd" # Raqm dependencies @@ -129,7 +129,9 @@ jobs: - name: Build Pillow run: | - & winbuild\build\build_pillow.cmd install + $FLAGS="" + if ('${{ github.event_name }}' -eq 'push') { $FLAGS="--disable-imagequant" } + & winbuild\build\build_pillow.cmd $FLAGS install & $env:pythonLocation\python.exe selftest.py --installed shell: pwsh @@ -171,12 +173,14 @@ jobs: - name: Build wheel id: wheel + if: "github.event_name == 'push'" run: | for /f "tokens=3 delims=/" %%a in ("${{ github.ref }}") do echo ::set-output name=dist::dist-%%a - winbuild\\build\\build_pillow.cmd bdist_wheel" + winbuild\\build\\build_pillow.cmd --disable-imagequant bdist_wheel shell: cmd - uses: actions/upload-artifact@v2 + if: "github.event_name == 'push'" with: name: ${{ steps.wheel.outputs.dist }} path: dist\*.whl From 0e1a116c792a446b4cb75a8cd3da89abd6c121fb Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 2 Aug 2020 22:14:38 +0200 Subject: [PATCH 03/13] add develop instructions for winbuild --- winbuild/build.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winbuild/build.rst b/winbuild/build.rst index aaed2c43f..ba568a030 100644 --- a/winbuild/build.rst +++ b/winbuild/build.rst @@ -81,6 +81,9 @@ Pillow for the selected version of Python. ``winbuild\build\build_pillow.cmd bdist_wheel`` will build wheels instead of installing Pillow. +You can also use ``winbuild\build\build_pillow.cmd --inplace develop`` to build +and install Pillow in develop mode (instead of ``pip install --editable``). + Testing Pillow -------------- From 24c1a32ed38d12a9bba3e4efa2fad5ee185ccad3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 9 Aug 2020 20:08:38 +0300 Subject: [PATCH 04/13] Add release notes for 8.0.0 and a template --- docs/conf.py | 2 +- docs/deprecations.rst | 34 ++++++++-------- docs/reference/ImageChops.rst | 7 +--- docs/releasenotes/8.0.0.rst | 73 ++++++++++++++++++++++++++++++++++ docs/releasenotes/index.rst | 1 + docs/releasenotes/template.rst | 45 +++++++++++++++++++++ 6 files changed, 138 insertions(+), 24 deletions(-) create mode 100644 docs/releasenotes/8.0.0.rst create mode 100644 docs/releasenotes/template.rst diff --git a/docs/conf.py b/docs/conf.py index 78841cc15..a022e61cb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -77,7 +77,7 @@ language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ["_build"] +exclude_patterns = ["_build", "releasenotes/template.rst"] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/docs/deprecations.rst b/docs/deprecations.rst index 10ccec632..a619f133c 100644 --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -18,16 +18,16 @@ Image.show command parameter .. deprecated:: 7.2.0 The ``command`` parameter was deprecated and will be removed in a future release. -Use a subclass of ``ImageShow.Viewer`` instead. +Use a subclass of :py:class:`.ImageShow.Viewer` instead. Image._showxv ~~~~~~~~~~~~~ .. deprecated:: 7.2.0 -``Image._showxv`` has been deprecated. Use :py:meth:`~PIL.Image.Image.show` -instead. If custom behaviour is required, use :py:meth:`~PIL.ImageShow.register` to add -a custom :py:class:`~PIL.ImageShow.Viewer` class. +``Image._showxv`` has been deprecated. Use :py:meth:`.Image.Image.show` +instead. If custom behaviour is required, use :py:func:`.ImageShow.register` to add +a custom :py:class:`.ImageShow.Viewer` class. ImageFile.raise_ioerror ~~~~~~~~~~~~~~~~~~~~~~~ @@ -61,7 +61,7 @@ im.offset .. deprecated:: 1.1.2 .. versionremoved:: 8.0.0 -``im.offset()`` has been removed, call ``ImageChops.offset()`` instead. +``im.offset()`` has been removed, call :py:func:`.ImageChops.offset()` instead. It was documented as deprecated in PIL 1.1.2, raised a ``DeprecationWarning`` since 1.1.5, @@ -88,20 +88,20 @@ ImageCms.CmsProfile attributes .. deprecated:: 3.2.0 .. versionremoved:: 8.0.0 -Some attributes in ``ImageCms.CmsProfile`` have been removed. From 6.0.0, they issued a -``DeprecationWarning``: +Some attributes in :py:class:`PIL.ImageCms.CmsProfile` have been removed. From 6.0.0, +they issued a ``DeprecationWarning``: -======================== =============================== +======================== =============================================================== Removed Use instead -======================== =============================== -``color_space`` Padded ``xcolor_space`` -``pcs`` Padded ``connection_space`` -``product_copyright`` Unicode ``copyright`` -``product_desc`` Unicode ``profile_description`` -``product_description`` Unicode ``profile_description`` -``product_manufacturer`` Unicode ``manufacturer`` -``product_model`` Unicode ``model`` -======================== =============================== +======================== =============================================================== +``color_space`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.xcolor_space` +``pcs`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.connection_space` +``product_copyright`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.copyright` +``product_desc`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_description`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_manufacturer`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.manufacturer` +``product_model`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.model` +======================== =============================================================== Python 2.7 ~~~~~~~~~~ diff --git a/docs/reference/ImageChops.rst b/docs/reference/ImageChops.rst index 772d9c983..9519361a7 100644 --- a/docs/reference/ImageChops.rst +++ b/docs/reference/ImageChops.rst @@ -39,12 +39,7 @@ operations in this module). .. autofunction:: PIL.ImageChops.soft_light .. autofunction:: PIL.ImageChops.hard_light .. autofunction:: PIL.ImageChops.overlay -.. py:method:: PIL.ImageChops.offset(image, xoffset, yoffset=None) - - Returns a copy of the image where data has been offset by the given - distances. Data wraps around the edges. If **yoffset** is omitted, it - is assumed to be equal to **xoffset**. - +.. autofunction:: PIL.ImageChops.offset .. autofunction:: PIL.ImageChops.screen .. autofunction:: PIL.ImageChops.subtract .. autofunction:: PIL.ImageChops.subtract_modulo diff --git a/docs/releasenotes/8.0.0.rst b/docs/releasenotes/8.0.0.rst new file mode 100644 index 000000000..14b4bab84 --- /dev/null +++ b/docs/releasenotes/8.0.0.rst @@ -0,0 +1,73 @@ +8.0.0 +----- + +Backwards Incompatible Changes +============================== + +Python 3.5 +^^^^^^^^^^ + +Pillow has dropped support for Python 3.5, which reached end-of-life on 2020-09-13. + +im.offset +^^^^^^^^^ + +``im.offset()`` has been removed, call :py:func:`.ImageChops.offset()` instead. + +Image.fromstring, im.fromstring and im.tostring +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* ``Image.fromstring()`` has been removed, call :py:func:`.Image.frombytes()` instead. +* ``im.fromstring()`` has been removed, call :py:meth:`~PIL.Image.Image.frombytes()` instead. +* ``im.tostring()`` has been removed, call :py:meth:`~PIL.Image.Image.tobytes()` instead. + +ImageCms.CmsProfile attributes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Some attributes in :py:class:`PIL.ImageCms.CmsProfile` have been removed: + +======================== =============================================================== +Removed Use instead +======================== =============================================================== +``color_space`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.xcolor_space` +``pcs`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.connection_space` +``product_copyright`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.copyright` +``product_desc`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_description`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_manufacturer`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.manufacturer` +``product_model`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.model` +======================== =============================================================== + +API Changes +=========== + +Add MIME type to PsdImagePlugin +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +"image/vnd.adobe.photoshop" is now registered as the +:py:class:`.PsdImagePlugin.PsdImageFile` MIME type. + +API Additions +============= + +ImageOps.autocontrast cutoffs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Previously, the ``cutoff`` parameter of :py:func:`.ImageOps.autocontrast` could only +be a single integer, used as the percent to cut off from the histogram on the low and +high ends. + +Now, it can also be a tuple ``(low, high)``. + +Security +======== + +TODO + +Other Changes +============= + +TODO +^^^^ + +TODO diff --git a/docs/releasenotes/index.rst b/docs/releasenotes/index.rst index 2d7747c3e..ba81fbaf8 100644 --- a/docs/releasenotes/index.rst +++ b/docs/releasenotes/index.rst @@ -13,6 +13,7 @@ expected to be backported to earlier versions. .. toctree:: :maxdepth: 2 + 8.0.0 7.2.0 7.1.2 7.1.1 diff --git a/docs/releasenotes/template.rst b/docs/releasenotes/template.rst new file mode 100644 index 000000000..bf381114e --- /dev/null +++ b/docs/releasenotes/template.rst @@ -0,0 +1,45 @@ +x.y.z +----- + +Backwards Incompatible Changes +============================== + +TODO +^^^^ + +Deprecations +============ + +TODO +^^^^ + +TODO + +API Changes +=========== + +TODO +^^^^ + +TODO + +API Additions +============= + +TODO +^^^^ + +TODO + +Security +======== + +TODO + +Other Changes +============= + +TODO +^^^^ + +TODO From 2c460c3ba13f54dca414952029a7ea57b9fe405a Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 9 Aug 2020 20:44:51 +0200 Subject: [PATCH 05/13] simplify ImageCms links in docs --- docs/deprecations.rst | 14 +++++++------- docs/releasenotes/8.0.0.rst | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/deprecations.rst b/docs/deprecations.rst index a619f133c..c60c17306 100644 --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -94,13 +94,13 @@ they issued a ``DeprecationWarning``: ======================== =============================================================== Removed Use instead ======================== =============================================================== -``color_space`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.xcolor_space` -``pcs`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.connection_space` -``product_copyright`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.copyright` -``product_desc`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` -``product_description`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` -``product_manufacturer`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.manufacturer` -``product_model`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.model` +``color_space`` Padded :py:attr:`~.CmsProfile.xcolor_space` +``pcs`` Padded :py:attr:`~.CmsProfile.connection_space` +``product_copyright`` Unicode :py:attr:`~.CmsProfile.copyright` +``product_desc`` Unicode :py:attr:`~.CmsProfile.profile_description` +``product_description`` Unicode :py:attr:`~.CmsProfile.profile_description` +``product_manufacturer`` Unicode :py:attr:`~.CmsProfile.manufacturer` +``product_model`` Unicode :py:attr:`~.CmsProfile.model` ======================== =============================================================== Python 2.7 diff --git a/docs/releasenotes/8.0.0.rst b/docs/releasenotes/8.0.0.rst index 14b4bab84..a09971b60 100644 --- a/docs/releasenotes/8.0.0.rst +++ b/docs/releasenotes/8.0.0.rst @@ -29,13 +29,13 @@ Some attributes in :py:class:`PIL.ImageCms.CmsProfile` have been removed: ======================== =============================================================== Removed Use instead ======================== =============================================================== -``color_space`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.xcolor_space` -``pcs`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.connection_space` -``product_copyright`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.copyright` -``product_desc`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` -``product_description`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` -``product_manufacturer`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.manufacturer` -``product_model`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.model` +``color_space`` Padded :py:attr:`~.CmsProfile.xcolor_space` +``pcs`` Padded :py:attr:`~.CmsProfile.connection_space` +``product_copyright`` Unicode :py:attr:`~.CmsProfile.copyright` +``product_desc`` Unicode :py:attr:`~.CmsProfile.profile_description` +``product_description`` Unicode :py:attr:`~.CmsProfile.profile_description` +``product_manufacturer`` Unicode :py:attr:`~.CmsProfile.manufacturer` +``product_model`` Unicode :py:attr:`~.CmsProfile.model` ======================== =============================================================== API Changes From bf4e918252d83938713d5eace9f362d4b6a6fe97 Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 9 Aug 2020 20:48:44 +0100 Subject: [PATCH 06/13] adjust table marker lines to match the longest row Co-authored-by: Hugo van Kemenade --- docs/deprecations.rst | 7 ++++--- docs/releasenotes/8.0.0.rst | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/deprecations.rst b/docs/deprecations.rst index c60c17306..e3ad2a9e3 100644 --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -91,9 +91,10 @@ ImageCms.CmsProfile attributes Some attributes in :py:class:`PIL.ImageCms.CmsProfile` have been removed. From 6.0.0, they issued a ``DeprecationWarning``: -======================== =============================================================== +======================== =================================================== + Removed Use instead -======================== =============================================================== +======================== =================================================== ``color_space`` Padded :py:attr:`~.CmsProfile.xcolor_space` ``pcs`` Padded :py:attr:`~.CmsProfile.connection_space` ``product_copyright`` Unicode :py:attr:`~.CmsProfile.copyright` @@ -101,7 +102,7 @@ Removed Use instead ``product_description`` Unicode :py:attr:`~.CmsProfile.profile_description` ``product_manufacturer`` Unicode :py:attr:`~.CmsProfile.manufacturer` ``product_model`` Unicode :py:attr:`~.CmsProfile.model` -======================== =============================================================== +======================== =================================================== Python 2.7 ~~~~~~~~~~ diff --git a/docs/releasenotes/8.0.0.rst b/docs/releasenotes/8.0.0.rst index a09971b60..399e8b1c7 100644 --- a/docs/releasenotes/8.0.0.rst +++ b/docs/releasenotes/8.0.0.rst @@ -26,9 +26,9 @@ ImageCms.CmsProfile attributes Some attributes in :py:class:`PIL.ImageCms.CmsProfile` have been removed: -======================== =============================================================== +======================== =================================================== Removed Use instead -======================== =============================================================== +======================== =================================================== ``color_space`` Padded :py:attr:`~.CmsProfile.xcolor_space` ``pcs`` Padded :py:attr:`~.CmsProfile.connection_space` ``product_copyright`` Unicode :py:attr:`~.CmsProfile.copyright` @@ -36,7 +36,7 @@ Removed Use instead ``product_description`` Unicode :py:attr:`~.CmsProfile.profile_description` ``product_manufacturer`` Unicode :py:attr:`~.CmsProfile.manufacturer` ``product_model`` Unicode :py:attr:`~.CmsProfile.model` -======================== =============================================================== +======================== =================================================== API Changes =========== From ecc9cf3d732c2e8996b508db535472aa0449874f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 10 Aug 2020 14:14:12 +0300 Subject: [PATCH 07/13] "cutoff" can also be a float Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- docs/releasenotes/8.0.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/releasenotes/8.0.0.rst b/docs/releasenotes/8.0.0.rst index 399e8b1c7..3fe044a94 100644 --- a/docs/releasenotes/8.0.0.rst +++ b/docs/releasenotes/8.0.0.rst @@ -54,7 +54,7 @@ ImageOps.autocontrast cutoffs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Previously, the ``cutoff`` parameter of :py:func:`.ImageOps.autocontrast` could only -be a single integer, used as the percent to cut off from the histogram on the low and +be a single number, used as the percent to cut off from the histogram on the low and high ends. Now, it can also be a tuple ``(low, high)``. From 3b8bdbb563d1160cd4bd0130d75e1dd6d425f2fe Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 14 Aug 2020 08:30:10 +1000 Subject: [PATCH 08/13] Updated harfbuzz to 2.7.1 --- winbuild/build_prepare.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index abd56be0c..b43ae8583 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -251,9 +251,9 @@ deps = { "libs": [r"*.lib"], }, "harfbuzz": { - "url": "https://github.com/harfbuzz/harfbuzz/archive/2.7.0.zip", - "filename": "harfbuzz-2.7.0.zip", - "dir": "harfbuzz-2.7.0", + "url": "https://github.com/harfbuzz/harfbuzz/archive/2.7.1.zip", + "filename": "harfbuzz-2.7.1.zip", + "dir": "harfbuzz-2.7.1", "build": [ cmd_cmake("-DHB_HAVE_FREETYPE:BOOL=TRUE"), cmd_nmake(target="clean"), From a302b3e3bcf26e943e0355c1d6a1d2bb6023e540 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 15 Aug 2020 00:34:20 +1000 Subject: [PATCH 09/13] Pillow Wheels has changed to use GitHub releases [ci skip] --- RELEASING.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 3f62a70c4..99be38749 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -101,11 +101,7 @@ Released as needed privately to individual vendors for critical security-related cd pillow-wheels ./update-pillow-tag.sh [[release tag]] ``` -* [ ] Download distributions from the [Pillow Wheel Builder container](http://a365fff413fe338398b6-1c8a9b3114517dc5fe17b7c3f8c63a43.r19.cf2.rackcdn.com/). - ```bash - wget -m -A 'Pillow--*' \ - http://a365fff413fe338398b6-1c8a9b3114517dc5fe17b7c3f8c63a43.r19.cf2.rackcdn.com - ``` +* [ ] Download distributions from the [Pillow Wheel Builder release](https://github.com/python-pillow/pillow-wheels/releases). ## Publicize Release From 48ba6b40f9bec71479c044d9b52da99eff24a35b Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sat, 15 Aug 2020 00:42:43 +1000 Subject: [PATCH 10/13] Clarified wording [ci skip] Co-authored-by: Hugo van Kemenade --- RELEASING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASING.md b/RELEASING.md index 99be38749..c9a0439d8 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -101,7 +101,7 @@ Released as needed privately to individual vendors for critical security-related cd pillow-wheels ./update-pillow-tag.sh [[release tag]] ``` -* [ ] Download distributions from the [Pillow Wheel Builder release](https://github.com/python-pillow/pillow-wheels/releases). +* [ ] Download wheels from the [Pillow Wheel Builder release](https://github.com/python-pillow/pillow-wheels/releases). ## Publicize Release From cb79b1fa8900adc1617e9518bb8a83d671dc9246 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 15 Aug 2020 09:40:25 +1000 Subject: [PATCH 11/13] Updated CHANGES.rst [ci skip] --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index c9389ddb1..0604a0411 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ Changelog (Pillow) - Remove long-deprecated Image.py functions #4798 [hugovk, nulano, radarhere] +- Replaced most uses of distutils with setuptools #4797, #4809, #4814, #4817, #4829 + [hugovk, radarhere] + - Add MIME type to PsdImagePlugin #4788 [samamorgan] From c4b1657bd737def7f4aa069834ed4fbe1af33a55 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 15 Aug 2020 09:50:39 +1000 Subject: [PATCH 12/13] Removed duplicate package --- .github/workflows/test-windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 0372b5586..79a5898ae 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -226,7 +226,6 @@ jobs: mingw-w64-x86_64-python3-olefile \ mingw-w64-x86_64-python3-numpy \ mingw-w64-x86_64-python3-pyqt5 \ - mingw-w64-x86_64-python3-numpy \ mingw-w64-x86_64-freetype \ mingw-w64-x86_64-lcms2 \ mingw-w64-x86_64-libwebp \ From ffb507519609b85b56d4c3b9f23e1fda9dd7423e Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 15 Aug 2020 19:42:23 +1000 Subject: [PATCH 13/13] Alphabetised dependencies --- .github/workflows/test-windows.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 79a5898ae..8508a4748 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -218,22 +218,22 @@ jobs: - name: Install Dependencies run: | pacman -S --noconfirm \ + mingw-w64-x86_64-python3-cffi \ + mingw-w64-x86_64-python3-numpy \ + mingw-w64-x86_64-python3-olefile \ mingw-w64-x86_64-python3-pip \ - mingw-w64-x86_64-python3-setuptools \ + mingw-w64-x86_64-python3-pyqt5 \ mingw-w64-x86_64-python3-pytest \ mingw-w64-x86_64-python3-pytest-cov \ - mingw-w64-x86_64-python3-cffi \ - mingw-w64-x86_64-python3-olefile \ - mingw-w64-x86_64-python3-numpy \ - mingw-w64-x86_64-python3-pyqt5 \ + mingw-w64-x86_64-python3-setuptools \ mingw-w64-x86_64-freetype \ - mingw-w64-x86_64-lcms2 \ - mingw-w64-x86_64-libwebp \ - mingw-w64-x86_64-libjpeg-turbo \ - mingw-w64-x86_64-openjpeg2 \ - mingw-w64-x86_64-libimagequant \ - mingw-w64-x86_64-libraqm \ mingw-w64-x86_64-ghostscript \ + mingw-w64-x86_64-lcms2 \ + mingw-w64-x86_64-libimagequant \ + mingw-w64-x86_64-libjpeg-turbo \ + mingw-w64-x86_64-libraqm \ + mingw-w64-x86_64-libwebp \ + mingw-w64-x86_64-openjpeg2 \ subversion python3 -m pip install pyroma