fusion-engineering / inline-python

Inline Python code directly in your Rust code
https://docs.rs/inline-python
BSD 2-Clause "Simplified" License
1.15k stars 37 forks source link

Switch to pyo3 0.11 and stable Rust #36

Closed paulirotta closed 4 years ago

paulirotta commented 4 years ago

Projects using inline-python are currently stuck in nightly. pyo3 0.11 add support for stable.

After some sniffing it doesn't look like too much to update. Perhaps 3 changes in inline-python/macros and whatever else appears after that.

Nightly Rust has been causing some persistent difficulties for me unrelated to the project. I could try to help with this transition, but confess Python is not something I know much about.

I love the structure of inline-python with Context and a direct interface without too many details. It would be a bit painful to have to drop back to pyo3 to solve unrelated project needs.

Any timeline for this update?

m-ou-se commented 4 years ago

Yes, we should update to PyO3 0.11. But that doesn't make this crate work on stable just yet. We still need #![feature(proc_macro_span)] to reconstruct the whitespace of the Python code.

paulirotta commented 4 years ago

Ahh. I missed that. I thought the proc-macro2 crate was stable, but only tested with default features on it

m-ou-se commented 4 years ago

I've updated the crates to use PyO3 0.11, and published them to crates.io.

inline-python on stable Rust will have to wait for the proc_macro_span feature.

paulirotta commented 4 years ago

Excellent! Using it now, and huge thanks from all of us for your efforts.

I checked and it looks like proc_macro_span is approaching the end of development phase so I'll hang on with the annoyances of nightly Rust which are less than the pleasures of inline-python.