Skip to content

Commit

Permalink
Merge branch 'master' into rm-2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 26, 2019
2 parents 28ff798 + 710a520 commit 40133cf
Show file tree
Hide file tree
Showing 26 changed files with 107 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ environment:
TEST_OPTIONS:
DEPLOY: YES
matrix:
- PYTHON: C:\Python38rc1-x64
- PYTHON: C:/Python37
- PYTHON: C:/Python37-x64
- PYTHON: C:/Python36
Expand All @@ -28,7 +29,6 @@ environment:
EXECUTABLE: bin/pypy.exe
PIP_DIR: bin
VENV: YES
- PYTHON: C:\Python38rc1-x64


install:
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tidelift: pypi/pillow
tidelift: "pypi/Pillow"
2 changes: 0 additions & 2 deletions .github/workflows/macos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -e

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

brew install libtiff libjpeg webp little-cms2

PYTHONOPTIMIZE=0 pip install cffi
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
run: |
"%pythonLocation%\python.exe" -m pip install wheel pytest pytest-cov
pip install codecov
shell: cmd

- name: Fetch dependencies
run: |
Expand Down Expand Up @@ -96,6 +97,7 @@ jobs:
copy /Y /B j*.h %INCLIB%
copy /Y /B *.lib %INCLIB%
copy /Y /B *.exe %INCLIB%
shell: cmd

- name: Build dependencies / libjpeg-turbo
run: |
Expand All @@ -114,6 +116,7 @@ jobs:
copy /Y /B jpeg-static.lib %INCLIB%\libjpeg.lib
copy /Y /B cjpeg-static.exe %INCLIB%\cjpeg.exe
copy /Y /B djpeg-static.exe %INCLIB%\djpeg.exe
shell: cmd

- name: Build dependencies / zlib
run: |
Expand All @@ -128,6 +131,7 @@ jobs:
copy /Y /B z*.h %INCLIB%
copy /Y /B *.lib %INCLIB%
copy /Y /B zlib.lib %INCLIB%\z.lib
shell: cmd

- name: Build dependencies / LibTIFF
run: |
Expand All @@ -143,6 +147,7 @@ jobs:
copy /Y /B libtiff\tiff*.h %INCLIB%
copy /Y /B libtiff\*.dll %INCLIB%
copy /Y /B libtiff\*.lib %INCLIB%
shell: cmd

- name: Build dependencies / WebP
run: |
Expand All @@ -157,6 +162,7 @@ jobs:
mkdir %INCLIB%\webp
copy /Y /B src\webp\*.h %INCLIB%\webp
copy /Y /B output\release-static\${{ matrix.architecture }}\lib\* %INCLIB%
shell: cmd

- name: Build dependencies / FreeType
run: |
Expand All @@ -176,6 +182,7 @@ jobs:
%MSBUILD% builds\windows\vc2010\freetype.sln /t:Build /p:Configuration="Release Static" /p:Platform=${{ matrix.platform-msbuild }} /m
xcopy /Y /E /Q include %INCLIB%
copy /Y /B "objs\${{ matrix.platform-msbuild }}\Release Static\freetype.lib" %INCLIB%
shell: cmd

- name: Build dependencies / LCMS2
run: |
Expand All @@ -193,6 +200,7 @@ jobs:
%MSBUILD% Projects\VC2015\lcms2.sln /t:Clean;lcms2_static /p:Configuration="Release" /p:Platform=${{ matrix.platform-msbuild }} /m
xcopy /Y /E /Q include %INCLIB%
copy /Y /B Lib\MS\*.lib %INCLIB%
shell: cmd

- name: Build dependencies / OpenJPEG
run: |
Expand All @@ -211,6 +219,7 @@ jobs:
mkdir %INCLIB%\openjpeg-2.3.1
copy /Y /B src\lib\openjp2\*.h %INCLIB%\openjpeg-2.3.1
copy /Y /B bin\*.lib %INCLIB%
shell: cmd

# GPL licensed; skip if building wheels
- name: Build dependencies / libimagequant
Expand All @@ -233,6 +242,7 @@ jobs:
nmake -nologo -f Makefile
copy /Y /B *.h %INCLIB%
copy /Y /B *.lib %INCLIB%
shell: cmd

# for Raqm
- name: Build dependencies / HarfBuzz
Expand All @@ -253,6 +263,7 @@ jobs:
nmake -nologo -f Makefile harfbuzz
copy /Y /B src\*.h %INCLIB%
copy /Y /B *.lib %INCLIB%
shell: cmd

# for Raqm
- name: Build dependencies / FriBidi
Expand All @@ -272,6 +283,7 @@ jobs:
nmake -nologo -f Makefile fribidi
copy /Y /B lib\*.h %INCLIB%
copy /Y /B *.lib %INCLIB%
shell: cmd

# failing with PyPy3
- name: Build dependencies / Raqm
Expand All @@ -293,6 +305,7 @@ jobs:
nmake -nologo -f Makefile libraqm
copy /Y /B src\*.h %INCLIB%
copy /Y /B libraqm.dll %INCLIB%
shell: cmd

