Fix conversion warnings in libs/python/src/object