doc build is broken with pillow>=10.0.0

Bug #2050090 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Description
===========
Since pillow in upper-constraints was bumped to >=10.0.0, doc build (tox -e docs) consistently fails with the following error.

```
$ tox -e docs
...
done
WARNING: dot code 'seqdiag {\n API; Conductor; Scheduler; Source; Destination;\n edge_length = 300;\n span_height = 15;\n activation = none;\n default_note_color = white;\n\n API ->> Conductor [label = "cast", note = "resize_instance/migrate_server"];\n Conductor => Scheduler [label = "MigrationTask", note = "select_destinations"];\n Conductor -> Conductor [label = "TargetDBSetupTask"];\n Conductor => Destination [label = "PrepResizeAtDestTask", note = "prep_snapshot_based_resize_at_dest"];\n Conductor => Source [label = "PrepResizeAtSourceTask", note = "prep_snapshot_based_resize_at_source"];\n Conductor => Destination [label = "FinishResizeAtDestTask", note = "finish_snapshot_based_resize_at_dest"];\n Conductor -> Conductor [label = "FinishResizeAtDestTask", note = "update instance mapping"];\n}': 'ImageDraw' object has no attribute 'textsize'
WARNING: dot code 'seqdiag {\n API; Conductor; Source;\n edge_length = 300;\n span_height = 15;\n activation = none;\n default_note_color = white;\n\n API ->> Conductor [label = "cast (or call if deleting)", note = "confirm_snapshot_based_resize"];\n\n // separator to indicate everything after this is driven by ConfirmResizeTask\n === ConfirmResizeTask ===\n\n Conductor => Source [label = "call", note = "confirm_snapshot_based_resize_at_source"];\n Conductor -> Conductor [note = "hard delete source cell instance"];\n Conductor -> Conductor [note = "update target cell instance status"];\n\n}': 'ImageDraw' object has no attribute 'textsize'
WARNING: dot code 'seqdiag {\n API; Conductor; Source; Destination;\n edge_length = 300;\n span_height = 15;\n activation = none;\n default_note_color = white;\n\n API ->> Conductor [label = "cast", note = "revert_snapshot_based_resize"];\n\n // separator to indicate everything after this is driven by RevertResizeTask\n === RevertResizeTask ===\n\n Conductor -> Conductor [note = "update records from target to source cell"];\n Conductor -> Conductor [note = "update instance mapping"];\n Conductor => Destination [label = "call", note = "revert_snapshot_based_resize_at_dest"];\n Conductor -> Conductor [note = "hard delete target cell instance"];\n Conductor => Source [label = "call", note = "finish_revert_snapshot_based_resize_at_source"];\n\n}': 'ImageDraw' object has no attribute 'textsize'
WARNING: dot code 'seqdiag {\n API; Conductor; Scheduler; Source; Destination;\n edge_length = 300;\n span_height = 15;\n activation = none;\n default_note_color = white;\n\n API -> Conductor [label = "cast", note = "resize_instance/migrate_server"];\n Conductor => Scheduler [label = "call", note = "select_destinations"];\n Conductor -> Destination [label = "cast", note = "prep_resize"];\n Source <- Destination [label = "cast", leftnote = "resize_instance"];\n Source -> Destination [label = "cast", note = "finish_resize"];\n}': 'ImageDraw' object has no attribute 'textsize'
WARNING: dot code 'seqdiag {\n API; Source;\n edge_length = 300;\n span_height = 15;\n activation = none;\n default_note_color = white;\n\n API -> Source [label = "cast (or call if deleting)", note = "confirm_resize"];\n}': 'ImageDraw' object has no attribute 'textsize'
WARNING: dot code 'seqdiag {\n API; Source; Destination;\n edge_length = 300;\n span_height = 15;\n activation = none;\n default_note_color = white;\n\n API -> Destination [label = "cast", note = "revert_resize"];\n Source <- Destination [label = "cast", leftnote = "finish_revert_resize"];\n}': 'ImageDraw' object has no attribute 'textsize'
WARNING: dot code 'actdiag {\n build-spec -> send-spec -> send-reqs -> query -> return-rps ->\n create -> filter -> claim -> return-hosts -> send-hosts;\n\n lane conductor {\n label = "Conductor";\n build-spec [label = "Build request spec object", height = 38];\n send-spec [label = "Submit request spec to scheduler", height = 38];\n send-hosts [label = "Submit list of suitable hosts to target cell", height = 51];\n }\n\n lane scheduler {\n label = "Scheduler";\n send-reqs [label = "Submit resource requirements to placement", height = 64];\n create [label = "Create a HostState object for each RP returned from Placement", height = 64];\n filter [label = "Filter and weigh results", height = 38];\n return-hosts [label = "Return a list of selected host & alternates, along with their allocations, to the conductor", height = 89];\n }\n\n lane placement {\n label = "Placement";\n query [label = "Query to determine the RPs representing compute nodes to satisfy requirements", height = 64];\n return-rps [label = "Return list of resource providers and their corresponding allocations to scheduler", height = 89];\n claim [label = "Create allocations against selected compute node", height = 64];\n }\n}': 'ImageDraw' object has no attribute 'textsize'

Sphinx parallel build error:
AssertionError: len(context) = 1
```

pillow 10.0.0 removed the deprecated interfaces including textsize which is seen in the error.

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

Steps to reproduce
==================
- Build documentation using the current master
 $ tox -e docs

Expected result
===============
Build completes without error

Actual result
=============
Build fails with the error described above

Environment
===========
N/A

Logs & Configs
==============
N/A

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

We can probably attempt to fix https://opendev.org/openstack/nova/src/branch/master/doc/source/conf.py#L260 . Note that the same problem was reported in upstream blockdiag[1].

[1] https://github.com/blockdiag/blockdiag/issues/178

One important note is that blockdiag looks unmaintained[2]. NO PR has been merged since 2021. We probably have to even replace it by something else.

[2] https://github.com/blockdiag/blockdiag/issues/177

Revision history for this message
Takashi Kajinami (kajinamit) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.