- name: Build dependencies / ghostscript
run: |
Expand All @@ -308,6 +321,7 @@ jobs:
nmake -nologo -f psi\msvc.mak
rem Add bin to PATH variable: Copy to INCLIB, then add INCLIB to PATH in Test step.
copy /Y /B bin\* %INCLIB%
shell: cmd

- name: Build Pillow
run: |
Expand All @@ -323,6 +337,7 @@ jobs:
rem Add GhostScript and Raqm binaries (copied to INCLIB) to PATH.
path %INCLIB%;%PATH%
%PYTHON%\python.exe selftest.py --installed
shell: cmd

- name: Test Pillow
run: |
Expand All @@ -332,9 +347,11 @@ jobs:
path %INCLIB%;%PATH%
cd /D %GITHUB_WORKSPACE%
%PYTHON%\python.exe -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests
shell: cmd

- name: Upload coverage
run: 'codecov --file "%GITHUB_WORKSPACE%\coverage.xml" --name "%pythonLocation%"'
shell: cmd

- name: Build wheel
id: wheel
Expand All @@ -351,6 +368,7 @@ jobs:
set INCLUDE=%INCLIB%;%GITHUB_WORKSPACE%\depends\tcl86\include;%INCLUDE%
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ${{ matrix.platform-vcvars }} 8.1
%PYTHON%\python.exe setup.py bdist_wheel
shell: cmd

- uses: actions/upload-artifact@v1
if: "github.event_name == 'push' && !contains(matrix.python-version, 'pypy')"
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ matrix:
env: LINT="true"
- python: "pypy3"
name: "PyPy3 Xenial"
- python: "3.8"
name: "3.8 Xenial"
services: xvfb
- python: '3.7'
name: "3.7 Xenial"
services: xvfb
Expand All @@ -29,9 +32,6 @@ matrix:
name: "3.5 Xenial PYTHONOPTIMIZE=2"
env: PYTHONOPTIMIZE=2
services: xvfb
- python: "3.8-dev"
name: "3.8-dev Xenial"
services: xvfb
- env: DOCKER="alpine" DOCKER_TAG="master"
- env: DOCKER="arch" DOCKER_TAG="master" # contains PyQt5
- env: DOCKER="ubuntu-16.04-xenial-amd64" DOCKER_TAG="master"
Expand Down
3 changes: 3 additions & 0 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
set -e

coverage erase
if [ $(uname) == "Darwin" ]; then
export CPPFLAGS="-I/usr/local/miniconda/include";
fi
make clean
make install-coverage
8 changes: 7 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ Changelog (Pillow)
- Changed default frombuffer raw decoder args #1730
[radarhere]

6.2.0 (2019-10-01)
6.2.1 (2019-10-21)
------------------

- This is the last Pillow release to support Python 2.7 #3642

- Add support for Python 3.8 #4141
[hugovk]

6.2.0 (2019-10-01)
------------------

- Catch buffer overruns #4104
[radarhere]

