mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Drop support for EOL Python 3.6
This commit is contained in:
parent
862be7cbcd
commit
716a0baf74
|
@ -13,7 +13,7 @@ environment:
|
||||||
- PYTHON: C:/Python39
|
- PYTHON: C:/Python39
|
||||||
ARCHITECTURE: x86
|
ARCHITECTURE: x86
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
- PYTHON: C:/Python36-x64
|
- PYTHON: C:/Python37-x64
|
||||||
ARCHITECTURE: x64
|
ARCHITECTURE: x64
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
|
||||||
|
|
4
.github/workflows/test-docker.yml
vendored
4
.github/workflows/test-docker.yml
vendored
|
@ -18,12 +18,8 @@ jobs:
|
||||||
alpine,
|
alpine,
|
||||||
amazon-2-amd64,
|
amazon-2-amd64,
|
||||||
arch,
|
arch,
|
||||||
centos-7-amd64,
|
|
||||||
centos-8-amd64,
|
|
||||||
centos-stream-8-amd64,
|
|
||||||
debian-10-buster-x86,
|
debian-10-buster-x86,
|
||||||
fedora-34-amd64,
|
fedora-34-amd64,
|
||||||
ubuntu-18.04-bionic-amd64,
|
|
||||||
ubuntu-20.04-focal-amd64,
|
ubuntu-20.04-focal-amd64,
|
||||||
]
|
]
|
||||||
dockerTag: [main]
|
dockerTag: [main]
|
||||||
|
|
|
@ -3,7 +3,7 @@ repos:
|
||||||
rev: 911470a610e47d9da5ea938b0887c3df62819b85 # frozen: 21.9b0
|
rev: 911470a610e47d9da5ea938b0887c3df62819b85 # frozen: 21.9b0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: ["--target-version", "py36"]
|
args: ["--target-version", "py37"]
|
||||||
# Only .py files, until https://github.com/psf/black/issues/402 resolved
|
# Only .py files, until https://github.com/psf/black/issues/402 resolved
|
||||||
files: \.py$
|
files: \.py$
|
||||||
types: []
|
types: []
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -121,5 +121,5 @@ lint:
|
||||||
|
|
||||||
.PHONY: lint-fix
|
.PHONY: lint-fix
|
||||||
lint-fix:
|
lint-fix:
|
||||||
black --target-version py36 .
|
black --target-version py37 .
|
||||||
isort .
|
isort .
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -782,9 +781,6 @@ class TestImage:
|
||||||
34665: 196,
|
34665: 196,
|
||||||
}
|
}
|
||||||
|
|
||||||
@pytest.mark.skipif(
|
|
||||||
sys.version_info < (3, 7), reason="Python 3.7 or greater required"
|
|
||||||
)
|
|
||||||
def test_categories_deprecation(self):
|
def test_categories_deprecation(self):
|
||||||
with pytest.warns(DeprecationWarning):
|
with pytest.warns(DeprecationWarning):
|
||||||
assert hopper().category == 0
|
assert hopper().category == 0
|
||||||
|
|
|
@ -18,7 +18,9 @@ Pillow supports these Python versions.
|
||||||
+----------------------+-----+-----+-----+-----+-----+-----+-----+-----+
|
+----------------------+-----+-----+-----+-----+-----+-----+-----+-----+
|
||||||
| Python |3.10 | 3.9 | 3.8 | 3.7 | 3.6 | 3.5 | 3.4 | 2.7 |
|
| Python |3.10 | 3.9 | 3.8 | 3.7 | 3.6 | 3.5 | 3.4 | 2.7 |
|
||||||
+======================+=====+=====+=====+=====+=====+=====+=====+=====+
|
+======================+=====+=====+=====+=====+=====+=====+=====+=====+
|
||||||
| Pillow >= 8.3.2 | Yes | Yes | Yes | Yes | Yes | | | |
|
| Pillow >= 9.0 | Yes | Yes | Yes | Yes | | | | |
|
||||||
|
+----------------------+-----+-----+-----+-----+-----+-----+-----+-----+
|
||||||
|
| Pillow 8.3.2 - 8.4 | Yes | Yes | Yes | Yes | Yes | | | |
|
||||||
+----------------------+-----+-----+-----+-----+-----+-----+-----+-----+
|
+----------------------+-----+-----+-----+-----+-----+-----+-----+-----+
|
||||||
| Pillow 8.0 - 8.3.1 | | Yes | Yes | Yes | Yes | | | |
|
| Pillow 8.0 - 8.3.1 | | Yes | Yes | Yes | Yes | | | |
|
||||||
+----------------------+-----+-----+-----+-----+-----+-----+-----+-----+
|
+----------------------+-----+-----+-----+-----+-----+-----+-----+-----+
|
||||||
|
@ -443,40 +445,32 @@ Continuous Integration Targets
|
||||||
|
|
||||||
These platforms are built and tested for every change.
|
These platforms are built and tested for every change.
|
||||||
|
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| Operating system | Tested Python versions | Tested architecture |
|
| Operating system | Tested Python versions | Tested architecture |
|
||||||
+==================================+=================================+=====================+
|
+==================================+============================+=====================+
|
||||||
| Alpine | 3.9 | x86-64 |
|
| Alpine | 3.9 | x86-64 |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| Amazon Linux 2 | 3.7 | x86-64 |
|
| Amazon Linux 2 | 3.7 | x86-64 |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| Arch | 3.9 | x86-64 |
|
| Arch | 3.9 | x86-64 |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| CentOS 7 | 3.6 | x86-64 |
|
| Debian 10 Buster | 3.7 | x86 |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| CentOS 8 | 3.6 | x86-64 |
|
| Fedora 34 | 3.9 | x86-64 |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| CentOS Stream 8 | 3.6 | x86-64 |
|
| macOS 10.15 Catalina | 3.7, 3.8, 3.9, 3.10, PyPy3 | x86-64 |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| Debian 10 Buster | 3.7 | x86 |
|
| Ubuntu Linux 20.04 LTS (Focal) | 3.7, 3.8, 3.9, 3.10, PyPy3 | x86-64 |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
| +----------------------------+---------------------+
|
||||||
| Fedora 34 | 3.9 | x86-64 |
|
| | 3.8 | arm64v8, ppc64le, |
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
| | | s390x |
|
||||||
| macOS 10.15 Catalina | 3.6, 3.7, 3.8, 3.9, 3.10, PyPy3 | x86-64 |
|
+----------------------------------+----------------------------+---------------------+
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
| Windows Server 2016 | 3.7 | x86-64 |
|
||||||
| Ubuntu Linux 18.04 LTS (Bionic) | 3.6 | x86-64 |
|
+----------------------------------+----------------------------+---------------------+
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
| Windows Server 2019 | 3.7, 3.8, 3.9, 3.10, PyPy3 | x86, x86-64 |
|
||||||
| Ubuntu Linux 20.04 LTS (Focal) | 3.6, 3.7, 3.8, 3.9, 3.10, PyPy3 | x86-64 |
|
| +----------------------------+---------------------+
|
||||||
| +---------------------------------+---------------------+
|
| | 3.9/MinGW | x86, x86-64 |
|
||||||
| | 3.8 | arm64v8, ppc64le, |
|
+----------------------------------+----------------------------+---------------------+
|
||||||
| | | s390x |
|
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
|
||||||
| Windows Server 2016 | 3.6 | x86-64 |
|
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
|
||||||
| Windows Server 2019 | 3.6, 3.7, 3.8, 3.9, 3.10, PyPy3 | x86, x86-64 |
|
|
||||||
| +---------------------------------+---------------------+
|
|
||||||
| | 3.9/MinGW | x86, x86-64 |
|
|
||||||
+----------------------------------+---------------------------------+---------------------+
|
|
||||||
|
|
||||||
|
|
||||||
Other Platforms
|
Other Platforms
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
Backwards Incompatible Changes
|
Backwards Incompatible Changes
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
Python 3.6
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
Pillow has dropped support for Python 3.6, which reached end-of-life on 2021-12-23.
|
||||||
|
|
||||||
PILLOW_VERSION constant
|
PILLOW_VERSION constant
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -1000,7 +1000,6 @@ try:
|
||||||
"Development Status :: 6 - Mature",
|
"Development Status :: 6 - Mature",
|
||||||
"License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)", # noqa: E501
|
"License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)", # noqa: E501
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.6",
|
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
|
@ -1014,7 +1013,7 @@ try:
|
||||||
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
|
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
|
||||||
"Topic :: Multimedia :: Graphics :: Viewers",
|
"Topic :: Multimedia :: Graphics :: Viewers",
|
||||||
],
|
],
|
||||||
python_requires=">=3.6",
|
python_requires=">=3.7",
|
||||||
cmdclass={"build_ext": pil_build_ext},
|
cmdclass={"build_ext": pil_build_ext},
|
||||||
ext_modules=ext_modules,
|
ext_modules=ext_modules,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
|
|
@ -51,26 +51,18 @@ from . import ImageMode, TiffTags, UnidentifiedImageError, __version__, _plugins
|
||||||
from ._binary import i32le
|
from ._binary import i32le
|
||||||
from ._util import deferred_error, isPath
|
from ._util import deferred_error, isPath
|
||||||
|
|
||||||
if sys.version_info >= (3, 7):
|
|
||||||
|
|
||||||
def __getattr__(name):
|
def __getattr__(name):
|
||||||
categories = {"NORMAL": 0, "SEQUENCE": 1, "CONTAINER": 2}
|
categories = {"NORMAL": 0, "SEQUENCE": 1, "CONTAINER": 2}
|
||||||
if name in categories:
|
if name in categories:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Image categories are deprecated and will be removed in Pillow 10 "
|
"Image categories are deprecated and will be removed in Pillow 10 "
|
||||||
"(2023-01-02). Use is_animated instead.",
|
"(2023-01-02). Use is_animated instead.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
stacklevel=2,
|
stacklevel=2,
|
||||||
)
|
)
|
||||||
return categories[name]
|
return categories[name]
|
||||||
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
||||||
|
|
||||||
|
|
||||||
else:
|
|
||||||
# categories
|
|
||||||
NORMAL = 0
|
|
||||||
SEQUENCE = 1
|
|
||||||
CONTAINER = 2
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
|
@ -9,12 +9,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
/* Workaround issue #2479 */
|
|
||||||
#if PY_VERSION_HEX < 0x03070000 && defined(PySlice_GetIndicesEx) && \
|
|
||||||
!defined(PYPY_VERSION)
|
|
||||||
#undef PySlice_GetIndicesEx
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Check that we have an ANSI compliant compiler */
|
/* Check that we have an ANSI compliant compiler */
|
||||||
#ifndef HAVE_PROTOTYPES
|
#ifndef HAVE_PROTOTYPES
|
||||||
#error Sorry, this library requires support for ANSI prototypes.
|
#error Sorry, this library requires support for ANSI prototypes.
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -6,7 +6,7 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
lint
|
lint
|
||||||
py{36,37,38,39,310,py3}
|
py{37,38,39,310,py3}
|
||||||
minversion = 1.9
|
minversion = 1.9
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
|
|
@ -474,7 +474,6 @@ def build_pillow():
|
||||||
cmd_cd("{pillow_dir}"),
|
cmd_cd("{pillow_dir}"),
|
||||||
*prefs["header"],
|
*prefs["header"],
|
||||||
cmd_set("DISTUTILS_USE_SDK", "1"), # use same compiler to build Pillow
|
cmd_set("DISTUTILS_USE_SDK", "1"), # use same compiler to build Pillow
|
||||||
cmd_set("MSSdk", "1"), # for PyPy3.6
|
|
||||||
cmd_set("py_vcruntime_redist", "true"), # use /MD, not /MT
|
cmd_set("py_vcruntime_redist", "true"), # use /MD, not /MT
|
||||||
r'"{python_dir}\{python_exe}" setup.py build_ext --vendor-raqm --vendor-fribidi %*', # noqa: E501
|
r'"{python_dir}\{python_exe}" setup.py build_ext --vendor-raqm --vendor-fribidi %*', # noqa: E501
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user