Bug#1040634: pycoast autopkg tests fail with pillow 10.0.0

Sebastiaan Couwenberg sebastic at xs4all.nl
Sat Jul 8 09:08:56 BST 2023


On 7/8/23 09:31, Matthias Klose wrote:
> https://ci.debian.net/data/autopkgtest/testing/amd64/p/pycoast/35498778/log.gz
> 
> [...]
> 101s self = <pycoast.cw_pil.ContourWriterPIL object at 0x7f7fa3fa6310>
> 101s draw = <PIL.ImageDraw.ImageDraw object at 0x7f7fa3fa7a10>
> 101s position = (8.56126709559166, 4), txt = '50W'
> 101s font = <PIL.ImageFont.FreeTypeFont object at 0x7f7fa3fa6690>, align 
> = 'CT'
> 101s kwargs = {'fill': 'white', 'lat_placement': 'lr', 'lon_placement': 
> 'tb', 'minor_is_tick': True, ...}
> 101s
> 101s     def _draw_text(self, draw, position, txt, font, align="cc", 
> **kwargs):
> 101s         """Draw text with agg module."""
> 101s >       txt_width, txt_height = draw.textsize(txt, font)
> 101s E       AttributeError: 'ImageDraw' object has no attribute 'textsize'
> 101s
> 101s ../build.wr6/src/pycoast/cw_base.py:170: AttributeError

 From the upstream changelog:

  Removed

   ImageDraw.textsize() and
   ImageDraw.multiline_textsize()

  Use instead

   ImageDraw.textbbox(),
   ImageDraw.textlength() and
   ImageDraw.multiline_textbbox()

https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#font-size-and-offset-methods

Kind Regards,

Bas

-- 
  GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



More information about the Pkg-grass-devel mailing list