Skip to content

[ci] put ceiling on graphviz in Python 3.7 jobs#6370

Merged
jameslamb merged 2 commits intomasterfrom
ci/pin-graphviz
Mar 18, 2024
Merged

[ci] put ceiling on graphviz in Python 3.7 jobs#6370
jameslamb merged 2 commits intomasterfrom
ci/pin-graphviz

Conversation

@jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Mar 18, 2024

Python 3.7 CI jobs are failing with this error:

../../../.local/lib/python3.7/site-packages/lightgbm/compat.py:62: in <module>
    import graphviz  # noqa: F401
../../../miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/__init__.py:31: in <module>
    from .backend import (DOT_BINARY, UNFLATTEN_BINARY,
../../../miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/backend/__init__.py:5: in <module>
    from .mixins import Render, Pipe, Unflatten, View
../../../miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/backend/mixins.py:8: in <module>
    from . import piping
../../../miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/backend/piping.py:5: in <module>
    from .. import _tools
E     File "/Users/runner/miniforge/envs/test-env/lib/python3.7/site-packages/graphviz/_tools.py", line 23
E       def attach(object: typing.Any, /, name: str) -> typing.Callable:
E                                      ^
E   SyntaxError: invalid syntax

Example recent build from master: (build link).

python-graphviz has a floor of python>=3.8 since xflr6/graphviz#202, but I guess that hasn't extended to the conda-forge package. That results in a newer version of python-graphviz being pulled into a Python 3.7 environment which contains invalid syntax for Python 3.7.

This PR proposes putting a ceiling on python-graphviz in LightGBM's Python 3.7 CI jobs.

Notes for Reviewers

Looks like this is the result of the latest python-graphviz release on conda-forge about 4 hours ago: conda-forge/python-graphviz-feedstock#55.

I don't think conda-forge will be interested in a repodata patch to prevent this from happening, so I'm not planning to propose one. Based on this evidence:

I did put up conda-forge/python-graphviz-feedstock#56 proposing adding a python>=3.8 floor on conda-forge, so maybe if that's merged we could eventually remove this ceiling in CI scripts.

If this ceiling on python-graphviz causes problems in the future, I'd support turning off the plotting tests for Python 3.7 environments.

@jameslamb jameslamb changed the title WIP: [ci] put ceiling on graphviz in Python 3.7 jobs [ci] put ceiling on graphviz in Python 3.7 jobs Mar 18, 2024
@jameslamb jameslamb marked this pull request as ready for review March 18, 2024 03:34
@jameslamb
Copy link
Collaborator Author

absolutely BRUTAL week for our CI 😭

Copy link
Collaborator

@borchero borchero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@borchero
Copy link
Collaborator

Let's go? 😄 this should unblock a lot of CI 👀

@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity since it was closed.
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants