Skip to content

Add support for defer_build with @validate_call decorator#11584

Merged
Viicos merged 1 commit intomainfrom
validate-call-defer-build
Mar 20, 2025
Merged

Add support for defer_build with @validate_call decorator#11584
Viicos merged 1 commit intomainfrom
validate-call-defer-build

Conversation

@Viicos
Copy link
Copy Markdown
Member

@Viicos Viicos commented Mar 19, 2025

Change Summary

Fixes #11582.

All the schema generation logic is moved into a _create_validators() function, logic is identical.

Related issue number

Checklist

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

@Viicos Viicos requested a review from davidhewitt March 19, 2025 09:42
@github-actions github-actions Bot added the relnotes-fix Used for bugfixes. label Mar 19, 2025
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e21f580
Status: ✅  Deploy successful!
Preview URL: https://f423834d.pydantic-docs.pages.dev
Branch Preview URL: https://validate-call-defer-build.pydantic-docs.pages.dev

View logs

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 19, 2025

CodSpeed Performance Report

Merging #11584 will not alter performance

Comparing validate-call-defer-build (e21f580) with main (a2846da)

Summary

✅ 46 untouched benchmarks

@github-actions
Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic/_internal
  _validate_call.py
Project Total  

This report was generated by python-coverage-comment-action

@Viicos Viicos merged commit 8e98bc0 into main Mar 20, 2025
62 checks passed
@Viicos Viicos deleted the validate-call-defer-build branch March 20, 2025 13:38
@Viicos Viicos added relnotes-feature and removed relnotes-fix Used for bugfixes. labels Mar 27, 2025
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.

validate_call decorator does not work with staticmethod/classmethod that explicitly set return the class itself

2 participants