Skip to content

Commit e1c41c1

Browse files
committed
fix: set pillow dependency under v10 as the "ANTIALIAS" attribute is removed in v10
1 parent be01d6a commit e1c41c1

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

mezzanine/core/templatetags/mezzanine_tags.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def compress(parser, token):
4848
loaded from ``mezzanine_tags``, allowing us to provide
4949
a dummy version when django-compressor isn't installed.
5050
"""
51-
from compressor.templatetags.compress import compress
51+
from compressor.templatetags.compress import compress # type: ignore
5252

5353
return compress(parser, token)
5454

@@ -670,14 +670,15 @@ def admin_app_list(request):
670670
}
671671
)
672672

673+
def sort_key(x):
674+
return (x["index"] if x["index"] is not None else 999, x["name"])
675+
673676
app_list = list(app_dict.values())
674-
sort = lambda x: (x["index"] if x["index"] is not None else 999, x["name"])
675677
for app in app_list:
676-
app["models"].sort(key=sort)
677-
app_list.sort(key=sort)
678+
app["models"].sort(key=sort_key)
679+
app_list.sort(key=sort_key)
678680
return app_list
679681

680-
681682
@register.inclusion_tag("admin/includes/dropdown_menu.html", takes_context=True)
682683
def admin_dropdown_menu(context):
683684
"""

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ install_requires =
5050
beautifulsoup4 >= 4.5.3
5151
requests >= 2.1.0
5252
requests-oauthlib >= 1.3
53-
pillow >= 7
53+
pillow >= 7, <10
5454
chardet >= 4
5555
pytz >= 2021.1
5656
filebrowser_safe >= 1.1.1

0 commit comments

Comments
 (0)