Record of trying to find an alternative to blockdiag but giving up#

Regarding sphinxcontrib.blockdiag, the dependency on Pillow 9.5 was a bottleneck, so I tried various migration solutions, but in the end I gave up on migration.

Background and purpose#

I was managing a site that used sphinxcontrib.blockdiag to visualize time series diagrams. However, blockdiag depends on Pillow 9.5 and is no longer compatible with Pillow 10.x and later versions.

The installation of Pillow 9.5 was also completed on pip, so I had to look for an alternative method.

What I tried#

  1. Attempt to migrate to Graphviz

    • Manually convert blockdiag syntax to Graphviz’s DOT notation.

    • Draw on sphinx using the graphviz directive.

    • However, I felt there was a limit to adjusting the width and height.

    • Specifying the size of each node, wrapping, etc. is also difficult on the Graphviz side.

  2. Diagram division examination

    • Try to divide the diagram into groups and create multiple diagrams.

    • As expected, I felt there was a limit to adjusting the width and height.

  3. Fixed Pillow 9.5 for blockdiag continuation

    • Official wheel provision for Pillow 9.5 has been stopped.

    • I tried maintaining it using fork.

    • Fork the official 9.5.x branch.

    • Fixed get_version() in setup.py.

    • Installation was successful with Poetry’s git dependency specification.

    • However, I ended up getting a serious error when building Sphinx: AssertionError: len(context) = 1.

    • Given the complexity of dependencies with other packages, I gave up on this option.

conclusion#

  • Visualizing diagrams using blockdiag is currently difficult to maintain and migrate.

  • Temporarily suspend the management of the relevant page and freeze it until alternative visualization methods and tools are in place.

Article information

author:

Mr. Takagi

Release date:

2025-06-02