This is an archive of the discontinued Mercurial Phabricator instance.

rust-python3: compatibility fix for integer conversion
ClosedPublic

Authored by gracinet on May 17 2019, 7:42 AM.

Details

Summary

On python3, to_py_object() on the usize gives us a PyLong,
whereas it is the generic PyObject already on python2, which fits
the py.None() default value.

Upcasting to PyObject explicitely in all cases solves the issue.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped