BlogDocs

Allow different serializer to an Annotated type for `python` and `json` mode(#8432)

Merging
ChillPC:different-serializer-mode
into
main
0%
IMPROVEMENTS
0
REGRESSIONS
0
UNTOUCHED
10
NEW
0
DROPPED
0
IGNORED
0

Benchmarks

test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_generics.py::test_fastapi_startup_perf
0%
3.6 s
3.6 s
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_simple.py::test_fastapi_startup_perf
0%
1.3 s
1.3 s
test_north_star_dump_json
tests/benchmarks/test_north_star.py::test_north_star_dump_json
0%
194.8 ms
194.8 ms
test_north_star_dump_python
tests/benchmarks/test_north_star.py::test_north_star_dump_python
0%
76.9 ms
76.8 ms
test_north_star_json_dumps
tests/benchmarks/test_north_star.py::test_north_star_json_dumps
-1%
188 ms
189.9 ms
test_north_star_json_loads
tests/benchmarks/test_north_star.py::test_north_star_json_loads
0%
97.3 ms
97.2 ms
test_north_star_validate_json
tests/benchmarks/test_north_star.py::test_north_star_validate_json
0%
351.4 ms
350.4 ms
test_north_star_validate_json_strict
tests/benchmarks/test_north_star.py::test_north_star_validate_json_strict
0%
347 ms
346.7 ms
test_north_star_validate_python
tests/benchmarks/test_north_star.py::test_north_star_validate_python
0%
180.6 ms
179.9 ms
test_north_star_validate_python_strict
tests/benchmarks/test_north_star.py::test_north_star_validate_python_strict
-2%
108.2 ms
110.6 ms

Commits

Click on a commit to change the comparison range
base
main
19fa86c
0%
Create a json-or-python-schema but fail at the `test_serializer_annotated_plain_only_python` because: - json default serializer applied on `model_dump_json()` - python serializer applied on both `model_dump(mode='json')`
0ac5ff0
5 months ago by ChillPC
0%
Fix for example and apply same code to wrap serializer
ad378db
5 months ago by ChillPC
ResourcesHomePricingDocsBlogGitHub
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.