Tool: PEP8 Style Checker Processed Files: djblets/util/templatetags/djblets_images.py Tool: Pyflakes Processed Files: djblets/util/templatetags/djblets_images.py
Update PIL import
Review Request #7876 — Created Jan. 15, 2016 and submitted
Previously, if PIL's
Imagelibrary could not be imported, the
module would be imported. However, this is not a good way to import PIL
becuase it masks the errors from the first import, which can occur if
some dependencies (such as
libjpeg) are missing.
- Ran unit tests.
According to this link this suggests that it was around 2011 / PIL 1.2 that the decision was made to change importing behaviour so that you can't import
Imagefrom the global namespace. However, the PIL website says that the current release is 1.1.7...
So it's not clear to me what configurations we might be breaking here. Is it possible that there are instances of Review Board (or other Djblets apps) out there running versions of PIL that rely on
import Image, and if so, do we care about them?