Skip to content

Pydantic 2 Support #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zsimjee opened this issue Jul 18, 2023 · 5 comments
Closed

Pydantic 2 Support #224

zsimjee opened this issue Jul 18, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@zsimjee
Copy link
Collaborator

zsimjee commented Jul 18, 2023

Describe the bug
Pydantic 2.x.x is the default-installed version of pydantic.

To Reproduce
Steps to reproduce the behavior:

  1. RAIL spec - N/A
  2. Runtime arguments (e.g. guard(...)) - N/A
  3. Pydantic version 2.0.3

Expected behavior
Guardrails should not throw errors when using the default and newest version of pydantic.

Library version:
Pydantic version 2.0.3

@zsimjee zsimjee added the bug Something isn't working label Jul 18, 2023
@RaghuSanjeev
Copy link

You observe the following error with guardrails package and latest Pydantic version.
"importerror: cannot import name 'modelfield' from 'pydantic.fields'

@justinwiley
Copy link

For others struggling this, this seems to install a compatible version:

pip install pydantic==1.10

@movchan74
Copy link

Are there plans to support Pydantic 2?

@qikangchen-fraunhofer
Copy link

Is this still active? I am currently working with gradio and the latest versions need Pydantic 2. It would be need if you can implement it! Thanks in advance.

@irgolic
Copy link
Contributor

irgolic commented Nov 17, 2023

Fixed by #420

@irgolic irgolic closed this as completed Nov 17, 2023
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

No branches or pull requests

6 participants