Skip to content

Feature request: Update pillow to import as pillow and follow PEP-8 naming conventions #8058

@sodul

Description

@sodul

The pillow package is a fork of PIL from 2010. While PIL did not follow the pep-8 naming conventions I feel that with the improved linting tools in the python ecosystem it might be time for pillow to mature from its original roots and start adopting pep-8.

I think this could be done in a 100% backward compatible manner and just publish pillow so that both from PIL import Image (confusing) and from pillow import image (pep-8 compliant) will work. A new pillow release could add the new compliant names and over a few releases mark the old names as deprecated, and a few years later completely remove support of the old, non compliant names.

I know this suggestion might be controversial, but folks that do not know that PIL is really pillow do get confused. If you are not previously familiar with PIL and look for a PIL library on pypi.org, there are dozens of matches and it is not very clear that you want pillow. Indirectly this is a security concern as it facilitates a supply chain attack when someone would want to add PIL to their project and innocently install a compromised version of PIL that would look like a better match than pillow.

https://pypi.org/search/?q=pil ... pillow is not even on the first 10 pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions