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

[wip] sort keys #1666

Closed
wants to merge 2 commits into from
Closed

[wip] sort keys #1666

wants to merge 2 commits into from

Conversation

zzstoatzz
Copy link

@zzstoatzz zzstoatzz commented Mar 10, 2025

adds sort_keys a la json.dumps to to_json/to_python_jsonable

not sure if this is the best place to do this, opening for criticism / feedback - happy to work through clean up if im on the right track

seems like i'd need to add a little coverage for rust if this is not otherwise fundamentally flawed

related to pydantic/pydantic#7424


ope I totally missed #1637 lol, happy to close and consolidate there if desirable

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 96.07843% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/serializers/infer.rs 94.11% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

codspeed-hq bot commented Mar 10, 2025

CodSpeed Performance Report

Merging #1666 will improve performances by 38.6%

Comparing zzstoatzz:sort-keys (ae379b0) with main (d8be765)

Summary

⚡ 1 improvements
✅ 156 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_strict_union_error_core 45.1 µs 32.6 µs +38.6%

precommits and consistent stubs
Comment on lines +32 to +36
pyo3 = { version = "0.23.5", features = [
"generate-import-lib",
"num-bigint",
"py-clone",
] }
Copy link
Author

@zzstoatzz zzstoatzz Mar 10, 2025

Choose a reason for hiding this comment

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

prob IDE idiosyncracy, can revert

@zzstoatzz
Copy link
Author

closing in favor of #1637

@zzstoatzz zzstoatzz closed this Apr 8, 2025
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.

1 participant