Use v1 and v2 in parallel? #4649
Replies: 5 comments 15 replies
-
It is impossible to install two separate versions of the same package in one environment; maybe possible with some dirty tricks (make a 2nd package with the old version). This seems more like a deployment issue, and not pydantic-related 🤔 Have you heard about blue & green deployments? Example by RedHat. You can keep one of the deployments in the old version for production, and migrate at your own pace on the dev deployment. Migrating to v2 should be painless in most cases, but don't take my word for it. |
Beta Was this translation helpful? Give feedback.
-
It's an interesting idea. I can definitely see the advantage for big projects. We could perhaps release a "pydantic-next" package to support this, but only if there's enough demand. |
Beta Was this translation helpful? Give feedback.
-
This should be solved by #5771 |
Beta Was this translation helpful? Give feedback.
-
Just want to tag in the issue #6523 where I think I am echoing a lot of @tlambert03 's points, and surfacing real pain that is happening now that this has been released. There is a silver bullet to this problem, just rename your package when you break the API and everything just works. If you want folks who If you want folks to upgrade and not stay pinned down forever, releasing the separate package names is the best way to do that as it allows libraries and applications to make independent choices. |
Beta Was this translation helpful? Give feedback.
-
It would have been nice if this was in the migration guide. Due to the split off of pydantic-settings into a separate package we could not support both v1 and v2, and had to fully take out pydantic. If we knew this we could probably used that. see widgetti/solara#189 and #6497 |
Beta Was this translation helpful? Give feedback.
-
I am wondering whether (and if yes, how) it will be possible to install both versions of pydantic in parallel?
For bigger projects, I see this as beneficial to be able to migrate certain parts step by step without the need for a big bang migration.
Beta Was this translation helpful? Give feedback.
All reactions