Expand Down
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pillow is the friendly PIL fork by `Alex Clark and Contributors <https://github.
* - docs
- |docs|
* - tests
- |linux| |macos| |windows| |gha_lint| |gha_docker| |coverage|
- |linux| |macos| |windows| |gha_lint| |gha| |gha_windows| |gha_docker| |coverage|
* - package
- |zenodo| |tidelift| |version| |downloads|
* - social
Expand Down Expand Up @@ -66,6 +66,12 @@ To report a security vulnerability, please follow the procedure described in the
.. |gha_docker| image:: https://github.com/python-pillow/Pillow/workflows/Test%20Docker/badge.svg
:alt: GitHub Actions build status (Test Docker)

.. |gha| image:: https://github.com/python-pillow/Pillow/workflows/Test/badge.svg
:alt: GitHub Actions build status (Test Linux and macOS)

.. |gha_windows| image:: https://github.com/python-pillow/Pillow/workflows/Test%20Windows/badge.svg
:alt: GitHub Actions build status (Test Windows)

.. |coverage| image:: https://codecov.io/gh/python-pillow/Pillow/branch/master/graph/badge.svg
:target: https://codecov.io/gh/python-pillow/Pillow
:alt: Code coverage
Expand Down
1 change: 1 addition & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Released as needed for security, installation or critical bug fixes.
make sdist
```
* [ ] Create [binary distributions](https://github.com/python-pillow/Pillow/blob/master/RELEASING.md#binary-distributions)
* [ ] Upload all binaries and source distributions e.g. `twine upload dist/Pillow-5.2.1*`
* [ ] Create a [new release on GitHub](https://github.com/python-pillow/Pillow/releases/new)

## Embargoed Release
Expand Down
24 changes: 3 additions & 21 deletions Tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,11 @@ def convert_to_comparable(a, b):


class PillowTestCase(unittest.TestCase):
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
# holds last result object passed to run method:
self.currentResult = None

def run(self, result=None):
self.currentResult = result # remember result for use later
unittest.TestCase.run(self, result) # call superclass run method

def delete_tempfile(self, path):
try:
ok = self.currentResult.wasSuccessful()
except AttributeError: # for pytest
ok = True

if ok:
# only clean out tempfiles if test passed
try:
os.remove(path)
except OSError:
pass # report?
else:
print("=== orphaned temp file: %s" % path)
os.remove(path)
except OSError:
pass # report?

def assert_deep_equal(self, a, b, msg=None):
try:
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_imageqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def tearDown(self):

class PillowQPixmapTestCase(PillowQtTestCase):
def setUp(self):
PillowQtTestCase.setUp(self)
super().setUp()
try:
if ImageQt.qt_version == "5":
from PyQt5.QtGui import QGuiApplication
Expand All @@ -37,7 +37,7 @@ def setUp(self):
self.app = QGuiApplication([])

def tearDown(self):
PillowQtTestCase.tearDown(self)
super().tearDown()
self.app.quit()


Expand Down
42 changes: 22 additions & 20 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ Notes

.. note:: Pillow is supported on the following Python versions

+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|**Python** |**2.4**|**2.5**|**2.6**|**2.7**|**3.2**|**3.3**|**3.4**|**3.5**|**3.6**|**3.7**|
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow < 2.0.0 | Yes | Yes | Yes | Yes | | | | | | |
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 2.x - 3.x | | | Yes | Yes | Yes | Yes | Yes | Yes | | |
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 4.x | | | | Yes | | Yes | Yes | Yes | Yes | |
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 5.0.x - 5.1.x | | | | Yes | | | Yes | Yes | Yes | |
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 5.2.x - 5.4.x | | | | Yes | | | Yes | Yes | Yes | Yes |
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 6.x | | | | Yes | | | | Yes | Yes | Yes |
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow >= 7.0.0 | | | | | | | | Yes | Yes | Yes |
+---------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|**Python** |**2.4**|**2.5**|**2.6**|**2.7**|**3.2**|**3.3**|**3.4**|**3.5**|**3.6**|**3.7**|**3.8**|
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow < 2 | Yes | Yes | Yes | Yes | | | | | | | |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 2 - 3 | | | Yes | Yes | Yes | Yes | Yes | Yes | | | |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 4 | | | | Yes | | Yes | Yes | Yes | Yes | | |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 5.0 - 5.1 | | | | Yes | | | Yes | Yes | Yes | | |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 5.2 - 5.4 | | | | Yes | | | Yes | Yes | Yes | Yes | |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 6.0 - 6.2.0 | | | | Yes | | | | Yes | Yes | Yes | |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow 6.2.1 | | | | Yes | | | | Yes | Yes | Yes | Yes |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|Pillow >= 7 | | | | | | | | Yes | Yes | Yes | Yes |
+-------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+

Basic Installation
------------------
Expand Down Expand Up @@ -402,12 +404,12 @@ These platforms are built and tested for every change.
+----------------------------------+-------------------------------+-----------------------+
| Fedora 30 | 2.7, 3.7 |x86-64 |
+----------------------------------+-------------------------------+-----------------------+
| macOS 10.13 High Sierra* | 2.7, 3.5, 3.6, 3.7 |x86-64 |
| macOS 10.13 High Sierra* | 2.7, 3.5, 3.6, 3.7, 3.8 |x86-64 |
+----------------------------------+-------------------------------+-----------------------+
| Ubuntu Linux 16.04 LTS | 2.7, 3.5, 3.6, 3.7, |x86-64 |
| Ubuntu Linux 16.04 LTS | 2.7, 3.5, 3.6, 3.7, 3.8, |x86-64 |
| | PyPy, PyPy3 | |
+----------------------------------+-------------------------------+-----------------------+
| Windows Server 2012 R2 | 2.7, 3.5, 3.6, 3.7 |x86, x86-64 |
| Windows Server 2012 R2 | 2.7, 3.5, 3.6, 3.7, 3.8 |x86, x86-64 |
| +-------------------------------+-----------------------+
| | PyPy, 3.7/MinGW |x86 |
+----------------------------------+-------------------------------+-----------------------+
Expand Down
8 changes: 0 additions & 8 deletions docs/releasenotes/6.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ shared instance of ``Image.Exif``.
Deprecations
^^^^^^^^^^^^

Python 2.7
~~~~~~~~~~

Python 2.7 reaches end-of-life on 2020-01-01.

Pillow 7.0.0 will be released on 2020-01-01 and will drop support for Python
2.7, making Pillow 6.2.x the last release series to support Python 2.

Image.frombuffer
~~~~~~~~~~~~~~~~

Expand Down
26 changes: 26 additions & 0 deletions docs/releasenotes/6.2.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
6.2.1
-----

API Changes
===========

Deprecations
^^^^^^^^^^^^

Python 2.7
~~~~~~~~~~

Python 2.7 reaches end-of-life on 2020-01-01.

Pillow 7.0.0 will be released on 2020-01-01 and will drop support for Python
2.7, making Pillow 6.2.x the last release series to support Python 2.

Other Changes
=============



Support added for Python 3.8
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Pillow 6.2.1 supports Python 3.8.
Loading

0 comments on commit 40133cf

Please sign in to comment.