ITADN

Request: normalization and `depythonize`

#80Openjamesbraza 创建于 2025-03-02
J
jamesbrazacommented
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? - `I64` values remaining `I64` - `U64` values remaining `U64` 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.
2 条评论