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

Update arbitrary class doc example using Annotated instead of constr #8010

Merged
merged 2 commits into from Nov 6, 2023

Conversation

0x00cl
Copy link
Contributor

@0x00cl 0x00cl commented Nov 4, 2023

Change Summary

In the documentation there is a code example for Arbitrary class instances that uses constr() which according to the documentation is its discouraged and will be deprecated in Pydantic 3.0 in favor of Annotated and StringConstraints

Related issue number

None

Checklist

  • [ x ] The pull request title is a good summary of the changes - it will be used in the changelog
  • [ x ] Unit tests for the changes exist
  • [ x ] Tests pass on CI
  • [ x ] Documentation reflects the changes where applicable
  • [ x ] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @dmontagu

@0x00cl
Copy link
Contributor Author

0x00cl commented Nov 4, 2023

please review

@sydney-runkle sydney-runkle added the relnotes-ignore Omit this PR from the release notes. label Nov 6, 2023
Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the contribution! This will be included in our upcoming release (v2.5) 😄

@sydney-runkle sydney-runkle merged commit 185e03a into pydantic:main Nov 6, 2023
59 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review relnotes-ignore Omit this PR from the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants