# HG changeset patch # User Yuya Nishihara # Date 2019-08-17 03:17:46 # Node ID 98901eb12245cba1bab6d300c5f7d0dc32f8080e # Parent e91411fcc69766d03eb9129e08a85a434eb21562 rust-parsers: fix unboxing of PyInt on Python 3 Broken at 7cae6bc29ff9. diff --git a/rust/hg-cpython/src/parsers.rs b/rust/hg-cpython/src/parsers.rs --- a/rust/hg-cpython/src/parsers.rs +++ b/rust/hg-cpython/src/parsers.rs @@ -12,7 +12,7 @@ //! use cpython::{ exc, PyBytes, PyDict, PyErr, PyInt, PyModule, PyResult, PyTuple, Python, - ToPyObject, + PythonObject, ToPyObject, }; use hg::{ pack_dirstate, parse_dirstate, utils::copy_into_array, DirstateEntry, @@ -123,7 +123,7 @@ fn pack_dirstate_wrapper( p1: copy_into_array(&p1), p2: copy_into_array(&p2), }, - Duration::from_secs(now.value(py) as u64), + Duration::from_secs(now.as_object().extract::(py)?), ) { Ok(packed) => { for (