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

Fix pickling of RootModel #6457

Merged
merged 2 commits into from Jul 5, 2023
Merged

Fix pickling of RootModel #6457

merged 2 commits into from Jul 5, 2023

Conversation

dmontagu
Copy link
Contributor

@dmontagu dmontagu commented Jul 5, 2023

Closes #6455

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 5, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5283224
Status: ✅  Deploy successful!
Preview URL: https://a011bf56.pydantic-docs2.pages.dev
Branch Preview URL: https://dmontagu-6455.pydantic-docs2.pages.dev

View logs

Copy link
Contributor

@lig lig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under impression that I've tested that :(

Overall LGTM 👍🏻

A module for the test is up to you.

@@ -353,6 +353,18 @@ class PickleModelTwo(BaseModel):
assert not hasattr(m3, '_foo_')


def test_pickle_root_model(create_module):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to keep consolidating RootModel tests in tests/test_root_model.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moving it there while I add a changefile

Copy link

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the quick fix! 🚀

@dmontagu dmontagu enabled auto-merge (squash) July 5, 2023 15:28
@dmontagu dmontagu merged commit c3fc4e6 into main Jul 5, 2023
49 checks passed
@dmontagu dmontagu deleted the dmontagu/6455 branch July 5, 2023 15: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.

Ability to Pickle RootModels
4 participants