From 6cdeb5511892384046db0fb0ffd5bedd308269e4 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sat, 27 Jun 2020 14:39:44 +0300 Subject: [PATCH 1/8] Drop support for soon-EOL Python 3.5 --- .appveyor.yml | 2 +- .github/workflows/test-windows.yml | 2 +- .github/workflows/test.yml | 5 ++--- .travis.yml | 7 ++----- docs/installation.rst | 4 +++- setup.py | 3 +-- tox.ini | 2 +- winbuild/README.md | 4 ++-- winbuild/build.rst | 2 +- winbuild/build_prepare.py | 2 +- 10 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ad783f85ed5..965edb67f5c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,7 +14,7 @@ environment: matrix: - PYTHON: C:/Python38 ARCHITECTURE: x86 - - PYTHON: C:/Python35-x64 + - PYTHON: C:/Python36-x64 ARCHITECTURE: x64 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 83dc5748b0b..ddee39a19ea 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5", "3.6", "3.7", "3.8", "pypy3"] + python-version: ["3.6", "3.7", "3.8", "pypy3"] architecture: ["x86", "x64"] include: - architecture: "x86" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8d2c6374c5..5a369956cca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,13 +17,12 @@ jobs: "3.8", "3.7", "3.6", - "3.5", ] include: - - python-version: "3.5" - env: PYTHONOPTIMIZE=2 - python-version: "3.6" env: PYTHONOPTIMIZE=1 + - python-version: "3.7" + env: PYTHONOPTIMIZE=2 # Include new variables for Codecov - os: ubuntu-latest codecov-flag: GHA_Ubuntu diff --git a/.travis.yml b/.travis.yml index 980506368dc..d4c8bb18a33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ matrix: arch: arm64 - python: "3.7" arch: ppc64le - - python: "3.5" + - python: "3.8" arch: s390x - python: "pypy3" @@ -36,15 +36,12 @@ matrix: services: xvfb - python: '3.7' name: "3.7 Xenial" + env: PYTHONOPTIMIZE=2 services: xvfb - python: '3.6' name: "3.6 Xenial PYTHONOPTIMIZE=1" env: PYTHONOPTIMIZE=1 services: xvfb - - python: '3.5' - name: "3.5 Xenial PYTHONOPTIMIZE=2" - env: PYTHONOPTIMIZE=2 - services: xvfb install: - | diff --git a/docs/installation.rst b/docs/installation.rst index e46bdf56c08..24f895b857f 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -19,7 +19,9 @@ Notes +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ |**Python** |**3.8**|**3.7**|**3.6**|**3.5**|**3.4**|**3.3**|**3.2**|**2.7**|**2.6**|**2.5**|**2.4**| +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow >= 7 | Yes | Yes | Yes | Yes | | | | | | | | +|Pillow >= 7.3 | Yes | Yes | Yes | | | | | | | | | ++--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +|Pillow 7.0 - 7.2 | Yes | Yes | Yes | Yes | | | | | | | | +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ |Pillow 6.2.1 - 6.2.2| Yes | Yes | Yes | Yes | | | | Yes | | | | +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ diff --git a/setup.py b/setup.py index b7982a5bac4..59f6d297078 100755 --- a/setup.py +++ b/setup.py @@ -880,7 +880,6 @@ def debug_build(): "Development Status :: 6 - Mature", "License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)", # noqa: E501 "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", @@ -893,7 +892,7 @@ def debug_build(): "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Multimedia :: Graphics :: Viewers", ], - python_requires=">=3.5", + python_requires=">=3.6", cmdclass={"build_ext": pil_build_ext}, ext_modules=[Extension("PIL._imaging", ["_imaging.c"])], include_package_data=True, diff --git a/tox.ini b/tox.ini index aa6875374bb..22ca36daf53 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ [tox] envlist = lint - py{35,36,37,38,py3} + py{36,37,38,py3} minversion = 1.9 [testenv] diff --git a/winbuild/README.md b/winbuild/README.md index d46361c9e8e..b7d1c548f97 100644 --- a/winbuild/README.md +++ b/winbuild/README.md @@ -6,7 +6,7 @@ For more extensive info, see the [Windows build instructions](build.rst). * See [Current Windows Build/Testing process (Pillow#553)](https://github.com/python-pillow/Pillow/issues/553#issuecomment-37877416), [Definitive docs for how to compile on Windows (matplotlib#1717)](https://github.com/matplotlib/matplotlib/issues/1717#issuecomment-13343859), [Test Windows with GitHub Actions (Pillow#4084)](https://github.com/python-pillow/Pillow/pull/4084). - + * Requires Microsoft Visual Studio 2017 or newer with C++ component. * Requires NASM for libjpeg-turbo, a required dependency when using this script. @@ -17,7 +17,7 @@ For more extensive info, see the [Windows build instructions](build.rst). The following is a simplified version of the script used on AppVeyor: ``` -set PYTHON=C:\Python35\bin +set PYTHON=C:\Python38\bin cd /D C:\Pillow\winbuild C:\Python37\bin\python.exe build_prepare.py -v --depends=C:\pillow-depends build\build_dep_all.cmd diff --git a/winbuild/build.rst b/winbuild/build.rst index 517843a66b2..3122b79e6ec 100644 --- a/winbuild/build.rst +++ b/winbuild/build.rst @@ -104,7 +104,7 @@ The following is a simplified version of the script used on AppVeyor: .. code-block:: - set PYTHON=C:\Python35\bin + set PYTHON=C:\Python38\bin cd /D C:\Pillow\winbuild C:\Python37\bin\python.exe build_prepare.py -v --depends=C:\pillow-depends build\build_dep_all.cmd diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 553ed636530..c17c3e43e60 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -456,7 +456,7 @@ def build_pillow(): cmd_cd("{pillow_dir}"), *prefs["header"], cmd_set("DISTUTILS_USE_SDK", "1"), # use same compiler to build Pillow - cmd_set("MSSdk", "1"), # for Python 3.5 and PyPy3.6 + cmd_set("MSSdk", "1"), # for PyPy3.6 cmd_set("py_vcruntime_redist", "true"), # use /MD, not /MT r'"{python_dir}\{python_exe}" setup.py build_ext %*', ] From d533b4fdb79bd81162d555eb3fdb30e7489e43e2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 30 Jun 2020 20:49:40 +0300 Subject: [PATCH 2/8] Remove redundant requirements --- winbuild/README.md | 1 - winbuild/build.rst | 6 ------ 2 files changed, 7 deletions(-) diff --git a/winbuild/README.md b/winbuild/README.md index b7d1c548f97..611d1ed1a89 100644 --- a/winbuild/README.md +++ b/winbuild/README.md @@ -11,7 +11,6 @@ For more extensive info, see the [Windows build instructions](build.rst). * Requires Microsoft Visual Studio 2017 or newer with C++ component. * Requires NASM for libjpeg-turbo, a required dependency when using this script. * Requires CMake 3.12 or newer (available as Visual Studio component). -* Python 3.6+ is required to generate valid scripts, but builds targeting Python 3.5+ are supported. * Tested on Windows Server 2016 with Visual Studio 2017 Community (AppVeyor). * Tested on Windows Server 2019 with Visual Studio 2019 Enterprise (GitHub Actions). diff --git a/winbuild/build.rst b/winbuild/build.rst index 3122b79e6ec..aaed2c43fa8 100644 --- a/winbuild/build.rst +++ b/winbuild/build.rst @@ -12,12 +12,6 @@ Prerequisites ------------- -Python -^^^^^^ - -While the scripts can target any version of Python supported by Pillow, -Python 3.6+ is required to generate valid build scripts. - Compilers ^^^^^^^^^ From adec4f5a43cf8ca180366748405ebaf2648b2a52 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 30 Jun 2020 21:39:07 +0300 Subject: [PATCH 3/8] Remove compatibility for unsupported PyPy versions --- src/PIL/_tkinter_finder.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/PIL/_tkinter_finder.py b/src/PIL/_tkinter_finder.py index 30493066af5..7018a1b79a9 100644 --- a/src/PIL/_tkinter_finder.py +++ b/src/PIL/_tkinter_finder.py @@ -4,13 +4,6 @@ from tkinter import _tkinter as tk if hasattr(sys, "pypy_find_executable"): - # Tested with packages at https://bitbucket.org/pypy/pypy/downloads. - # PyPies 1.6, 2.0 do not have tkinter built in. PyPy3-2.3.1 gives an - # OSError trying to import tkinter. Otherwise: - try: # PyPy 5.1, 4.0.0, 2.6.1, 2.6.0 - TKINTER_LIB = tk.tklib_cffi.__file__ - except AttributeError: - # PyPy3 2.4, 2.1-beta1; PyPy 2.5.1, 2.5.0, 2.4.0, 2.3, 2.2, 2.1 - TKINTER_LIB = tk.tkffi.verifier.modulefilename + TKINTER_LIB = tk.tklib_cffi.__file__ else: TKINTER_LIB = tk.__file__ From e5e92d73461b828f6fb2b8ab7f5d8e762d7e5bbf Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 1 Jul 2020 18:47:54 +1000 Subject: [PATCH 4/8] Python 3.5 is no longer supported --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0e0d38cddce..93f71385636 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Development, documentation & testing requirements. -black; python_version >= '3.6' +black check-manifest coverage jarn.viewdoc From 630fb0c72e1cd70c360767121c6c3f17b8615dd1 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 1 Jul 2020 11:58:22 +0300 Subject: [PATCH 5/8] Update job name Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d4c8bb18a33..be2682dd190 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ matrix: name: "3.8 Xenial" services: xvfb - python: '3.7' - name: "3.7 Xenial" + name: "3.7 Xenial PYTHONOPTIMIZE=2" env: PYTHONOPTIMIZE=2 services: xvfb - python: '3.6' From f8ddb3aa486d828fd4d125c313b9a59a4f359a0f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Fri, 10 Jul 2020 10:43:13 +0300 Subject: [PATCH 6/8] Update version Co-authored-by: nulano --- docs/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 24f895b857f..c2a4ce2ae9a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -19,7 +19,7 @@ Notes +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ |**Python** |**3.8**|**3.7**|**3.6**|**3.5**|**3.4**|**3.3**|**3.2**|**2.7**|**2.6**|**2.5**|**2.4**| +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow >= 7.3 | Yes | Yes | Yes | | | | | | | | | +|Pillow >= 8.0 | Yes | Yes | Yes | | | | | | | | | +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ |Pillow 7.0 - 7.2 | Yes | Yes | Yes | Yes | | | | | | | | +--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ From a2fa484c0625f17ce0520005c0f1da115517e227 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 11 Jul 2020 13:18:52 +0300 Subject: [PATCH 7/8] Add Python 3.9 column --- docs/installation.rst | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index c2a4ce2ae9a..02c4e6e345a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -16,27 +16,27 @@ Notes .. note:: Pillow is supported on the following Python versions -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|**Python** |**3.8**|**3.7**|**3.6**|**3.5**|**3.4**|**3.3**|**3.2**|**2.7**|**2.6**|**2.5**|**2.4**| -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow >= 8.0 | Yes | Yes | Yes | | | | | | | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow 7.0 - 7.2 | Yes | Yes | Yes | Yes | | | | | | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow 6.2.1 - 6.2.2| Yes | Yes | Yes | Yes | | | | Yes | | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow 6.0 - 6.2.0 | | Yes | Yes | Yes | | | | Yes | | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow 5.2 - 5.4 | | Yes | Yes | Yes | Yes | | | Yes | | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow 5.0 - 5.1 | | | Yes | Yes | Yes | | | Yes | | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow 4 | | | Yes | Yes | Yes | Yes | | Yes | | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow 2 - 3 | | | | Yes | Yes | Yes | Yes | Yes | Yes | | | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ -|Pillow < 2 | | | | | | | | Yes | Yes | Yes | Yes | -+--------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **Python** |**3.9**|**3.8**|**3.7**|**3.6**|**3.5**|**3.4**|**3.3**|**3.2**|**2.7**|**2.6**|**2.5**|**2.4**| ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow >= 8.0 | Yes | Yes | Yes | Yes | | | | | | | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow 7.0 - 7.2 | | Yes | Yes | Yes | Yes | | | | | | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow 6.2.1 - 6.2.2 | | Yes | Yes | Yes | Yes | | | | Yes | | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow 6.0 - 6.2.0 | | | Yes | Yes | Yes | | | | Yes | | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow 5.2 - 5.4 | | | Yes | Yes | Yes | Yes | | | Yes | | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow 5.0 - 5.1 | | | | Yes | Yes | Yes | | | Yes | | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow 4 | | | | Yes | Yes | Yes | Yes | | Yes | | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow 2 - 3 | | | | | Yes | Yes | Yes | Yes | Yes | Yes | | | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ +| Pillow < 2 | | | | | | | | | Yes | Yes | Yes | Yes | ++----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+ Basic Installation ------------------ From 2cec9f98a4afce2352a74b9061ccef299745ec3d Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 12 Jul 2020 15:03:10 +1000 Subject: [PATCH 8/8] Updated CI targets [ci skip] --- docs/installation.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 02c4e6e345a..c35b98f48ad 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -403,7 +403,7 @@ These platforms are built and tested for every change. +----------------------------------+--------------------------+-----------------------+ | Fedora 32 | 3.8 |x86-64 | +----------------------------------+--------------------------+-----------------------+ -| macOS 10.15 Catalina | 3.5, 3.6, 3.7, 3.8, PyPy3|x86-64 | +| macOS 10.15 Catalina | 3.6, 3.7, 3.8, PyPy3 |x86-64 | +----------------------------------+--------------------------+-----------------------+ | Ubuntu Linux 16.04 LTS | 3.5, 3.6, 3.7, 3.8, PyPy3|x86-64 | +----------------------------------+--------------------------+-----------------------+ @@ -413,11 +413,11 @@ These platforms are built and tested for every change. +----------------------------------+--------------------------+-----------------------+ | Windows Server 2016 | 3.8 |x86 | | +--------------------------+-----------------------+ -| | 3.5 |x86-64 | +| | 3.6 |x86-64 | | +--------------------------+-----------------------+ | | 3.7/MinGW |x86 | +----------------------------------+--------------------------+-----------------------+ -| Windows Server 2019 | 3.5, 3.6, 3.7, 3.8 |x86, x86-64 | +| Windows Server 2019 | 3.6, 3.7, 3.8 |x86, x86-64 | | +--------------------------+-----------------------+ | | PyPy3 |x86 | +----------------------------------+--------------------------+-----------------------+