# HG changeset patch # User Yuya Nishihara # Date 2020-01-30 15:08:30 # Node ID 06df075b89252513c9754bad70dc0eef1d89893f # Parent 25ed4d8e707faa9cd1494394ff12596222a43449 rust-cpython: use PyList.insert() instead of .insert_item() Silences the deprecated warning. https://github.com/dgrunwald/rust-cpython/commit/e8cbe864841714c5555db8c90e057bd11e360c7f diff --git a/rust/hg-cpython/src/dirstate/status.rs b/rust/hg-cpython/src/dirstate/status.rs --- a/rust/hg-cpython/src/dirstate/status.rs +++ b/rust/hg-cpython/src/dirstate/status.rs @@ -33,7 +33,7 @@ fn collect_pybytes_list let list = PyList::new(py, &[]); for (i, path) in collection.iter().enumerate() { - list.insert_item( + list.insert( py, i, PyBytes::new(py, path.as_ref().as_bytes()).into_object(),