Skip to content
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

How will PyO3 work with the upcoming no-GIL Python? #3576

Closed
bplevin36 opened this issue Nov 15, 2023 · 3 comments
Closed

How will PyO3 work with the upcoming no-GIL Python? #3576

bplevin36 opened this issue Nov 15, 2023 · 3 comments

Comments

@bplevin36
Copy link

PEP 703 is coming, so GIL-less CPython builds are going to be commonplace pretty soon. What are the PyO3 maintainers' thoughts on how to support this? I'm assuming it will require some PyO3 API changes/additions, since the soundness guarantees given by CPython itself will change dramatically (e.g. Python critical sections ).

I'm keenly interested in this, since all the extensions I've built with PyO3 have been for Flask servers, where getting GIL-usage right has been very important. Just curious to see what direction you have in mind!

@messense
Copy link
Member

You can follow the discussion in #2885.

@messense messense closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2023
@davidhewitt
Copy link
Member

To just comment here to add my own thoughts - we've discussed extensively in #2885 some of the likely changes that need to happen to bring nogil support. I'm very excited about PyO3 supporting nogil, and this is something I want to work on in the very near future. Before that, I am personally working on changes to make #3382 happen because I think that needs to happen for many reasons. If others want to make a start on nogil support before then, I will gladly join in reviews.

@bplevin36
Copy link
Author

Ah this is exactly what I was looking for. I didn't think to search "nogil" as one word so I didn't see an existing issue about it.

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

No branches or pull requests

3 participants