Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated installation warnings #7814

Merged
merged 2 commits into from
Feb 24, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Feb 19, 2024

I think we can remove the three warnings from the top of https://pillow.readthedocs.io/en/stable/installation.html


Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.

I seem to remember that around ten years ago, it used to be possible to install PIL from PyPI.

It used to be that PyPI would allow installing files hosted elsewhere, but now all files must be uploaded to PyPI, and there are no downloadable files at https://pypi.org/project/PIL/.

I don't think it's possible now to install PIL and Pillow at the same time, even if you tried installing PIL from source.


Pillow >= 1.0 no longer supports import Image. Please use from PIL import Image instead.

https://pypi.org/project/pillow/1.0/ was released in 2010. I don't think we need to warn about this any more.


Pillow >= 2.1.0 no longer supports import _imaging. Please use from PIL.Image import core as _imaging instead.

https://pypi.org/project/pillow/2.1.0/ was released in 2013. I don't think we need to warn about this either.

@aclark4life
Copy link
Member

I would say maybe move them, rather than remove them, or at least add your explanations for historical context. Re-reading them still triggers my PTSD 😄 and while I'm not sure how effective those warnings are, I'd be surprised if we'd seen the last of such issues. So, it would be nice to have a documentation link handy to use in such cases. That said, it probably doesn't need to be the first thing folks read anymore.

@hugovk
Copy link
Member Author

hugovk commented Feb 19, 2024

I definitely remember juggling installs/uninstalls for the first one but it just cannot happen anymore:

pip install pil
ERROR: Could not find a version that satisfies the requirement pil (from versions: none)
ERROR: No matching distribution found for pil

For the second, I don't recall anyone tripping up over import Image (but I could have forgotten and it's hard to search for), and don't find any results for the symptom ModuleNotFoundError: No module named 'Image'.

And I also don't recall any for the third. There are many results for import _imaging in issues, but the couple I checked were from tracebacks of our own internal use.

If someone tripped up over it, we would have told them to do from PIL.Image import core as _imaging. But the only results for that are #249 (2013) where we first added this warning for 2.1.0, and #1016 (2014) where I suggested removing it.

@aclark4life
Copy link
Member

FWIW import Image is a Zope vs. PIL issue and predates the fork, see: https://mail.python.org/pipermail/image-sig/2010-August/006440.html. So, yeah, we don't need this stuff anymore but I also don't want to forget about it. So, I'd just like to see some link or section or something added to the documentation to coincide with the removal of the outdated warnings. But that's just me! I don't feel that strongly about it, and I'm willing to be overruled 😄

@aclark4life
Copy link
Member

Probably can just move them to here: https://pillow.readthedocs.io/en/stable/deprecations.html

@hugovk
Copy link
Member Author

hugovk commented Feb 24, 2024

Yeah, that'd work. Updated!

@aclark4life aclark4life merged commit ee37c63 into python-pillow:main Feb 24, 2024
6 of 8 checks passed
@aclark4life
Copy link
Member

Cool thanks

@hugovk hugovk deleted the docs-rm-warnings branch February 24, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants