-
Notifications
You must be signed in to change notification settings - Fork 678
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
Change deprecated .textsize into .textlength #2623
Conversation
Thanks for the patch! Do you know if there is any functional difference between .textsize() and .textlength(), or is this just a renaming? |
Also, .textlength() seems to have been added in version 9.2.0 which is from July 2022 according to https://pypi.org/project/pillow/#history. Maybe we still want to call .textsize() for older Pillow versions... |
Call the deprecated method `textsize` when using older pillow versions
Good catch, I added a version check in fac8b0e |
Let me know if you need anything else from my side! |
I don't think this will work. |
Co-authored-by: Adam Raizen <[email protected]>
This looks good now. I've tested it with Pillow 10 and Pillow 9.5.0 (the latter was painful to build...). Thanks! |
See https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#font-size-and-offset-methods
Changed in pillow 10,
textsize
method no longer exists