Found in developmentseed/obstore#240 and with a small repro here
#[pyfunction]
pub(crate) fn return_none_async(py: Python) -> PyResult<Bound<PyAny>> {
pyo3_async_runtimes::tokio::future_into_py(py, async move { Ok(()) })
}
This is in contrast to normal pyo3
where returning ()
from Rust creates a Python None
.
Using pyo3 0.23 and pyo3-async-runtimes 0.23.