-
Notifications
You must be signed in to change notification settings - Fork 33
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
Set minimum version for Pillow (10.0.0) and Python (3.8) #388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks related to #376 as these APIs were removed in Pillow 10 - https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#font-size-and-offset-methods
Thinking about it, is it also a good occasion to update setup.py
to ensure a minimal Pillow version? These functions have been deprecated since Pillow 9.2.0 - https://pillow.readthedocs.io/en/stable/releasenotes/9.2.0.html#font-size-and-offset-methods
since Pillow 10 has been around for over 6 months (01/07/2023). I think we should have to 10.0.0 as a minimum |
Thanks @jburel . Requiring Given the current timeline for Python 3.x support and the fact Python 3.7 and earlier is EOL, no objections with enforcing this from my side |
@will-moore any comment from your side? It will be good to have that PR merged and do a release so we can move forward with the test-infra upgrade work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
When looking up font.getbbox()
I noticed that it returns x, y, x2, y2
not x, y, width, height
. Width is the same as x2
if the x, y
origin is 0, 0
, but this isn't always true.
In this example, x is 0 but y isn't:
However, that's only the case if stroke isn't zero, and even then x is still 0 so we're OK for width.
I tried to run image.createMovie()
to test, but couldn't get that to work due to unrelated issues.
But I think the changes look good 👍
@will-moore do you suggest to do |
@will-moore I have made the changes to calculate the diff. I have also fixed the code in ome/omero-scripts#214 |
That looks great. Wasn't sure it was worth it given that we don't know it's needed, but nice to be sure - thx |
Since the requirement has been modified i.e. minimum version for Pillow. Proposing to merge and tag as 5.18.0 |
Should Line 221 in 0958d2b
|
Problem noticed while working on ome/omero-scripts#214