From 4c2446f218f840312b4366eceedbe9a76be7fe68 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 5 Jul 2023 17:25:51 -0400 Subject: [PATCH] Pin pillow<10 in CI Since the recent release of Pillow 10.0.0 the docs CI job has started failing due to an error in Pillow when trying to run the jupyter-execute cell in the `.to_dot()` docstring. It looks like a bug that was introduced in the new release which is being tracked in python-pillow/Pillow#7259 where it's trying to return a jpeg representation of the object from the RGBA data loaded from a PNG. Until the issue is resolved upstream in pillow this commit just caps the version we run in CI via the constraints file. While pillow is an optional dependency and we could cap the version in the extras, this issue isn't severe enough to warrant that, and the typical pillow usage, especially via the rustworkx api (i.e. graphviz_draw() which returns a PIL.Image object) will continue to work as expected with pillow 10.0.0 there isn't a reason to cap more broadly. This is just needed as a workaround to unblock CI. --- constraints.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/constraints.txt b/constraints.txt index f6b8e1dbc..1bc84335e 100644 --- a/constraints.txt +++ b/constraints.txt @@ -1,2 +1,3 @@ decorator==4.4.2 importlib-metadata==4.13.0;python_version<'3.8' +pillow<10.0.0