Skip to content
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

Expose AnySerializer via core schema #1394

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

BoxyUwU
Copy link
Contributor

@BoxyUwU BoxyUwU commented Aug 6, 2024

Change Summary

Fixes #1245

Allows simple_ser_schema to specify 'any' so that AnySerializer can be used when creating core schemas. The test_any.py file seems to adequately test the actual implementation of AnySerializer so I've only added tests that check that simple_ser_schema('any') actually results in an AnySerializer rather than duplicating the entire file 😅

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Copy link

codspeed-hq bot commented Aug 6, 2024

CodSpeed Performance Report

Merging #1394 will not alter performance

Comparing boxy/any_ser_schema (bdefd96) with main (f79d49b)

Summary

✅ 155 untouched benchmarks

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Looks great, thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for simple ser schema with any (lambda x: x replacement)
2 participants