Closed ndrluis closed 5 days ago
Thank you, @syun64. I have added the test and used an existing metadata definition to avoid duplication.
Regarding the solution, to be honest, it was not quick. It took me several weeks of learning and then stepping away from the problem for a few weeks to return with fresh ideas on how to solve it.
Hi @HonahX @Fokko could we ask for your help in triggering this workflow?
@HonahX @Fokko, can you please trigger the workflow? I have already run the tests in my fork and everything is green.
@ndrluis Thanks for pinging me here. This approval should be gone once the first PR has been merged. Which should be soon 🚀
@HonahX Sorry for the ambigous comment there. I was referring to approving the CI to run, which is very annoying. Now @ndrluis has his first PR in, this approval should be gone and the CI should be kicked off right away.
Thanks @ndrluis for working on this, and @syun64, @kevinjqliu and @HonahX for the quick review 🚀
The IcebergRootModel inherits from Pydantic RootModel, which has its own implementation of deepcopy. When deepcopy runs, it calls this
__deepcopy__
method and ignores that it's a Singleton. So, my solution was to change the order of inheritance and implement a__deepcopy__
method for singletons that returns itself.https://github.com/pydantic/pydantic/blob/f024d03b832d1bbcbadf76184ed14d92571a71ca/pydantic/root_model.py#L108-L116