Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def numpy_random_mtrand_context(module):
@register_exec_patch("pydantic_core")
@contextmanager
def pydantic_core_context(module):
if not hasattr(module, "validate_core_schema"):
# Newer versions of pydantic_core don't have this function

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Right you still need to call something that makes pydantic generate a hashmap so the hash seed gets initialized.

yield
return
try:
# Initial import needs one entropy call to initialize
# std::collections::HashMap hash seed
Expand Down
Loading