Skip to content

MNT: bump minimum python to 3.12 and minimum numpy to 2.0 - #31740

Merged
tacaswell merged 4 commits into
matplotlib:mainfrom
rcomer:bump-python
May 27, 2026
Merged

tacaswell merged 4 commits into
matplotlib:mainfrom
rcomer:bump-python

Conversation

@rcomer

@rcomer rcomer commented May 23, 2026 •

Copy link
Copy Markdown
Member

PR summary

According to NEP29 we could drop python 3.11 last month, and it should be long gone by the time we release mpl 3.12. Support for numpy v1 could be dropped last September. Contourpy v1.2.1 was the first version to support numpy v2.

Also I am having complications with warn_external in another branch and dropping python 3.11 means I only need one solution for that!

AI Disclosure

No AI used.

PR checklist

@rcomer rcomer added this to the v3.12.0 milestone May 23, 2026
@rcomer rcomer added Maintenance PR: dependencies Pull requests that update a dependency file labels May 23, 2026
@github-actions github-actions Bot added CI: Run cibuildwheel Run wheel building tests on a PR Documentation: devdocs files in doc/devel labels May 23, 2026
@rcomer
rcomer marked this pull request as draft May 23, 2026 15:10
@rcomer

rcomer commented May 23, 2026 •

Copy link
Copy Markdown
Member Author

Looks like I can't do this without also bumping the numpy version. If I read it right, minver can't find numpy 1.25 wheels for python 3.12.

@github-actions github-actions Bot added topic: mplot3d Documentation: examples files in galleries/examples labels May 23, 2026
@rcomer rcomer changed the title MNT: bump minimum python to 3.12 MNT: bump minimum python to 3.12 and minimum numpy to 2.0 May 23, 2026
@rcomer
rcomer force-pushed the bump-python branch 2 times, most recently from 9b1905a to 29bbea0 Compare May 23, 2026 16:50
Comment thread .github/workflows/cibuildwheel.yml
@rcomer

rcomer commented May 23, 2026

Copy link
Copy Markdown
Member Author

I do like a diff that is more red than green 😎

@rcomer
rcomer marked this pull request as ready for review May 23, 2026 18:46
@timhoffm

Copy link
Copy Markdown
Member

If I understand correctly, PySide2 does not support Python 3.12+, but PyQt5 does. This should be reflected in the docs.

@rcomer

rcomer commented May 25, 2026 •

Copy link
Copy Markdown
Member Author

According to PyPI PySide2 only supports up to python 3.10, so it is already irrelevant for mpl 3.11. I propose to handle that in a separate PR so it can be backported.

But we have been testing it with py311. Apparently I already forgot the lines I removed just two days ago 🤦‍♀️

@github-actions github-actions Bot added GUI: Qt backend: cairo CI: Run cygwin Run cygwin tests on a PR Documentation: user guide files in galleries/users_explain or doc/users Documentation: API files in lib/ and doc/api labels May 25, 2026
@rcomer

rcomer commented May 25, 2026

Copy link
Copy Markdown
Member Author

The doc failure is just the wx links.

@timhoffm requesting your re-review because I made more code changes after your approval (all in a new commit).

@rcomer
rcomer requested a review from timhoffm May 25, 2026 11:15
@rcomer rcomer mentioned this pull request May 25, 2026
4 of 5 tasks

@QuLogic QuLogic 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.

This needs an API change note as well.

Comment thread lib/matplotlib/tests/test_backends_interactive.py
@github-actions github-actions Bot removed the Documentation: API files in lib/ and doc/api label May 26, 2026
@tacaswell
tacaswell merged commit 937575c into matplotlib:main May 27, 2026
43 checks passed
@tacaswell

Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend: cairo CI: Run cibuildwheel Run wheel building tests on a PR CI: Run cygwin Run cygwin tests on a PR Documentation: devdocs files in doc/devel Documentation: examples files in galleries/examples Documentation: user guide files in galleries/users_explain or doc/users GUI: Qt Maintenance PR: dependencies Pull requests that update a dependency file topic: mplot3d

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants