fix: fix entropy patch for newer pydantic versions#132
Conversation
|
Now let me check if newer pydantic_core versions still make entropy calls during import (which might need a different patch), and also look at how other similar early-return patterns work in this file (like The change looks straightforward. Let me analyze it:
The fix is minimal, correct, and follows existing patterns. There are no logic bugs, security issues, backward compat concerns, or missing edge cases. LGTM |
|
Acutally, looks like this is more complicated than this. |
| @contextmanager | ||
| def pydantic_core_context(module): | ||
| if not hasattr(module, "validate_core_schema"): | ||
| # Newer versions of pydantic_core don't have this function |
There was a problem hiding this comment.
Right you still need to call something that makes pydantic generate a hashmap so the hash seed gets initialized.
Newer pydantic versions removed this function so using newer pydantic versions raises an error (e.g. in python 3.14 test envrionment)