-
-
Notifications
You must be signed in to change notification settings - Fork 853
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
Make dependency on pillow optional #1801
Comments
I'll add even another reason to replace Pillow with something else or at least make it optional, space (and network) optimization. In a project we recently added the Jira package as a dependency, the Docker image grew a few MB and made me a bit curious how only one lib could add more than 10 MB. Pillow (9.4 MiB) and PIL (6.4 MiB) are "heavy" dependencies in comparison with the Jira library (540 KiB). I know we're talking roughly 16 MB, but still, it adds up. The PIL library is only being used in one line of code in the whole project, here [1] for guessing the mimetype of the avatar image. [1] Line 4002 in 0975053
To get a better picture I did a quick experiment using the python:3.11-alpine image and then installing jira and pillow libraries separatedly.
I estimate a "pillow-less" python-with-jira image could be around 60MB. |
I would like to add another reason. Using PIL/Pillow on AWS Lambda is kind of pain. I can't build my Application in the CI/CD Pipeline because AWS Lambda can't handle PIL/Pillow when build on Alpine. This is mainly because of the c libs used by PIL/Pillow. Now there are just those solutions:
Both solutions are overhead, especially if you take into consideration that I simply don't need the PIL/Pillow functionality in the Jira Lib. |
Pillow was added in #1680 because of this issue #1557 I think Pillow is a way to complex and large dependency for the task in your MR. |
I agree with others that pillow is a bit overkill for this situation. According to PEP 594 which removes the Of these, |
Bug summary
Please provide a way to install and use your package without
pillow
which is really a nightmare to package in pyinstaller or using shiv. You can useextra
to have this dependencies optional and try/except the import only when really needed.thanks
Is there an existing issue for this?
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
No response
jira-python version
main
Python Interpreter version
3.8
Which operating systems have you used?
Reproduction steps
Stack trace
Expected behaviour
jira can be installed without pillow. only to use the image related feature this dependency is needed
Additional Context
No response
The text was updated successfully, but these errors were encountered: