Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Fixing `exclude_none` for json serialization of `computed_field`s

#1098Merged
Comparing
fix-computed-field-exclude
(
f94b5e3
) with
main
(
c7daf16
)
CodSpeed Performance Gauge
0%
Untouched
140

Benchmarks

140 total
test_chain_function
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
25 µs23.9 µs
test_small_class_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
32.1 µs31.2 µs
test_complete_core_error
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+3%
1.9 ms1.9 ms
test_list_of_dict_models_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
141.4 µs137.7 µs
test_small_class_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
22 µs21.7 µs
test_validate_literal[json-few_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.5 µs16.3 µs
test_validate_literal[python-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.4 µs14.3 µs
test_validate_literal[json-many_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.9 µs16.7 µs
test_core_json_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
153.3 µs151.4 µs
test_isinstance_string_lax_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.8 µs13.6 µs
test_isinstance_string_lax_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.5 µs15.4 µs
test_validate_literal[json-few_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.8 µs16.7 µs
test_int_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
44.5 µs44.1 µs
test_complete_core_isinstance
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+1%
1.8 ms1.8 ms
test_date_format_function_no_info
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
51.9 µs51.4 µs
test_model_core_json
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
39.4 µs39 µs
test_validate_literal[python-few_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.5 µs14.4 µs
test_smart_union_coerce_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
17.5 µs17.4 µs
test_core_string_strict_wrong_str_e
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
43.1 µs42.7 µs
test_with_default
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
24.7 µs24.5 µs
test_filter
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
46.7 µs46.3 µs
test_datetime
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
29.6 µs29.4 µs
test_dont_raise_error_no_info
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
17.8 µs17.7 µs
test_date_from_datetime_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
19.9 µs19.8 µs
test_core_raw
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
13.7 µs13.6 µs

Commits

Click on a commit to change the comparison range
Base
main
c7daf16
+0.02%
fixing exclude_none for json serialization of computed fields
f94b5e3
2 years ago
by sydney-runkle
© 2026 CodSpeed Technology
Home Terms Privacy Docs