ramonhagenaars / jsons

🐍 A Python lib for (de)serializing Python objects to/from JSON
https://jsons.readthedocs.io
MIT License
288 stars 40 forks source link

fork_inst not being passed along to element deserializer in default list deserializer #160

Closed patrickguenther closed 2 years ago

patrickguenther commented 2 years ago

https://github.com/ramonhagenaars/jsons/blob/a5150cdd2704e83fe5f8798822a1c901b54dcb1c/jsons/deserializers/default_list.py#L59

I'm not sure if this is intentional or not.

I've registered my deserializers in a fork_inst, but they are not called in certain circumstances.

I tracked the issue down to the linked line in the default_list_deserializer.

My guess is that the kwargs argument should be extended with the fork_inst parameter, before calling the element deserializer.

For now I will check if my issue can be solved, bei either overwriting default_list_deserializer or by not using a fork_inst at all.

patrickguenther commented 2 years ago

I was able to fix this on my side by modifying jsons source code. I will open a pull request soon.

ramonhagenaars commented 2 years ago

Thank you @patrickguenther for tracking this issue down and opening a pull request! This surely is a bug and your PR seems to be the proper fix. 👍