Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Mar 18, 2024
Merged

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 👀

@jameslamb jameslamb merged commit 8bc4578 into master Mar 18, 2024
40 of 42 checks passed
@jameslamb jameslamb deleted the ci/pin-graphviz branch March 18, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants