pklaus / brother_ql_web

A Python-based web service to print labels on Brother QL label printers. Based on brother_ql: https://github.com/pklaus/brother_ql
GNU General Public License v3.0
254 stars 124 forks source link

Deprecation Warning from Pillow #46

Open michaeltraxler opened 1 year ago

michaeltraxler commented 1 year ago

The used library Pillow seems to change and it might be necessary to react?

brother_ql_web.py:120: DeprecationWarning: multiline_textsize is deprecated and will be removed in Pillow 10 (2023-07-01). Use multiline_textbbox instead. textsize = draw.multiline_textsize(text, font=im_font)

FriedrichFroebel commented 1 year ago

As Pillow 10 has been published, this might actually be a hard error in some systems: https://pillow.readthedocs.io/en/stable/deprecations.html#font-size-and-offset-methods

When doing some changes on my personal fork with some custom features, I fixed this as well (this the solution the Pillow developers recommend as well): https://github.com/FriedrichFroebel/brother_ql_web/commit/17dbdf17826f1e81de5dcb8b6ec1b69df89c4a7f#diff-de421af0299c557fa29364d4cc862f1da261c17cf0a962aae9036772208257fdL119-R123 Due to this repository appearing unmaintained from Philipp's side, I currently do not have any plans to create a corresponding PR.