birkenfeld / serde-pickle

Rust (de)serialization for the Python pickle format.
Apache License 2.0
188 stars 28 forks source link

How to deal with recursive structures #25

Closed razaqq closed 2 months ago

razaqq commented 1 year ago

Im dealing with pickles containing recursive structures, but i do not need the data contained in them. Basically im trying to "ignore" recursive structures without erroring. Currently i dont see any option to do so. Basically im looking for something like .replace_unresolved_globals() but for recursive structures.

razaqq commented 1 year ago

Upon reading the PRs i noticed that https://github.com/birkenfeld/serde-pickle/pull/22 adds support for exactly what i asked for

landaire commented 11 months ago

@razaqq I'm sure you've moved past this problem, but I recommend you give my patch a try as well: https://github.com/birkenfeld/serde-pickle/pull/24

[patch.crates-io]
serde-pickle = { git = "https://github.com/landaire/serde-pickle.git" }
birkenfeld commented 2 months ago

Thanks for the issue, I've added the requested option now.