Skip to content
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

Pydantic 2 released #72

Open
sla-te opened this issue Jul 5, 2023 · 2 comments · May be fixed by #76 or #86
Open

Pydantic 2 released #72

sla-te opened this issue Jul 5, 2023 · 2 comments · May be fixed by #76 or #86

Comments

@sla-te
Copy link

sla-te commented Jul 5, 2023

Since release of Pydantic 2, the implementation is broken due to massive restructs.

@dvzrv
Copy link

dvzrv commented Jul 23, 2023

I have tried to bump pydantic to >= 2 in #76 but am unsure whether my changes are correct. Please review!

We're currently doing rebuilds against pydantic >= 2 on Arch Linux and this project is one of the blockers for the TODO.

@a-detiste
Copy link

This is my lazy, quick & dirty temporary solution for Debian.

https://salsa.debian.org/python-team/packages/python-itemadapter/-/commit/be2ab7bdb10adfb8235e20bda0333edc075cc037

Forwarded: no

--- a/itemadapter/_imports.py
+++ b/itemadapter/_imports.py
@@ -23,6 +23,6 @@
     attr = None  # type: ignore [assignment]
 
 try:
-    import pydantic  # pylint: disable=W0611 (unused-import)
+    import pydantic.v1 as pydantic  # pylint: disable=W0611 (unused-import)
 except ImportError:
     pydantic = None  # type: ignore [assignment]
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -102,7 +102,7 @@
 
 
 try:
-    from pydantic import BaseModel, Field as PydanticField
+    from pydantic.v1 import BaseModel, Field as PydanticField
 except ImportError:
     PydanticModel = None
     PydanticSpecialCasesModel = None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants