pythonize
pythonize copied to clipboard
Request: normalization and `depythonize`
When upgrading pythonize from version 0.21.0 to version 0.23.0 in tantivy-py's https://github.com/quickwit-oss/tantivy-py/pull/401, we switched from extract to extract_bound (per https://github.com/PyO3/pyo3/pull/3916).
Now, we are hitting an issue where I64 values are becoming U64 after depythonize.
I came up with a solution in https://github.com/jamesbraza/tantivy-py/pull/1 that involves re-casting U64 back to I64 if it fits, but this is pretty hacky.
Is there some way to preserve integer types across serialization/deserialization?
I64values remainingI64U64values remainingU64
I am wondering if there is some way pythonize can accommodate this, maybe by adding an opt-in flag somewhere?
Also, I am not 100% sure if this is a pythonize vs pyo3 issue, but it seems to be a deserialization issue, so I opened this here.