Skip to content

[BUG]: Python 3.12 support #4115

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

Closed
3 tasks done
henryiii opened this issue Aug 3, 2022 · 4 comments · Fixed by #4168
Closed
3 tasks done

[BUG]: Python 3.12 support #4115

henryiii opened this issue Aug 3, 2022 · 4 comments · Fixed by #4168
Labels
triage New bug, unverified

Comments

@henryiii
Copy link
Collaborator

henryiii commented Aug 3, 2022

Required prerequisites

Problem description

@tacaswell reported that python/cpython#23205 from Python 3.12 breaks pybind11, which in turn breaks matplotlib. We should probably both fix this and see if we can reenable the dev tag for 3.12 testing (Might also be good to start playing with using PyType_FromMetaclass too).

Reproducible example code

No response

@henryiii henryiii added the triage New bug, unverified label Aug 3, 2022
@tacaswell
Copy link

https://github.com/tacaswell/pybindbug has reproduction code + bisect script + bisect log.

@tacaswell
Copy link

and specifically it breaks https://github.com/contourpy/contourpy which breaks Matplotlib

@pwuertz
Copy link
Contributor

pwuertz commented Oct 25, 2023

Python 3.12 now supports global interpreter locks per interpreter (PEP 684). This, as far as I understand, requires more fine grained control over module initialization & cleanup (PEP 489, #2548).

Is this something pybind is eventually able to do, or is this a topic for a pybind reboot like nanobind?

@rwgk
Copy link
Collaborator

rwgk commented Oct 25, 2023

Is this something pybind is eventually able to do, or is this a topic for a pybind reboot like nanobind?

I don't think creating more clones of pybind11 is environmentally friendly for the world at large. (Unless we have a clean interop story, to avoid excessive copy-pasting from one namespace to another.)

Upshot: I think it'll be best to fit new features into pybind11, even though it obviously requires more thought than another reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New bug, unverified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants