-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add GenericModel to MOVED_IN_V2 #6776
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
Conversation
|
please review cc @Kludex |
Deploying with
|
| Latest commit: |
9c63a84
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8db80fd0.pydantic-docs2.pages.dev |
| Branch Preview URL: | https://add-genericmodel-to-moved.pydantic-docs2.pages.dev |
pydantic/_migration.py
Outdated
| @@ -12,6 +12,7 @@ | |||
| 'pydantic.utils:to_lower_camel': 'pydantic.alias_generators:to_camel', | |||
| 'pydantic:PyObject': 'pydantic.types:ImportString', | |||
| 'pydantic.types:PyObject': 'pydantic.types:ImportString', | |||
| 'pydantic.generics.GenericModel': 'pydantic.BaseModel', | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think GenericModel should either on REMOVED_IN_V2 or it should have a special condition like we have on BaseSettings on the getattr_migration. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean, can you just push your suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
No, it was not... I was going to get to this today, I didn't have time the last days. Should be fine, but I'm not sure if this is what we are supposed to do. Like, I think it should be on the |
|
But functionally speaking if someone replaces GenericModel with BaseModel they’re good right? |
Correct. 👍 It's just that the warning is "GenericModel has been moved to BaseModel" - or similar. Anyway, it's fine. |
#6733 (comment)
Selected Reviewer: @dmontagu