Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Fix float serialization behavior in strict mode

#1400Merged
Comparing
float-ser-fix
(
96e84d3
) with
main
(
fd81a75
)
CodSpeed Performance Gauge
0%
Untouched
155

Benchmarks

155 total
test_to_string_direct
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+6%
19.5 µs18.5 µs
test_chain_function
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
24.9 µs23.9 µs
test_decimal_from_string_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+4%
23.6 µs22.8 µs
test_chain_two_functions
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
28.6 µs27.6 µs
test_validate_literal[python-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
14.9 µs14.6 µs
test_validate_literal[python-many_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14.9 µs14.6 µs
test_validate_literal[python-few_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14.9 µs14.6 µs
test_enum_int_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.6 µs15.4 µs
test_validate_literal[python-few_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.6 µs14.4 µs
test_enum_str_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15 µs14.8 µs
test_bytes_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.6 µs13.5 µs
test_validate_literal[python-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.7 µs14.5 µs
test_uuid_from_uuid_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
13.9 µs13.7 µs
test_date_from_date
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
14.1 µs14 µs
test_validate_literal[python-few_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.7 µs14.5 µs
test_validate_literal[json-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.5 µs15.3 µs
test_to_json_list_of_lists
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
1.7 ms1.7 ms
test_validate_literal[json-many_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.1 µs16 µs
test_int_range_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.6 µs15.5 µs
test_core_python_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
74.7 µs74.1 µs
test_enum_int_python
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
24.3 µs24.1 µs
test_tagged_union_int_keys_python
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
21.5 µs21.4 µs
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
18 µs17.9 µs
test_strict_union_error_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
32.3 µs32.1 µs
test_enum_str_python
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
23.9 µs23.8 µs

Commits

Click on a commit to change the comparison range
Base
main
fd81a75
-0.42%
float | int should ser ints as ints
a3a3eb2
2 years ago
by sydney-runkle
+0.49%
adding ser test
ed05d79
2 years ago
by sydney-runkle
+0.02%
Merge branch 'main' into float-ser-fix
96e84d3
2 years ago
by sydney-runkle
© 2026 CodSpeed Technology
Home Terms Privacy Docs