Skip to content

Conversation

cxzhong
Copy link
Contributor

@cxzhong cxzhong commented Aug 19, 2025

Just bump matplotlib to 3.10.5 and them dependencies.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 19, 2025

It seems that the download link of matplotlib_inline is broken, we need to use _ not - . I have fixed it right now.

Copy link

github-actions bot commented Aug 19, 2025

Documentation preview for this PR (built with commit 369ebde; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@cxzhong cxzhong changed the title Update versions for matplotlib and them dependencies TEST:Update versions for matplotlib and them dependencies Aug 19, 2025
@cxzhong cxzhong changed the title TEST:Update versions for matplotlib and them dependencies Update versions for matplotlib and dependencies Aug 19, 2025
@cxzhong cxzhong marked this pull request as ready for review August 20, 2025 00:39
@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 00:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates matplotlib from version 3.10.1 to 3.10.5 and bumps several of its dependencies to their latest versions for compatibility and security updates.

  • Updates matplotlib to version 3.10.5
  • Updates dependency versions including numpy, pillow, pytz, and other matplotlib-related packages
  • Updates corresponding SHA1 and SHA256 checksums for all package updates

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
build/pkgs/matplotlib/package-version.txt Updates matplotlib version to 3.10.5
build/pkgs/matplotlib/checksums.ini Updates checksums for matplotlib 3.10.5
build/pkgs/numpy/package-version.txt Updates numpy dependency to 2.3.2
build/pkgs/numpy/checksums.ini Updates checksums for numpy 2.3.2
build/pkgs/pillow/package-version.txt Updates pillow dependency to 11.3.0
build/pkgs/pillow/checksums.ini Updates checksums for pillow 11.3.0
build/pkgs/pytz/package-version.txt Updates pytz dependency to 2025.2
build/pkgs/pytz/checksums.ini Updates checksums for pytz 2025.2
build/pkgs/matplotlib_inline/package-version.txt Updates matplotlib_inline to 0.1.7
build/pkgs/matplotlib_inline/checksums.ini Updates checksums for matplotlib_inline 0.1.7
build/pkgs/kiwisolver/package-version.txt Updates kiwisolver dependency to 1.4.9
build/pkgs/kiwisolver/checksums.ini Updates checksums for kiwisolver 1.4.9
build/pkgs/contourpy/package-version.txt Updates contourpy dependency to 1.3.3
build/pkgs/contourpy/checksums.ini Updates checksums for contourpy 1.3.3

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dimpase
Copy link
Member

dimpase commented Aug 21, 2025

please also bump meson_python to version 0.18.
Sage's current meson_python cannot be used with this matplotlib, it's too old.

@dimpase
Copy link
Member

dimpase commented Aug 21, 2025

The latter, and one more related fix, are in cxzhong#3 - please merge this to incorporate my changes

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 21, 2025

The latter, and one more related fix, are in cxzhong#3 - please merge this to incorporate my changes

Thank you. I have merged it @dimpase

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 21, 2025

The latter, and one more related fix, are in cxzhong#3 - please merge this to incorporate my changes

Seems that CI has failed. It also failed in my local host. It seems the bug in meson-python 0.18.0

without the patch, we get

[meson_python-0.18.0] [spkg-install] meson-python: error: Field "project.license" has an invalid type, expecting a dictionary of strings (got "MIT")
@dimpase
Copy link
Member

dimpase commented Aug 21, 2025

yes. I have a fix - cxzhong#4
please merge it - this makes this part work, at least

fix format of the license (sic!)
@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 21, 2025

yes. I have a fix - cxzhong#4 please merge it - this makes this part work, at least

Maybe we need to upgrade pyproject_metadate. you can revert the lastest commit and check that.
mesonbuild/meson-python#791

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 21, 2025

@dimpase Thank you very much. I have bumped pyproject_metadate to 0.9.1. It seems OK now. Just wait for the CI

@dimpase
Copy link
Member

dimpase commented Aug 21, 2025

yes. I have a fix - cxzhong#4 please merge it - this makes this part work, at least

Maybe we need to upgrade pyproject_metadate. you can revert the lastest commit and check that. mesonbuild/meson-python#791

yes, I was about to send you another PR to fix this. We really should not manage our Python dependencies in our ancient way...

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 21, 2025

yes. I have a fix - cxzhong#4 please merge it - this makes this part work, at least

Maybe we need to upgrade pyproject_metadate. you can revert the lastest commit and check that. mesonbuild/meson-python#791

yes, I was about to send you another PR to fix this. We really should not manage our Python dependencies in our ancient way...

In meson-python, you delete --no-build-isolation --no-deps . And this need to be revert? @dimpase

@dimpase
Copy link
Member

dimpase commented Aug 21, 2025

yes. I have a fix - cxzhong#4 please merge it - this makes this part work, at least

Maybe we need to upgrade pyproject_metadate. you can revert the lastest commit and check that. mesonbuild/meson-python#791

yes, I was about to send you another PR to fix this. We really should not manage our Python dependencies in our ancient way...

In menson-python, you delete --no-build-isolation --no-deps . And this need to be revert? @dimpase

These --no-build-isolation --no-deps are very dangerous, and should be removed if at all possible.

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 21, 2025

yes. I have a fix - cxzhong#4 please merge it - this makes this part work, at least

Maybe we need to upgrade pyproject_metadate. you can revert the lastest commit and check that. mesonbuild/meson-python#791

yes, I was about to send you another PR to fix this. We really should not manage our Python dependencies in our ancient way...

In menson-python, you delete --no-build-isolation --no-deps . And this need to be revert? @dimpase

These --no-build-isolation --no-deps are very dangerous, and should be removed if at all possible.

OK, it seems good in workflow. I think it can be merged.

@dimpase dimpase mentioned this pull request Aug 22, 2025
5 tasks
@dimpase
Copy link
Member

dimpase commented Aug 22, 2025

this fixes builds on a number of Linux distros, thus I added a blocker here. @vbraun

@dimpase
Copy link
Member

dimpase commented Aug 22, 2025

Like https://github.com/passagemath/passagemath# to manage the dependency by PIP?

what makes you think it's done there?

@dimpase dimpase mentioned this pull request Aug 23, 2025
5 tasks
@kwankyu
Copy link
Collaborator

kwankyu commented Aug 24, 2025

Regarding #40586 (comment):

project.license must be valid exactly by one definition (2 matches found): [pillow-11.3.0] [spkg-install]

this indicates that your branch has old meson-python.

I don't know... The branch is just the merge of #40633 and #40586. Hence it has the previous setuptools. Perhaps your branch does not work with the previous setuptools, at least on mac.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 24, 2025

mind you, on Ubuntu 24.04 with pybind11 installed one cannot build the latest beta (and 10.7, too, IIRC) at all, no matter what options you pass.

Sorry, I don't know what you mean. How is that related with my test on mac?

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 24, 2025

Regarding #40586 (comment):

project.license must be valid exactly by one definition (2 matches found): [pillow-11.3.0] [spkg-install]
this indicates that your branch has old meson-python.

I don't know... The branch is just the merge of #40633 and #40586. Hence it has the previous setuptools. Perhaps your branch does not work with the previous setuptools, at least on mac.

Downgrading Pillow to 11.1.0 with the merge of #40633 and #40586 works for me. Pillow is installed successfully.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 24, 2025

moreover we have

$ jupyter kernelspec list
Available kernels:
  python3     /Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.13/share/jupyter/kernels/python3
  sagemath    /Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.13/share/jupyter/kernels/sagemath

sagemath installed.

@dimpase
Copy link
Member

dimpase commented Aug 24, 2025

mind you, on Ubuntu 24.04 with pybind11 installed one cannot build the latest beta (and 10.7, too, IIRC) at all, no matter what options you pass.

Sorry, I don't know what you mean. How is that related with my test on mac?

that was comment on the priority of PRs.

@dimpase
Copy link
Member

dimpase commented Aug 25, 2025

moreover we have

$ jupyter kernelspec list
Available kernels:
  python3     /Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.13/share/jupyter/kernels/python3
  sagemath    /Users/kwankyu/GitHub/sage-temp/local/var/lib/sage/venv-python3.13/share/jupyter/kernels/sagemath

sagemath installed.

jupyter(lab) packaged with Sage stopped normally working on my Linux laptop quite a while ago, as I keep getting annoyng pop-ups saying IPP Extension Server Error: Failed to list clusters: might the server extension not be installed/enabled?. The jupyterlab which comes with the OS works fine, and it's the latest version, 4.4.6
(with quite a few newer than in Sage dependencies)

For running sphinx, it doesn't really matter, but it also does not need that many jupyter-related packages.

By the way, on a macOS machine I am testing this (with #39030), I get

(sage-sh) dima@OUCL13243:~/software/sage$ jupyter kernelspec list
Available kernels:
  python3     /Users/dima/software/sage/local/var/lib/sage/venv-python3.13/share/jupyter/kernels/python3
  sagemath    /Users/dima/Library/Jupyter/kernels/sagemath

and at least docs (html and pdf) build fine - I didn't try interactive jupyter.

On the Linux machine I am testing this, I get a very similar configuration

(sage-sh) dima@tarski:sage-src$ jupyter kernelspec list
Available kernels:
  python3     /home/dima/software/sage-src/local/var/lib/sage/venv-python3.13/share/jupyter/kernels/python3
  sagemath    /home/dima/.local/share/jupyter/kernels/sagemath

and docs (html and pdf) build fine. But Sage's jupyter has this annoying bug I mentioned above, which of course is not relevant, it just shows that we running hopelessly behind with our manual updates.

The only real way out is to stop vendoring jupyter and sphinx, and get them from PyPI, the latest versions, probably.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 25, 2025

How about downgrading Pillow to 11.1.0 to avoid incompatibility with the branch of #40586? @cxzhong

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 25, 2025

How about downgrading Pillow to 11.1.0 to avoid incompatibility with the branch of #40586? @cxzhong

yes. I will

@dimpase
Copy link
Member

dimpase commented Aug 25, 2025

what's the point of downgrading Pillow? One should understand why it's not installable in the configuration you have.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 25, 2025

To recover the sagemath kernel and revive doc-release, #40586 restores the previous setuptools. Apparently Pillow 11.3.0 is not compatible with the previous setuptools.

I guess upgrading Pillow is not urgent. Pillow may be upgraded when someone understands why the recent setuptools fails to install the sagemath kernel.

@dimpase
Copy link
Member

dimpase commented Aug 25, 2025

and why is previous setuptools needed? is there an explanation, other that "kernel does not get installed, I don't know why" ?

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 25, 2025

there is no explanation other that "kernel does not get installed, I don't know why".

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 25, 2025

Do you know why?

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 25, 2025

The branch works well with #40586. Thanks!

@cxzhong
Copy link
Contributor Author

cxzhong commented Aug 25, 2025

The branch works well with #40586. Thanks!

Thank you.

@dimpase
Copy link
Member

dimpase commented Aug 25, 2025

there is no explanation other that "kernel does not get installed, I don't know why".

It's most probably not setuptools itself, but some other package which uses setuptools, right?
What python module/package is responsible for installing whatever doesn't get installed with the up to date setuptools?
Is it sagelib?

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 25, 2025
sagemathgh-40633: Update versions for matplotlib and dependencies
    
Just bump matplotlib to 3.10.5 and them dependencies.

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40633
Reported by: Chenxin Zhong
Reviewer(s): Copilot, Dima Pasechnik
@kwankyu
Copy link
Collaborator

kwankyu commented Aug 26, 2025

It's most probably not setuptools itself, but some other package which uses setuptools, right? What python module/package is responsible for installing whatever doesn't get installed with the up to date setuptools? Is it sagelib?

I guess that installing sagemath kernel is part of installing sagelib. The up-to-date setuptools somehow seems to fail it. I have no idea how. It is just mysterious to me.

@dimpase
Copy link
Member

dimpase commented Aug 26, 2025

It's most probably not setuptools itself, but some other package which uses setuptools, right? What python module/package is responsible for installing whatever doesn't get installed with the up to date setuptools? Is it sagelib?

I guess that installing sagemath kernel is part of installing sagelib. The up-to-date setuptools somehow seems to fail it. I have no idea how. It is just mysterious to me.

We looked at it last month and have not found any way out (well, no way to do this non-explicitly), because it's indeed an artefact of something outdated; the fix is to explicitly call jupyter to install the kernel.
Note that the latter is the only documented way to install a Jupyter kernel.
Namely, it's feca12a - basically 1 line:

jupyter kernelspec install --name=sagemath --user build/sage-distro/src/sage

which is working for an up to date jupterlab+dependencies (and new setuptool, as the old doesn't support everything needed) - this commit is a part of #39030.

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.

3 participants