Skip to content

Commit

Permalink
Move CallbackSchedulerStep completely behind cfg flags
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Jan 8, 2025
1 parent 87038c7 commit d15c37e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ impl CallbackScheduler {
}
}

#[cfg(any(Py_3_12, Py_3_13))]
#[pyclass(frozen, module = "granian._granian")]
pub(crate) struct CallbackSchedulerStep {
sched: Py<CallbackScheduler>,
Expand All @@ -274,8 +275,8 @@ pub(crate) struct CallbackSchedulerStep {
pyname_wake: PyObject,
}

#[cfg(any(Py_3_12, Py_3_13))]
impl CallbackSchedulerStep {
#[cfg(any(Py_3_12, Py_3_13))]
pub(crate) fn new(py: Python, sched: Py<CallbackScheduler>, coro: PyObject) -> Self {
Self {
sched,
Expand Down Expand Up @@ -362,6 +363,7 @@ impl CallbackSchedulerStep {
}
}

#[cfg(any(Py_3_12, Py_3_13))]
#[pymethods]
impl CallbackSchedulerStep {
fn _step(pyself: Py<Self>, py: Python) {
Expand Down

0 comments on commit d15c37e

Please sign in to comment.