On Python3, PyInt is PyLong and it doesn't have the
value() method.
Re upcasting to PythonObj as done here works, but we
might prefer taking a PythonObj from the onset
(would require more testing)
Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG48df8a06c8bb: rust-python3: compatibility fix for incoming PyLong
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
@@ -153,7 +153,7 @@
&dirstate_vec?, &copies?, DirstateParents { p1, p2 },
- now.value(py) as i32,
+ now.into_object().extract::<i32>(py)?,
Minor thing, but I think as_object() is preferred since it isn't needed
to consume the now value to extract.
Comment Actions
@yuja yes indeed, just resubmitted with as_object(), thanks
Actually the first variant I tried was with it but I must have botched it, because it didn't compile.