Skip to content

Standardize __get_pydantic_core_schema__ signature#7415

Merged
hramezani merged 1 commit intomainfrom
fix-get-pydantic-core-schema-signature
Sep 12, 2023
Merged

Standardize __get_pydantic_core_schema__ signature#7415
hramezani merged 1 commit intomainfrom
fix-get-pydantic-core-schema-signature

Conversation

@hramezani
Copy link
Copy Markdown
Member

@hramezani hramezani commented Sep 12, 2023

Fixes #7407

Selected Reviewer: @Kludex

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-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
Copy Markdown
Member Author

please review

@Kludex Kludex changed the title Standadize __get_pydantic_core_schema__ signature Standardize __get_pydantic_core_schema__ signature Sep 12, 2023
Comment thread pydantic/networks.py
def __get_pydantic_core_schema__(
cls,
source: type[Any],
handler: _annotated_handlers.GetCoreSchemaHandler,
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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. 🙏

Comment thread pydantic/networks.py
def __get_pydantic_core_schema__(
cls,
source: type[Any],
handler: _annotated_handlers.GetCoreSchemaHandler,
Copy link
Copy Markdown
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
@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