Skip to content

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Nov 9, 2023

Resolves #195

Pydantic 2 introduced some breaking changes, but we work around that by attempting to import its v1 compatibility shim (#121):

try:
    from pydantic import v1 as pydantic
except ImportError:
    import pydantic

However, we had pass instead of import pydantic in a few places, which caused pydantic imports to fail for anyone using pydantic 1.

Signed-off-by: Mattt Zmuda <[email protected]>
@mattt mattt merged commit 865d491 into main Nov 9, 2023
@mattt mattt deleted the mattt/fix-pydantic-import branch November 9, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NameError: name 'pydantic' is not defined

2 participants