-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Disable pydantic-core
core schema validation
#11271
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CodSpeed Performance ReportMerging #11271 will improve performances by 10.25%Comparing Summary
Benchmarks breakdown
|
Deploying pydantic-docs with
|
Latest commit: |
4204a07
|
Status: | ✅ Deploy successful! |
Preview URL: | https://bceef31d.pydantic-docs.pages.dev |
Branch Preview URL: | https://remove-schema-val.pydantic-docs.pages.dev |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
pydantic-core
schema validationpydantic-core
schema validation
What happens with the example I provided on Slack? |
Contributor
Author
sydney-runkle
commented
Jan 16, 2025
•
Loading
edited
<
8000
div data-view-component="true" class="blankslate blankslate-spacious color-bg-default rounded-2">
Uh oh!
There was an error while loading. Please reload this page.
It doesn't error: from pydantic import TypeAdapter, Strict
from typing import Annotated
from collections.abc import Iterable
ta = TypeAdapter(Annotated[Iterable[int], Strict()])
print(ta.core_schema)
# > {'type': 'generator', 'items_schema': {'type': 'int'}, 'strict': True}
print(ta.validate_python(['1', '2', '3']))
# > ValidatorIterator(index=0, schema=Some(Int(IntValidator { strict: false }))) You're right, the error on |
Viicos
reviewed
Jan 21, 2025
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
pydantic-core
schema validationpydantic-core
core schema validation
Viicos
approved these changes
Jan 21, 2025
This was referenced Jan 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
relnotes-change
Used for changes to existing functionality which don't have a better categorization.
relnotes-performance
Used for performance improvements.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This results in solid perf improvements (5-10% ish) for schema builds, which we're actively focused on.
You can now enable this with
PYDANTIC_VALIDATE_CORE_SCHEMAS
if you're having issues with custom schemas.If issues are struggling with this, it's a sign that we need to fix things in
pydantic-core
validator builds.