I want to use pythonize to convert an enum we have, which is decorated with Serialize, Deserialize. The enum contains many types, some are structs, others are String or numeric types (there are over 20 of them). I used the example as-is and it says that acquire_gil is deprecated. I tried doing this using with_gil and it returns Py<PyAny>> and I just need a PyAny value. I tried various combinations but no luck.
Any advice on how to do this would be much appreciated. I will post this in pyo3 as well.
Great library by the way, overall pyo3 has been very easy to use.
I want to use pythonize to convert an enum we have, which is decorated with Serialize, Deserialize. The enum contains many types, some are structs, others are String or numeric types (there are over 20 of them). I used the example as-is and it says that
acquire_gil
is deprecated. I tried doing this usingwith_gil
and it returnsPy<PyAny>>
and I just need aPyAny
value. I tried various combinations but no luck.Any advice on how to do this would be much appreciated. I will post this in pyo3 as well.
Great library by the way, overall pyo3 has been very easy to use.