Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update minimum pybind11 to 2.13.2#29021

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
oscargus merged 1 commit intomatplotlib:mainfromianthomas23:pybind11-min-2.13.2
Oct 27, 2024

Conversation

@ianthomas23
Copy link
Member

@ianthomas23ianthomas23 commentedOct 25, 2024
edited
Loading

Update minimum pybind11 to 2.13.2 as use of 2.13.1 can cause mutex problems in Python 3.13 free-threaded builds, seepybind/pybind11#5420.

It would be good to confirm exactly which version of pybind11 was used to build the matplotlib 3.9.2 cp313t wheels on PyPI. They are dated Aug 13, the same date that pybind11 2.13.2 and 2.13.3 were released. So the mpl wheels could potentially have used 2.13.1 which would be bad. The GHA run that built and uploaded the wheel ishttps://github.com/matplotlib/matplotlib/actions/runs/10361240538/job/28683177700 but it is not verbose enough to including the pybind11 version used.

@ianthomas23
Copy link
MemberAuthor

I think the matplotlib 3.9.2 cp313t wheels (or at least the manylinux x86_64 one) were built using the problematic pybind11 2.13.1. If I create a new 3.13.0t virtual environment using pyenv and install the latest contourpy (1.3.0) and matplotlib (3.9.2) wheels and run some code that uses both matplotlib and contourpy:

$ PYTHON_GIL=0 pythonPython 3.13.0 experimental free-threading build (main, Oct 26 2024, 16:31:15) [GCC 13.2.0] on linuxType"help","copyright","credits" or"license"for more information.>>> import matplotlib.pyplot as plt>>> plt.contour([[1,2],[3,4]], levels=5)Floating point exception (core dumped)

If I then install the latest matplotlib nightly wheel (3.10.0.dev900+g835d5125a3) which definitely uses a later pybind11 the above code works fine and I canplt.show() successfully.

But maybe the fact that the matplotlib 3.9.2 cp313t wheels are problematic is moot. We aren't fully claiming free-threaded support until there is a matplotlib release containing PR#28819 and a kiwisolver release with the equivalent (nucleic/kiwi#186). Until then if you try to import matplotlib in a free-threaded venv you get the warning that matplotlib/kiwisolver aren't claiming they can run safely without the GIL and you have to, at your own risk, usePYTHON_GIL=0 or equivalent.

So given that matplotlib 3.10 is imminent and includes#28819 (and hopefully this PR) then I think we are OK to point users towards that release if they want free-threaded support. We can't really do a 3.9.3 release including#28819 as that would also need all of the recent pybind11 PRs which is not appropriate for a patch release.

@oscargusoscargus merged commit61995ee intomatplotlib:mainOct 27, 2024
41 of 42 checks passed
@oscargusoscargus added this to thev3.10.0 milestoneOct 27, 2024
@ianthomas23ianthomas23 deleted the pybind11-min-2.13.2 branchOctober 27, 2024 08:20
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

v3.10.0

Development

Successfully merging this pull request may close these issues.

4 participants

@ianthomas23@timhoffm@QuLogic@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp