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,
textsizemethod no longer exists