From 7d2f2f17cf966c240a20f5812124fe16ca87007f Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Tue, 26 Sep 2023 14:55:33 +0200 Subject: [PATCH 1/2] ci: bump ci base distro to ubuntu 20.04 ubuntu-18.04 has been remove since a few and so tests are silently not running. So while at it update python versions tested, drop 2.7 and 3.5 and add 3.11. --- .github/workflows/python.yml | 4 ++-- tox.ini | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b9dc29b..8fc84c6 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -9,11 +9,11 @@ on: jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: max-parallel: 4 matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index 122083c..dce4efa 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{310,39,38,37,36,35,27}, + py{311,310,39,38,37,36}, coverage-report [testenv] @@ -19,4 +19,4 @@ skip_install = true setenv = COVERAGE_FILE=.coverage commands = coverage combine - coverage report \ No newline at end of file + coverage report From 05d9f4825008dc707cf3c0c695d1281b30a0975b Mon Sep 17 00:00:00 2001 From: Ademaro Date: Mon, 17 Jul 2023 00:43:00 +0530 Subject: [PATCH 2/2] Change deprecated ANTIALIAS to LANCZOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ANTIALIAS — not working 10+ LANCZOS — working since 2.6 Fix #64 --- pilkit/processors/resize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pilkit/processors/resize.py b/pilkit/processors/resize.py index cefb34d..413e386 100644 --- a/pilkit/processors/resize.py +++ b/pilkit/processors/resize.py @@ -22,7 +22,7 @@ def __init__(self, width, height, upscale=True): def process(self, img): if self.upscale or (self.width < img.size[0] and self.height < img.size[1]): img = resolve_palette(img) - img = img.resize((self.width, self.height), Image.ANTIALIAS) + img = img.resize((self.width, self.height), Image.LANCZOS) return img