Closed igorlima closed 1 month ago
If you'd like to give it a try, here's how to test the proposed fix:
# install directly from the Git branch
# reference: https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch
pip3 install -I git+https://github.com/igorlima/xml2epub.git@update-pillow-version
Once you've tested it, feel free to leave a comment supporting the update to the Pillow module. The more thumbs up we get, the more likely the maintainer will approve it.
While I’m not a big fan of monkey patching, this solution has worked for me so far. It would be much appreciated to have Pillow updated here. Thanks!
I was motivated to create this PR due to an issue I encountered while trying to build an AWS Lambda layer using the xml2epub library.
To simulate the Lambda environment via Docker, you can use the following command:
The issue arises from an outdated dependency on Pillow. For some reason, I couldn't get the older version of Pillow to work with my Lambda layer. Specifically, AWS Lambda has compatibility issues with version 9.5, but everything works perfectly with the latest version, 10.4.0.
Since this small adjustment to the xml2epub code allows it to support the latest Pillow version, I felt inspired to contribute this fix. It's a small change, but I hope it helps others facing the same challenge!
For reference, here's a helpful link with a code snippet that shows how to replace the deprecated
textsize
method:Additionally, here are related issues in xml2epub about the Pillow module: