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

Rust <-> Python bindings

Results 66 rust-cpython issues
Sort by recently updated
recently updated
newest added

Any example about extension func to return PyTuple(i32, String)? Thanks !

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...

Without this, importing any other crate's `Result` type alias in a module that uses cpython's macros causes compilation to fail in a variety of interesting ways. Repro: ```rust use cpython::{py_class,...

Sometimes the `py` parameter of `py_class!` is only used in some class methods and not others. The current implementation of cpython's macros makes Rust produce a warning in this situation,...

Hello, I'm running `VSC 1.62.3` with `Visual Studio IntelliCode v1.2.14`, but seem to lack autocomplete results. I can import `mypylib` properly (the `.dll` was renamed to `.pyd` and moved to...

I am trying to write a Rust module which can be called from CPython. Please see [this SO question](https://stackoverflow.com/q/68045372/595305). The build never works with `--release` switch and only intermittently without...

In an extension type written with `py_class!()`, is there a way to set or fix the `tp_flags` of the resulting PyTypeObject? For this specific use-case I want to add `Py_TPFLAGS_BASETYPE`...

I tried updating the Fedora Linux packages for rust-cpython from version 0.5.2 to 0.6.0, but there are a lot of new issues with test failures on s390x architecture (the only...

The `py_capsule!` and `py_capsule_fn!` macros generate `retrieve` functions that cache their results for subsequent calls. Prior to this commit, caching is done with a generated unsafe `static mut` item whose...