Update PIL import
Review Request #7876 — Created Jan. 15, 2016 and submitted
Previously, if PIL's
Image
library could not be imported, theImage
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 aslibtiff
orlibjpeg
) 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
Image
from 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?