rust-cpython icon indicating copy to clipboard operation
rust-cpython copied to clipboard

Initial support for Python 3.11 beta

Open Techcable opened this issue 3 years ago • 3 comments

This is obviously experimental but it works okay.

All the tests pass and the example prints the following:

$ cargo run --example hello --features python-3-11 Hello nicholas, I'm Python 3.11.0b1 (v3.11.0b1:8d32a5c8c4, May 6 2022, 22:45:29) [Clang 13.0.0 (clang-1300.0.29.30)]

I figure it's best to be proactive with these change, so that way we are ready as soon as 3.11 proper is released (October I think).

MAin difference in 3.11 that frame object is now private (and lazy loaded). This results in a performance improvement but makes it harder for debuggers. Also the internal ordering of code objects has completely changed as well.

Techcable avatar May 14 '22 09:05 Techcable

If you want, you are free to merge right now. I just figured we'd wait until 3.11 was more developed.....

Techcable avatar May 14 '22 09:05 Techcable

We should wait for the RC which typically is ABI-compatible with the final release. Can you rebase your branch onto the current master? I've fixed the failure with Rust 1.41.1.

dgrunwald avatar Jun 02 '22 18:06 dgrunwald

We should wait for the RC which typically is ABI-compatible with the final release.

I agree. We should wait to the RC before pulling this.

Can you rebase your branch onto the current master? I've fixed the failure with Rust 1.41.1.

Done! Tests still appear to be failing though. This fixes most of the tests. However there is something about "ast-json" on 2.7 nightly

Techcable avatar Jun 19 '22 08:06 Techcable

I'm continuing work on python 3.11 support on https://github.com/dgrunwald/rust-cpython/tree/py3.11

dgrunwald avatar Sep 25 '22 19:09 dgrunwald

Awesome! Thanks 👍

Techcable avatar Oct 10 '22 04:10 Techcable