Skip to content

CI Update CI lock files [doc build] - #34419

Merged
ogrisel merged 7 commits into
scikit-learn:mainfrom
betatim:fix-lockfile-matplotlib-cython
Jul 3, 2026
Merged

ogrisel merged 7 commits into
scikit-learn:mainfrom
betatim:fix-lockfile-matplotlib-cython

Conversation

@betatim

@betatim betatim commented Jun 30, 2026

Copy link
Copy Markdown
Member

Reference Issues/PRs

#34409

What does this implement/fix? Explain your changes.

This relocks the lockfiles from the bot's PR to include a newer version of cython (see #34344 (comment))

I will also include the updates to the example gallery that are needed for the newer version of matplotlib.

AI usage disclosure

I used AI assistance for:

  • Research and understanding

@betatim betatim changed the title Update CI lock files [doc build] CI Update CI lock files [doc build] Jun 30, 2026
from sklearn.inspection import permutation_importance
from sklearn.utils.fixes import parse_version

# `pandas.DataFrame.plot.box` forwards `vert` to matplotlib and derives the box

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure I love this solution, but I can't think of a better way to deal with this :-/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is a good enough solution for now. It might be dealt with by pandas at some point, or we could at least add a

#TODO: remove once matplotlib 3.10 is our minimum supported version

to get rid of it again in the future?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know. It would be useful for finding this code as a maintainer but annoying for the reader because it is irrelevant to them. Do you know if we have comments like this in examples elsewhere?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, not in the examples, you're right. Then let's leave it as it is.

@betatim

betatim commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

https://github.com/scikit-learn/scikit-learn/actions/runs/28504155772/job/84488505016?pr=34419 makes me think that updating cython doesn't (yet) fix the __annotate__ problem. I'll keep investigating

@betatim

betatim commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

I looked at the examples that needed adjusting, they look good/same as the versions on dev

@AnneBeyer AnneBeyer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, @betatim! Two small comments below, otherwise LGTM!

from sklearn.inspection import permutation_importance
from sklearn.utils.fixes import parse_version

# `pandas.DataFrame.plot.box` forwards `vert` to matplotlib and derives the box

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is a good enough solution for now. It might be dealt with by pandas at some point, or we could at least add a

#TODO: remove once matplotlib 3.10 is our minimum supported version

to get rid of it again in the future?

@betatim

betatim commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

@ogrisel I think the __annotate__ related test failures won't get fixed in the next few days. Can we mark the tests as xfail so we can merge this lockfile update?

I think we need at least a new cython release and they just made one. So I think there won't be another one soon .

@ogrisel

ogrisel commented Jul 1, 2026

Copy link
Copy Markdown
Member

I think we should temporarily pin to the oldee cython version for which the test passes.

@betatim

betatim commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Good idea. Looks like everything passes now. I made the "pin" a list of versions to avoid. The idea is that we will get an update to the next version when it is released. Then we can either also exclude it or start using it, depending on the outcome of the tests.

@betatim

betatim commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

@ogrisel can you leave a 👍 or 👎 ?

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's merge as is.

@ogrisel
ogrisel merged commit b842dd4 into scikit-learn:main Jul 3, 2026
33 checks passed
@betatim
betatim deleted the fix-lockfile-matplotlib-cython branch July 6, 2026 07:51
@lesteve

lesteve commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

This broke the doc CI because [doc build] was not used so the examples were not run which did not catch a DeprecationWarning in a new matplotlib release. This has been broken for 17 days see #34521 for more details.

I will happily review a PR that fixes it 😉.

@lucyleeow

Copy link
Copy Markdown
Member

Just curious, why the relatively (?) old matplotlib support? 3.6 is from 2022, and SPEC 0 says we could drop >2 years.

@betatim

betatim commented Jul 20, 2026 •

Copy link
Copy Markdown
Member Author

Because SPEC 0 is too aggressive, we support older versions of packages. Loic has a script that helps know which versions we support. I think the "160characters or less" summary of the scikit-learn policy is to support one additional year compared to SPEC0 (you might call it SPEC0+1).

I think #30888 is the place to start reading

jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
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.

6 participants