Skip to content

Commit e865a21

Browse files
authored
Drop support for Python 3.6 (#63)
1 parent e2bb191 commit e865a21

File tree

10 files changed

+26
-29
lines changed

10 files changed

+26
-29
lines changed

.github/workflows/publish-pypi-pi_heif.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
python3 -m pip install cibuildwheel
4444
python3 -m cibuildwheel
4545
env:
46-
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-*"
46+
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
4747
CIBW_ARCHS_WINDOWS: "AMD64"
4848
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv -w {dest_dir} {wheel} --add-path ${{ env.MSYS2_PREFIX }}/bin"
4949
CIBW_ENVIRONMENT_WINDOWS: PH_LIGHT_ACTION=1
@@ -78,8 +78,6 @@ jobs:
7878
python3 -m cibuildwheel
7979
env:
8080
CIBW_BUILD: "*-macosx_x86_64"
81-
CIBW_SKIP: "cp36-* pp39-*"
82-
CIBW_TEST_SKIP: "cp311-*"
8381
CIBW_ENVIRONMENT_MACOS: PH_LIGHT_ACTION=1 TEST_DECODE_THREADS=0
8482

8583
- name: Checking built wheels
@@ -204,7 +202,7 @@ jobs:
204202
if-no-files-found: error
205203

206204
wheels_armv7l:
207-
name: ${{ matrix.i['name'] }} • ARMv7l • CPython3.7+
205+
name: ${{ matrix.i['name'] }} • ARMv7l • CPython
208206
runs-on: ubuntu-20.04
209207
strategy:
210208
matrix:

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
wheels_armv7l:
9-
name: ${{ matrix.i['name'] }} • ARMv7l • CPython3.7+
9+
name: ${{ matrix.i['name'] }} • ARMv7l • CPython
1010
runs-on: ubuntu-20.04
1111
strategy:
1212
matrix:
@@ -75,7 +75,7 @@ jobs:
7575
python3 -m pip install cibuildwheel
7676
python3 -m cibuildwheel
7777
env:
78-
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-*"
78+
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-*"
7979
CIBW_ARCHS_WINDOWS: "AMD64"
8080
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv -w {dest_dir} {wheel} --add-path ${{ env.MSYS2_PREFIX }}/bin"
8181
CIBW_ENVIRONMENT_WINDOWS: PH_FULL_ACTION=1
@@ -104,8 +104,6 @@ jobs:
104104
python3 -m cibuildwheel
105105
env:
106106
CIBW_BUILD: "*-macosx_x86_64"
107-
CIBW_SKIP: "cp36-* pp39-*"
108-
CIBW_TEST_SKIP: "cp311-*"
109107
CIBW_ENVIRONMENT_MACOS: PH_FULL_ACTION=1 TEST_DECODE_THREADS=0
110108

111109
- name: Check built wheels

.github/workflows/test-wheels-pi_heif.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
{ "os": "oraclelinux", "ver": "8", "arch": "arm64" },
2323
{ "os": "fedora", "ver": "35", "arch": "amd64" },
2424
{ "os": "fedora", "ver": "37", "arch": "amd64" },
25-
{ "os": "centos", "ver": "7", "arch": "amd64" },
26-
{ "os": "centos", "ver": "7", "arch": "arm64" },
2725
{ "os": "debian", "ver": "10", "arch": "amd64" },
2826
{ "os": "debian", "ver": "10", "arch": "arm64" },
2927
{ "os": "debian", "ver": "10", "arch": "arm/v7" },
@@ -148,7 +146,7 @@ jobs:
148146
runs-on: ubuntu-20.04
149147
strategy:
150148
matrix:
151-
python-version: ["pypy-3.7", "pypy-3.8", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
149+
python-version: ["pypy-3.7", "pypy-3.8", "3.7", "3.8", "3.9", "3.10", "3.11"]
152150

153151
steps:
154152
- name: Delay, waiting Pypi to update.

.github/workflows/test-wheels.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
{ "os": "oraclelinux", "ver": "8", "arch": "arm64" },
2323
{ "os": "fedora", "ver": "35", "arch": "amd64" },
2424
{ "os": "fedora", "ver": "37", "arch": "amd64" },
25-
{ "os": "centos", "ver": "7", "arch": "amd64" },
26-
{ "os": "centos", "ver": "7", "arch": "arm64" },
2725
{ "os": "debian", "ver": "10", "arch": "amd64" },
2826
{ "os": "debian", "ver": "10", "arch": "arm64" },
2927
{ "os": "debian", "ver": "10", "arch": "arm/v7" },
@@ -152,7 +150,7 @@ jobs:
152150
runs-on: ubuntu-20.04
153151
strategy:
154152
matrix:
155-
python-version: ["pypy-3.7", "pypy-3.8", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
153+
python-version: ["pypy-3.7", "pypy-3.8", "3.7", "3.8", "3.9", "3.10", "3.11"]
156154

157155
steps:
158156
- name: Delay, waiting Pypi to update.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ _# Changelog
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.9.1 - 202x-xx-xx]
6+
7+
### Added
8+
9+
### Changed
10+
11+
- Drop support for Python 3.6
12+
13+
### Fixed
14+
515
## [0.9.0 - 2022-12-15]
616

717
### Added

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ pillow_heif.register_avif_opener()
175175

176176
| **_Wheels table_** | macOS<br/>Intel | macOS<br/>Silicon | Windows<br/>64bit | musllinux* | manylinux* |
177177
|--------------------|:---------------:|:-----------------:|:-----------------:|:----------:|:----------:|
178-
| CPython 3.6 | N/A | N/A | N/A |||
179178
| CPython 3.7 || N/A ||||
180179
| CPython 3.8 ||||||
181180
| CPython 3.9 ||||||

pillow_heif/private.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Undocumented private functions to make other code look better.
33
"""
44

5+
from dataclasses import dataclass
56
from math import ceil
67
from typing import Union
78

@@ -15,9 +16,8 @@
1516
FFI_DRY_ALLOC = ffi.new_allocator(should_clear_after_alloc=False)
1617

1718

18-
# from dataclasses import dataclass
19-
# @dataclass # Available from Python 3.7
20-
class HeifCtxAsDict: # noqa # pylint: disable=too-few-public-methods
19+
@dataclass
20+
class HeifCtxAsDict:
2121
"""Representation of one image"""
2222

2323
def __init__(self, mode: str, size: tuple, data, **kwargs):
@@ -31,7 +31,7 @@ def __init__(self, mode: str, size: tuple, data, **kwargs):
3131
self.additional_info = kwargs.get("add_info", {})
3232

3333

34-
def get_pure_stride(mode: str, width: int):
34+
def get_pure_stride(mode: str, width: int) -> int:
3535
return width * MODE_INFO[mode][0] * ceil(MODE_INFO[mode][1] / 8)
3636

3737

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ filterwarnings = [
6161

6262
[tool.cibuildwheel]
6363
build-verbosity = "2"
64+
skip = ["cp36-*", "pp39-*"]
6465

6566
[tool.cibuildwheel.linux]
6667
test-extras = "tests"

setup.cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = pillow_heif
3-
description = Python 3.6+ interface to libheif library
3+
description = Python interface for libheif library
44
long_description = file: README.md
55
long_description_content_type = text/markdown
66
url = https://github.com/bigcat88/pillow_heif
@@ -15,7 +15,6 @@ classifiers =
1515
Topic :: Multimedia :: Graphics
1616
Topic :: Multimedia :: Graphics :: Graphics Conversion
1717
Programming Language :: Python :: 3
18-
Programming Language :: Python :: 3.6
1918
Programming Language :: Python :: 3.7
2019
Programming Language :: Python :: 3.8
2120
Programming Language :: Python :: 3.9
@@ -34,7 +33,7 @@ project_urls =
3433
Changelog=https://github.com/bigcat88/pillow_heif/blob/master/CHANGELOG.md
3534

3635
[options]
37-
python_requires = >=3.6
36+
python_requires = >=3.7
3837
zip_safe = False
3938
packages = find:
4039
install_requires =

setup.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@ class WheelsABI3(bdist_wheel):
88
def get_tag(self):
99
python, abi, plat = super().get_tag()
1010
if python.startswith("cp"):
11-
python = "cp36"
11+
python = "cp37"
1212
abi = "abi3"
13-
if plat.startswith("macosx"):
14-
python = "cp37" if plat.find("x86_64") != -1 else "cp38"
15-
elif plat.startswith("win"):
16-
python = "cp37"
17-
elif plat == "linux_armv7l":
18-
python = "cp37"
13+
if plat.startswith("macosx") and plat.find("x86_64") == -1:
14+
python = "cp38"
1915
return python, abi, plat
2016

2117

0 commit comments

Comments
 (0)