8000 Add runtime validation of `@validate_call` callable argument by Viicos · Pull Request #10627 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

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
@cloudflare-workers-and-pages
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

@codspeed-hq
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
@github-actions
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
@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

4 participants

0