Make compact serialization Py3proof