SeedSigner / seedsigner

Use an air-gapped Raspberry Pi Zero to sign for Bitcoin transactions! (and do other cool stuff)
MIT License
720 stars 168 forks source link

Fix Deprecations related to font.getsize in Pillow #485

Closed newtonick closed 8 months ago

newtonick commented 1 year ago

Description

PR #477 introduced deprecation warnings when Pillow was updated. Eventually when/if we upgrade to Pillow 10.0 font.getsize will stop working. This PR replaces font.getsize with font.getbbox. See Pillow deprecation notes here: https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html

Here is an example of the deprecation warning

DeprecationWarning: getsize is deprecated and will be removed in Pillow 10 (2023-07-01). Use getbbox or getlength instead

You can see these warnings when running the screenshot generator and using Pillow 9.4.

This pull request is categorized as a:

Checklist

If you modified or added functionality/workflow, did you add new unit tests?

I have tested this PR on the following platforms/os: