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

Ability to pass context to serialization (fix #7143) #8965

Merged
merged 9 commits into from Mar 26, 2024

Conversation

ornariece
Copy link
Contributor

@ornariece ornariece commented Mar 6, 2024

Change Summary

Implements the python frontend for the ability to pass context to serialization, which was implemented in pydantic/pydantic-core#1215.
Note that this PR will only be complete once pydantic adopts pydantic-core's release to come.

Related issue number

fix #7143

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

Selected Reviewer: @samuelcolvin

@ornariece
Copy link
Contributor Author

please review

Copy link

codspeed-hq bot commented Mar 6, 2024

CodSpeed Performance Report

Merging #8965 will not alter performance

Comparing ornariece:serialization-context (e0b9333) with main (e934638)

Summary

✅ 10 untouched benchmarks

Copy link
Member

@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.

This looks great, thanks so much! We could potentially add a link between the validation context docs and the serialization context docs. If users are using one of them, they might want a pointer to the other :).

docs/concepts/serialization.md Outdated Show resolved Hide resolved
docs/concepts/serialization.md Show resolved Hide resolved
@sydney-runkle
Copy link
Member

We'll make sure to get this into the 2.7 release!

ornariece and others added 2 commits March 13, 2024 15:54
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
@sydney-runkle
Copy link
Member

Hoping to do a pydantic-core release tomorrow or Tuesday, so we can bump the version + get this across the line :).

@ornariece
Copy link
Contributor Author

awesome! thanks 🙏

@sydney-runkle
Copy link
Member

@ornariece,

If you could pull in changes from main (which includes a pydantic-core update), this should be ready to merge!

@sydney-runkle
Copy link
Member

As soon as this #9064 merges, at least!

@ornariece
Copy link
Contributor Author

@sydney-runkle done

@sydney-runkle
Copy link
Member

@ornariece,

Amazing! Merging now!

@sydney-runkle sydney-runkle merged commit b9ec63f into pydantic:main Mar 26, 2024
53 checks passed
@ornariece ornariece deleted the serialization-context branch March 26, 2024 22:00
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.

Ability to pass a context object to the serialization methods
3 participants