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 validate_call schema generation and doc error for TypedDict #6370

Merged
merged 4 commits into from
Jul 2, 2023

Conversation

adriangb
Copy link
Member

@adriangb adriangb commented Jul 2, 2023

Fixes #6356

Selected Reviewer: @lig

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 2, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 893e2db
Status: ✅  Deploy successful!
Preview URL: https://08763d2a.pydantic-docs2.pages.dev
Branch Preview URL: https://fix-doc-error-description.pydantic-docs2.pages.dev

View logs

@adriangb adriangb changed the title Fix TypedDict error description Fix TypedDict error description and validate_call schema generation Jul 2, 2023
@adriangb
Copy link
Member Author

adriangb commented Jul 2, 2023

please review

Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

Can we add a test with a TypedDict on the signature or a BaseModel based class or both?

@Kludex
Copy link
Member

Kludex commented Jul 2, 2023

About the confusion that I did on the version being 3.11: there's a comment on the standard library that I believe is not correct about this - this is a comment to remind me to check this when I get home.

@adriangb
Copy link
Member Author

adriangb commented Jul 2, 2023

I'm sure we need typing.TypedDict to be 3.12+ because of python/cpython#103698

@adriangb adriangb changed the title Fix TypedDict error description and validate_call schema generation Fix validate_call schema generation and doc error for TypedDict Jul 2, 2023
@adriangb
Copy link
Member Author

adriangb commented Jul 2, 2023

@Kludex added a test and fixes some other bugs with validate_call

@adriangb
Copy link
Member Author

adriangb commented Jul 2, 2023

please review

Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

Thanks 😁🙏

@adriangb adriangb merged commit 61cdaea into main Jul 2, 2023
50 checks passed
@adriangb adriangb deleted the fix-doc-error-description branch July 2, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypedDict can not be used with V2
3 participants