Comment 11 for bug 1112496

Revision history for this message
Barry Warsaw (barry) wrote :

As Rachel observes in the bug description, just adding a PIL.pth file won't be enough. I do not want to modify Pillow to use non-relative imports.

What I think might work is a PILcompat.pth file and a PILcompat Python package. Inside there would be files like Image.py that do

from PIL import Image

(maybe with a __all__)

The thing is, I'm not sure I want 80 .py files inside PILcompat (the number of .py files in the PIL package in Precise) even if we can autogenerate them. A few is not so bad though.

What other PIL packages are imported through the global namespace? Can anybody provide a list of those from all the rdeps?

For now, I'll play with the idea and if it works, I'll expose Image only for now, but make it easy to add others.