# HG changeset patch # User Yuya Nishihara # Date 1580396910 -32400 # 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 -r 25ed4d8e707f -r 06df075b8925 rust/hg-cpython/src/dirstate/status.rs --- a/rust/hg-cpython/src/dirstate/status.rs Fri Jan 31 00:01:29 2020 +0900 +++ b/rust/hg-cpython/src/dirstate/status.rs Fri Jan 31 00:08:30 2020 +0900 @@ -33,7 +33,7 @@ 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(),