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

Compile with Python 3.14 #4662

Open
zx80 opened this issue Oct 27, 2024 · 4 comments
Open

Compile with Python 3.14 #4662

zx80 opened this issue Oct 27, 2024 · 4 comments

Comments

@zx80
Copy link

zx80 commented Oct 27, 2024

The feature I'd like is that pyo3 would compile with Python 3.14 development version.
Currently it just seems to lack a configuration declaration, see pydantic core issue 1504.

@davidhewitt
Copy link
Member

It's not quite that simple; in pyo3-ffi we have to manually sync with the Python C-API, so historically we have waited a long time before attempting to reconcile with in-development Python versions. This avoids wasting a lot of time with in-flux changes.

The C-API is getting better at hiding implementation details, so it's probably less work than it was historically to do this. Nevertheless, it's still a fair bit of effort and the payoff is solely for the few (but increasingly many, it seems to me) people trying to use Rust packages with in-development Python versions.

I think if we were to allow this earlier, I would suggest we have an opt-in environment variable like PYO3_USE_EXPERIMENTAL_3_14_SUPPORT=1. I don't think we would bother testing this in CI nor make any effort to actually maintain it (aside from community contributions) until 3.14 beta releases are available.

@kwikiel
Copy link

kwikiel commented Oct 30, 2024

It doesn't seem to support 3.12 currently (maybe I'm wrong or using different version )

error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)

@davidhewitt
Copy link
Member

@kwikiel you (or the package you are using) is using an outdated PyO3; 0.22 supports Python 3.13

@zx80
Copy link
Author

zx80 commented Nov 9, 2024

The C-API is getting better at hiding implementation details, so it's probably less work than it was historically to do this. Nevertheless, it's still a fair bit of effort and the payoff is solely for the few (but increasingly many, it seems to me) people trying to use Rust packages with in-development Python versions.

Because of the in-progress end-of-Python-GIL project, it seems that there is a new interest in checking early whether packages work with future non-GIL versions, especially if they are playing around with threads. So I'd say the sooner the better. Now this is still a little bit rhetorical because GitHub CI does not provide non GIL Python versions out of the box yet, you have to configure to use other docker images, but the pressure should build up once this is the case.

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

No branches or pull requests

3 participants