Skip to content

Conversation

@dmadisetti
Copy link
Collaborator

📝 Summary

closes #5542

  • Introduces a CustomStub class which enables custom methods of hashing, saving, and restoring objects to and from cache.
  • Implements PydanticStub to ensure deterministic pickling for pydantic base models

@vercel
Copy link

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Oct 3, 2025 0:33am

return True

# Walk MRO to find matching base class
for cls in value_type.__mro__:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did this in formatters, and it has a chance of raising errors in odd edge maybe either catch the exception or comment if we just want to propoage it up

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looked at the formatters change, and a little too small to meaningfully DRY- but hopefully this saves us a bug report

mscolnick
mscolnick previously approved these changes Oct 3, 2025
@dmadisetti dmadisetti merged commit 4a97360 into main Oct 3, 2025
40 of 41 checks passed
@dmadisetti dmadisetti deleted the dm/stubs branch October 3, 2025 16:30
@dmadisetti dmadisetti added the bug Something isn't working label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persistent cache keys that contain Pydantic models are not deterministically hashable

3 participants