diff --git a/CHANGES.rst b/CHANGES.rst index c5ba3d6..5d6244b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,14 @@ ChangeLog --------- +0.2.3 +~~~~~ + +Release date: 2023/11/28 + +- Fix the compatibility issue with Flask ``3.x``. + + 0.2.2 ~~~~~ diff --git a/flask_avatars/__init__.py b/flask_avatars/__init__.py index 835efc4..7aab15c 100644 --- a/flask_avatars/__init__.py +++ b/flask_avatars/__init__.py @@ -15,9 +15,9 @@ from uuid import uuid4 -import PIL from PIL import Image -from flask import current_app, Blueprint, url_for, Markup +from flask import current_app, Blueprint, url_for +from markupsafe import Markup from .identicon import Identicon # noqa @@ -283,7 +283,7 @@ def resize_avatar(self, img, base_width): """ w_percent = (base_width / float(img.size[0])) h_size = int((float(img.size[1]) * float(w_percent))) - img = img.resize((base_width, h_size), PIL.Image.ANTIALIAS) + img = img.resize((base_width, h_size), Image.BICUBIC) return img def save_avatar(self, image): diff --git a/setup.py b/setup.py index 21997ab..3751ecf 100644 --- a/setup.py +++ b/setup.py @@ -21,9 +21,9 @@ setup( name='Flask-Avatars', - version='0.2.2', + version='0.2.3', description='All avatar generators in one place.', - url='https://github.com/greyli/flask-avatars', + url='https://github.com/helloflask/flask-avatars', license='MIT', author='Grey Li', author_email='withlihui@gmail.com', @@ -44,14 +44,12 @@ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ]