diff --git a/src/callbacks.rs b/src/callbacks.rs index 73a1340c..a0b0e18d 100644 --- a/src/callbacks.rs +++ b/src/callbacks.rs @@ -1,5 +1,7 @@ use pyo3::{exceptions::PyStopIteration, prelude::*, types::PyDict, IntoPyObjectExt}; -use std::sync::{atomic, Arc, Mutex, OnceLock, RwLock}; +#[cfg(any(Py_3_12, Py_3_13))] +use std::sync::Mutex; +use std::sync::{atomic, Arc, OnceLock, RwLock}; use tokio::sync::Notify; pub(crate) type ArcCBScheduler = Arc>; @@ -136,7 +138,7 @@ impl CallbackScheduler { } #[inline] - pub(crate) fn send(pyself: Py, py: Python, coro: PyObject) { + pub(crate) fn send(pyself: Py, py: Python, coro: PyObject, ctx: PyObject) { let rself = pyself.get(); let ptr = (pyself.clone_ref(py),).into_pyobject(py).unwrap().into_ptr();