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

Standardize __get_pydantic_core_schema__ signature #7415

Merged
merged 1 commit into from Sep 12, 2023

Conversation

hramezani
Copy link
Member

@hramezani hramezani commented Sep 12, 2023

Fixes #7407

Selected Reviewer: @Kludex

@cloudflare-pages
Copy link

cloudflare-pages bot commented Sep 12, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e2ad3ed
Status: ✅  Deploy successful!
Preview URL: https://03b78962.pydantic-docs2.pages.dev
Branch Preview URL: https://fix-get-pydantic-core-schema.pydantic-docs2.pages.dev

View logs

@hramezani hramezani force-pushed the fix-get-pydantic-core-schema-signature branch from 6746688 to e2ad3ed Compare September 12, 2023 11:49
@hramezani
Copy link
Member Author

please review

@Kludex Kludex changed the title Standadize __get_pydantic_core_schema__ signature Standardize __get_pydantic_core_schema__ signature Sep 12, 2023
@@ -360,6 +363,7 @@ def __get_pydantic_json_schema__(
def __get_pydantic_core_schema__(
cls,
source: type[Any],
handler: _annotated_handlers.GetCoreSchemaHandler,
Copy link
Member

@Kludex Kludex Sep 12, 2023

Choose a reason for hiding this comment

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

Are those needed in this file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, not needed because they are working without them. This is just to make all the __get_pydantic_core_schema__ signature similar.

Copy link
Member

Choose a reason for hiding this comment

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

I see why you changed the other files, but since this is optional here, I would leave without it.

Anyway, not a blocker. Do as you think is more appropriate. 🙏

@@ -360,6 +363,7 @@ def __get_pydantic_json_schema__(
def __get_pydantic_core_schema__(
cls,
source: type[Any],
handler: _annotated_handlers.GetCoreSchemaHandler,
Copy link
Member

Choose a reason for hiding this comment

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

I see why you changed the other files, but since this is optional here, I would leave without it.

Anyway, not a blocker. Do as you think is more appropriate. 🙏

@hramezani hramezani merged commit b46010b into main Sep 12, 2023
49 checks passed
@hramezani hramezani deleted the fix-get-pydantic-core-schema-signature branch September 12, 2023 13:24
@davidhewitt davidhewitt added the relnotes-fix Used for bugfixes. label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standadize EmailStr validator __get_pydantic_core_schema__ method
4 participants