Closed Rictus closed 2 years ago
@Rictus Thanks for the pull request.
Could you create an issue describing that bug. This helps us in case such a model breaks more stuff than just serializing. Please also share a sample model so that we can also update our test suit.
@Tinitto I've got a working Serialization/Deserialization method for when there is a list of models as a property of a parent Model.
Let me know what you think. We could expand the idea to sets, dicts and tuples but for now, list is all I need.
Hello @Tinitto I'm kindly requesting you to review my work to validate this is the right direction
Thanks
@Rictus I am so sorry. I have just noticed your comment. I had somehow missed it. Let me have a look-see.
Hello @Tinitto Thank you for your suggestions, the integration is now much cleaner.
Oh... okay. I hope to have a look a later today.
I think there is more work to do to not end up processing list of strings as a list of nested models
Hey @Rictus, could you remove the code for anything other than List[Model]...the more specific this pull request is, the easier it will be to implement and review. You could put it in a different branch or something.
Hey @Rictus, could you remove the code for anything other than List[Model]...the more specific this pull request is, the easier it will be to implement and review. You could put it in a different branch or something.
Sure no problem. I have implemented it only because you requested it earlier. Maybe I didn't understood you correctly
I only need list for my use cases.
Hey @Rictus, could you remove the code for anything other than List[Model]...the more specific this pull request is, the easier it will be to implement and review. You could put it in a different branch or something.
Sure no problem. I have implemented it only because you requested it earlier. Maybe I didn't understood you correctly
I only need list for my use cases.
:-) yeah...I started rumbling and I confused you.
Hey @Tinitto How far are we to merge this PR ? I have integrated your ideas from your PR on my repo.
I have not integrated the changes on the ci.yml file as it is not really related to this PR.
Thanks
Let me check one last time.
@Rictus , the code looks good. The formatting was not uniform so I added black....https://github.com/psf/black and now the CI is failing. So all that is left is to add black, run its formatter, commit and push.
pip install black
black .
@Tinitto Done 👍
Hello,
I have a case where a pydantic_redis model could not be serialized by orjson whereas pydantic could. This allows to fallback and if pydantic can't serialize, it will throw the original TypeError so that's fine. Very plug&play.
Tell me if you want me to move that function somewhere else. [Edit] Issue #8