Skip to content

Add runtime validation of @validate_call callable argument #10627

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 1 commit into from
Oct 15, 2024

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Oct 14, 2024

Change Summary

Wrapping up #10484
Closes #10461

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

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Oct 14, 2024
Copy link

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: cc74d42
Status: ✅  Deploy successful!
Preview URL: https://bb03277e.pydantic-docs.pages.dev
Branch Preview URL: https://validate-call-runtime-tc.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Oct 14, 2024

CodSpeed Performance Report

Merging #10627 will not alter performance

Comparing validate-call-runtime-tc (cc74d42) with main (60f7047)

Summary

✅ 44 untouched benchmarks

@Viicos Viicos added relnotes-feature and removed relnotes-fix Used for bugfixes. labels Oct 14, 2024
@Viicos Viicos enabled auto-merge (squash) October 14, 2024 20:09
Copy link
Contributor

Coverage report

Click to see where and how coverage changed

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

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

Copy link
Contributor

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

LGTM, but would like answers to a few questions before we merge.

Thanks @Viicos for finishing this up, and thanks @kc0506 for your work on the initial changes here!

'__name__',
'__qualname__',
'__annotations__',
'__dict__', # required for __module__
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we thought about the consequences of removing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

__name__ was necessary for the core_config title thing but #10562 made it not necessary anymore. For the rest, I don't think it will change anything.

@Viicos Viicos merged commit ba50d94 into main Oct 15, 2024
65 checks passed
@Viicos Viicos deleted the validate-call-runtime-tc branch October 15, 2024 15:17
@sydney-runkle
Copy link
Contributor

Didn't realize things were set to auto merge, let's still chat about the above questions + potentially address them in a new small PR.

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 not working with class/custom callables
3 participants