From 911079cc68adfdb217f8d0b748e90eee5a3d58af Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 12 Oct 2019 07:56:29 -0700 Subject: [PATCH 1/4] Add PyPy3 to the tox test matrix Allows contributors to automatically test locally. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2dc920371..5fee6dbb9 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ [tox] envlist = lint - py{27,35,36,37} + py{27,35,36,37,py3} minversion = 1.9 [testenv] From 0affbacd5eebfafeac1d9ed1b249c96ab602de19 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 12 Oct 2019 08:17:20 -0700 Subject: [PATCH 2/4] Remove unused arguments from PillowTestCase.skipKnwonBadTest() --- Tests/helper.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Tests/helper.py b/Tests/helper.py index 466d04bda..b112fec7a 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -202,24 +202,13 @@ class PillowTestCase(unittest.TestCase): self.assertTrue(value, msg + ": " + repr(actuals) + " != " + repr(targets)) - def skipKnownBadTest(self, msg=None, platform=None, travis=None, interpreter=None): - # Skip if platform/travis matches, and - # PILLOW_RUN_KNOWN_BAD is not true in the environment. + def skipKnownBadTest(self, msg=None): + # Skip if PILLOW_RUN_KNOWN_BAD is not true in the environment. if os.environ.get("PILLOW_RUN_KNOWN_BAD", False): print(os.environ.get("PILLOW_RUN_KNOWN_BAD", False)) return - skip = True - if platform is not None: - skip = sys.platform.startswith(platform) - if travis is not None: - skip = skip and (travis == bool(os.environ.get("TRAVIS", False))) - if interpreter is not None: - skip = skip and ( - interpreter == "pypy" and hasattr(sys, "pypy_version_info") - ) - if skip: - self.skipTest(msg or "Known Bad Test") + self.skipTest(msg or "Known Bad Test") def tempfile(self, template): assert template[:5] in ("temp.", "temp_") From 7068225b231e6490b857ff6e6848230557a7540e Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 13 Oct 2019 08:12:54 +1100 Subject: [PATCH 3/4] Updated CHANGES.rst [ci skip] --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3d532f5e8..d4b9170d9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ Changelog (Pillow) 7.0.0 (unreleased) ------------------ +- Added pypy3 to tox envlist #4137 + [jdufresne] + - Drop support for EOL PyQt4 and PySide #4108 [hugovk, radarhere] From dcb732d110de9c6725519a075860aea49e1ee847 Mon Sep 17 00:00:00 2001 From: hugovk Date: Mon, 14 Oct 2019 23:22:21 +0300 Subject: [PATCH 4/4] Test pypy3.6-v7.2.0 on Windows --- .github/workflows/test-windows.yml | 17 ++++++++--------- winbuild/appveyor_install_pypy3.cmd | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 541fe021c..2c80090fb 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: build: - + runs-on: windows-2016 strategy: fail-fast: false @@ -19,16 +19,15 @@ jobs: platform-vcvars: "x86_amd64" platform-msbuild: "x64" - python-version: "pypy3.6" - pypy-version: "pypy-c-jit-97588-7392d01b93d0-win32" - pypy-url: "http://buildbot.pypy.org/nightly/py3.6/pypy-c-jit-97588-7392d01b93d0-win32.zip" - # pypy-url: "https://bitbucket.org/pypy/pypy/downloads/${{ matrix.pypy-version }}.zip" + pypy-version: "pypy3.6-v7.2.0-win32" + pypy-url: "https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.2.0-win32.zip" exclude: - python-version: "pypy3.6" architecture: "x64" timeout-minutes: 30 - + name: Python ${{ matrix.python-version }} ${{ matrix.architecture }} - + steps: - uses: actions/checkout@v1 @@ -59,7 +58,7 @@ jobs: run: | "%pythonLocation%\python.exe" -m pip install wheel pytest pytest-cov pip install codecov - + - name: Fetch dependencies run: | curl -fsSL -o nasm.zip https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win64/nasm-2.14.02-win64.zip @@ -324,7 +323,7 @@ jobs: rem Add GhostScript and Raqm binaries (copied to INCLIB) to PATH. path %INCLIB%;%PATH% %PYTHON%\python.exe selftest.py --installed - + - name: Test Pillow run: | set PYTHON=%pythonLocation% @@ -333,7 +332,7 @@ jobs: path %INCLIB%;%PATH% cd /D %GITHUB_WORKSPACE% %PYTHON%\python.exe -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests - + - name: Upload coverage run: 'codecov --file "%GITHUB_WORKSPACE%\coverage.xml" --name "%pythonLocation%"' diff --git a/winbuild/appveyor_install_pypy3.cmd b/winbuild/appveyor_install_pypy3.cmd index 63659b165..3622ed6ec 100644 --- a/winbuild/appveyor_install_pypy3.cmd +++ b/winbuild/appveyor_install_pypy3.cmd @@ -1,3 +1,3 @@ -curl -fsSL -o pypy3.zip http://buildbot.pypy.org/nightly/py3.6/pypy-c-jit-97588-7392d01b93d0-win32.zip +curl -fsSL -o pypy3.zip https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.2.0-win32.zip 7z x pypy3.zip -oc:\ -c:\Python37\Scripts\virtualenv.exe -p c:\pypy-c-jit-97588-7392d01b93d0-win32\pypy3.exe c:\vp\pypy3 +c:\Python37\Scripts\virtualenv.exe -p c:\pypy3.6-v7.2.0-win32\pypy3.exe c:\vp\pypy3