@@ -27,7 +27,7 @@ fn map_pipeline_err(e: anyhow::Error) -> PyErr {
2727 pyo3:: exceptions:: PyRuntimeError :: new_err ( e. to_string ( ) )
2828}
2929
30- #[ pyclass]
30+ #[ pyclass( skip_from_py_object ) ]
3131#[ derive( Clone ) ]
3232pub struct PyFragment {
3333 #[ pyo3( get) ]
@@ -82,7 +82,7 @@ impl From<&FragmentEntry> for PyFragment {
8282 }
8383}
8484
85- #[ pyclass]
85+ #[ pyclass( skip_from_py_object ) ]
8686#[ derive( Clone ) ]
8787pub struct DiffContextResult {
8888 #[ pyo3( get) ]
@@ -258,7 +258,7 @@ fn build_diff_context<'py>(
258258
259259 let start = std:: time:: Instant :: now ( ) ;
260260 let output = py
261- . allow_threads ( || {
261+ . detach ( || {
262262 pipeline:: build_diff_context (
263263 path,
264264 range,
@@ -350,7 +350,7 @@ fn compute_scored_state(
350350 Some ( diff_range)
351351 } ;
352352 let state = py
353- . allow_threads ( || pipeline:: compute_scored_state ( path, range, alpha, mode, timeout) )
353+ . detach ( || pipeline:: compute_scored_state ( path, range, alpha, mode, timeout) )
354354 . map_err ( map_pipeline_err) ?;
355355 Ok ( PyScoredState {
356356 inner : Arc :: new ( state) ,
@@ -372,7 +372,7 @@ fn select_with_params<'py>(
372372 no_content : bool ,
373373) -> PyResult < Bound < ' py , PyDict > > {
374374 let inner = state. inner . clone ( ) ;
375- let output = py. allow_threads ( move || {
375+ let output = py. detach ( move || {
376376 if inner. all_fragments . is_empty ( ) {
377377 return DiffContextOutput {
378378 name : inner
@@ -515,7 +515,7 @@ impl PyQuotientGraph {
515515 }
516516}
517517
518- #[ pyclass]
518+ #[ pyclass( skip_from_py_object ) ]
519519#[ derive( Clone ) ]
520520pub struct PyModuleMetrics {
521521 #[ pyo3( get) ]
0 commit comments