Skip to content

Conversation

sydney-runkle
Copy link
Contributor

@sydney-runkle sydney-runkle commented Apr 14, 2024

Fix #9231

Selected Reviewer: @hramezani

@sydney-runkle
Copy link
Contributor Author

Please review

Copy link

cloudflare-workers-and-pages bot commented Apr 14, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6673dc5
Status: ✅  Deploy successful!
Preview URL: https://8d35bcec.pydantic-docs2.pages.dev
Branch Preview URL: https://fix-secret-ser.pydantic-docs2.pages.dev

View logs

Copy link

codspeed-hq bot commented Apr 14, 2024

CodSpeed Performance Report

Merging #9240 will not alter performance

Comparing fix-secret-ser (6673dc5) with main (6aab43e)

Summary

✅ 13 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.

The fix here seems a bit magical to me, can you give a bit more detail on why the original schema was wrong? I wonder if there's a deeper bug or otherwise awkward behaviour...

@sydney-runkle
Copy link
Contributor Author

@davidhewitt,

I think there's a deeper bug, that the serialization attached to the individual python and json schemas wasn't working - definitely something that we could fix + use to clean up some schemas or at least make them a bit more intuitive.

Will report this in core.

@sydney-runkle
Copy link
Contributor Author

Opened an issue here to address that bug in core, but this should work for now. Here's that issue: pydantic/pydantic-core#1270

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

Successfully merging this pull request may close these issues.

JSON serialisation error with Secret types union.
3 participants