From eb9ef9db4ed29524e5789b2fc320165add60c276 Mon Sep 17 00:00:00 2001 From: Dosenpfand Date: Sat, 28 Oct 2023 20:55:45 +0200 Subject: [PATCH 1/3] Update shield of supported Python versions --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 50dcc4bf95..4748790240 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Flask App Builder :alt: PyPI :target: https://pypi.org/project/Flask-AppBuilder/ -.. image:: https://img.shields.io/badge/pyversions-3.6%2C3.7-blue.svg +.. image:: https://img.shields.io/badge/pyversions-3.8%2C%203.9%2C%203.10%2C%203.11%2C%203.12-blue.svg :target: https://www.python.org/ .. image:: https://codecov.io/github/dpgaspar/Flask-AppBuilder/coverage.svg?branch=master From 90b024a292ece230537b243e2424187afb6dd154 Mon Sep 17 00:00:00 2001 From: Dosenpfand Date: Sat, 14 Oct 2023 10:02:14 +0200 Subject: [PATCH 2/3] Upgrade to Pillow 10.0.1 --- flask_appbuilder/filemanager.py | 8 ++++---- requirements-extra.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flask_appbuilder/filemanager.py b/flask_appbuilder/filemanager.py index 463072686a..dc9ee64728 100644 --- a/flask_appbuilder/filemanager.py +++ b/flask_appbuilder/filemanager.py @@ -204,17 +204,17 @@ def resize(self, image, size): """ Resizes the image - :param image: The image object - :param size: size is PIL tuple (width, heigth, force) ex: (200,100,True) + :param image: The image object + :param size: size is PIL tuple (width, heighth, force) ex: (200,100,True) """ (width, height, force) = size if image.size[0] > width or image.size[1] > height: if force: - return ImageOps.fit(self.image, (width, height), Image.ANTIALIAS) + return ImageOps.fit(self.image, (width, height), Image.LANCZOS) else: thumb = self.image.copy() - thumb.thumbnail((width, height), Image.ANTIALIAS) + thumb.thumbnail((width, height), Image.LANCZOS) return thumb return image diff --git a/requirements-extra.txt b/requirements-extra.txt index 871115f7ab..b70763aa8d 100644 --- a/requirements-extra.txt +++ b/requirements-extra.txt @@ -1,4 +1,4 @@ -Pillow~=9.1 +Pillow~=10.0.1 cython==0.29.17 mysqlclient==2.0.1 psycopg2-binary==2.9.6 From 2e13b777b6899b9acd789acf063f0b108cc2a843 Mon Sep 17 00:00:00 2001 From: Dosenpfand Date: Mon, 20 Nov 2023 22:30:52 +0100 Subject: [PATCH 3/3] Fix typo --- flask_appbuilder/filemanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_appbuilder/filemanager.py b/flask_appbuilder/filemanager.py index dc9ee64728..2a81310d3f 100644 --- a/flask_appbuilder/filemanager.py +++ b/flask_appbuilder/filemanager.py @@ -205,7 +205,7 @@ def resize(self, image, size): Resizes the image :param image: The image object - :param size: size is PIL tuple (width, heighth, force) ex: (200,100,True) + :param size: size is PIL tuple (width, height, force) ex: (200,100,True) """ (width, height, force) = size