Skip to content

Commit

Permalink
Merge pull request #2392 from alanhamlett/master
Browse files Browse the repository at this point in the history
Require Pillow >= 9.1.0
  • Loading branch information
alanhamlett authored Oct 15, 2023
2 parents 856e70d + ecdc3e9 commit 955e4ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
14 changes: 0 additions & 14 deletions flask_admin/form/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@

try:
from PIL import Image, ImageOps

# to support pillow < 9.1.0
if not hasattr(Image, 'Resampling'):
from enum import IntEnum

class Resampling(IntEnum):
NEAREST = 0
BOX = 4
BILINEAR = 2
HAMMING = 5
BICUBIC = 3
LANCZOS = 1

Image.Resampling = Resampling
except ImportError:
Image = None
ImageOps = None
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Fix for older setuptools
import re
import os
import sys

from setuptools import setup, find_packages

Expand All @@ -21,6 +20,7 @@ def desc():
except IOError:
return info


# grep flask_admin/__init__.py since python 3.x cannot import it before using 2to3
file_text = read(fpath('flask_admin/__init__.py'))

Expand Down Expand Up @@ -61,7 +61,7 @@ def grep(attrname):
install_requires=install_requires,
tests_require=[
'pytest',
'pillow>=3.3.2',
'pillow>=9.1.0',
'mongoengine',
'pymongo',
'wtf-peewee',
Expand Down

0 comments on commit 955e4ee

Please sign in to comment.