blockdiag / sphinxcontrib-blockdiag

Other
16 stars 9 forks source link

Pillow 10.0.0 removed `ImageDraw.textsize` #26

Open flaper87 opened 1 year ago

flaper87 commented 1 year ago

Pillow 10.0.0 removed the textsize method: https://github.com/python-pillow/Pillow/blob/f089c2db8c1806f09e6ed53a1986146693db1ade/docs/releasenotes/10.0.0.rst#font-size-and-offset-methods

This makes something like this fail

.. blockdiag::

  blockdiag foo {
    node_width = 40;
    span_width = 40;
    A <- B <- C <- D <- E;
  }

with the following error:

Warning, treated as error:
dot code 'blockdiag foo {\n  node_width = 40;\n  span_width = 40;\n  A <- B <- C <- D <- E;\n}': 'ImageDraw' object has no attribute 'textsize'
nox > Command sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html failed with exit code 2
nox > Session docs failed.
radarhere commented 12 months ago

From what I see, sphinxcontrib-blockdiag doesn't use Pillow directly, but rather it uses reportlab which uses Pillow.

https://www.reportlab.com/about/contact/ suggests that you contact reportlab-users@lists2.reportlab.com

johnsom commented 11 months ago

FYI, there is a PR for this issue: https://github.com/blockdiag/blockdiag/pull/171