From 5c6198a551474f154db1aa4f66da0bddb9bd8388 Mon Sep 17 00:00:00 2001 From: Thomas Lam <79589038+tl-hbk@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:49:06 -0600 Subject: [PATCH] Fix python bindings hanging on fetching repodata --- py-rattler/src/networking/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/py-rattler/src/networking/mod.rs b/py-rattler/src/networking/mod.rs index 3cf1d3410..56bdc55f7 100644 --- a/py-rattler/src/networking/mod.rs +++ b/py-rattler/src/networking/mod.rs @@ -67,7 +67,9 @@ pub fn py_fetch_repo_data<'a>( .into_iter() .map(|(cache, chan)| { let path = cache_path.to_string_lossy().into_owned(); - PySparseRepoData::new(chan, path, cache.repo_data_json_path) + let repo_data_json_path = cache.repo_data_json_path.clone(); + drop(cache); + PySparseRepoData::new(chan, path, repo_data_json_path) }) .collect::, _>>(), Err(e) => Err(PyRattlerError::from(e).into()),