pydantic
pydantic-core
BlogDocsChangelog

Adding definitions support

#406
Comparing
definitions
(
823b316
) with
main
(
3ea00bd
)
CodSpeed Performance Gauge
+1%
Untouched
84
New
9
Dropped
1

Benchmarks

Failed

test_recursive_model_core
tests/benchmarks/test_micro_benchmarks.py
Missing
CodSpeed Performance Gauge
N/A
452.6 µsN/A

New

test_isinstance_string_lax_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A12.1 µs
test_isinstance_string_strict_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A11.4 µs
test_definition_model_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A432.9 µs
test_definition_in_tree
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A5.1 ms
test_isinstance_string_strict_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A11.9 µs
test_core_string_strict_wrong
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A31.5 µs
test_definition_out_of_tree
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A5.1 ms
test_core_string_lax_wrong
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A31.5 µs
test_isinstance_string_lax_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
N/A
N/A11.4 µs

Passed

test_smart_union_coerce_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+6%
16 µs15.1 µs
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+4%
26.1 µs25 µs
test_list_of_ints_core_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
1.1 ms1 ms
test_with_default
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
21.7 µs21.1 µs
test_core_raw
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+3%
11.7 µs11.4 µs
test_date_from_date
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+3%
11.7 µs11.4 µs
test_core_json_fs
tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
+2%
187 µs182.7 µs
test_tuple_many_variable
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
18.6 µs18.2 µs
test_core_model_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
24.4 µs24 µs
test_positional_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
23.9 µs23.5 µs
test_bytes_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
11.5 µs11.3 µs
test_list_of_any_core_py
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
16.5 µs16.2 µs
test_small_class_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
18.1 µs17.7 µs
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+2%
24.9 µs24.5 µs
test_dont_raise_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
25.8 µs25.4 µs
test_date_from_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+2%
15.1 µs14.9 µs
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+2%
17 µs16.7 µs
test_core_string_lax
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
11.5 µs11.4 µs
test_core_string_strict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
11.5 µs11.3 µs
test_core_json_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
226.3 µs223.2 µs
test_raise_error_value_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
46.8 µs46.2 µs
test_core_python_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
108.3 µs106.9 µs
test_strict_union_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
15.2 µs15 µs
test_core_json
tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
102.1 µs100.8 µs
test_core_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
17.6 µs17.3 µs
test_core_future_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
15.4 µs15.2 µs
test_isinstance_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
20.2 µs19.9 µs
test_core_json_not_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
223.2 µs220.7 µs
test_complete_core_json
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+1%
721 µs713.6 µs
test_strict_union_error_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
35.9 µs35.5 µs
test_complete_core_strict
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+1%
403.9 µs399.9 µs
test_generator_rust
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
18.2 µs18.1 µs
test_to_string_direct
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
17.9 µs17.7 µs
test_raise_error_custom
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
46.9 µs46.4 µs
test_core_python_not_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
104 µs103.1 µs
test_to_string_format
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
22.5 µs22.3 µs
test_bool_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
23.3 µs23.1 µs
test_chain_function
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
30.6 µs30.4 µs
test_core_future_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
17.9 µs17.8 µs
test_tuple_many_positional
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
18.8 µs18.6 µs
test_chain_two_functions
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
37.8 µs37.5 µs
test_core_model_py
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
25.3 µs25.1 µs
test_small_class_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
27.2 µs27 µs
test_frozenset_of_ints_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
420.6 µs417.6 µs
test_chain_nested_functions
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
37.2 µs36.9 µs
test_smart_union_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
14.3 µs14.2 µs
test_model_core_json
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
32 µs31.8 µs
test_dict_of_any_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
898.1 µs892.5 µs
test_set_of_ints_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
1.9 ms1.9 ms
test_model_exclude_unset_true
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
34.9 µs34.7 µs
test_date_from_datetime_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
16.7 µs16.6 µs
test_variable_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
24 µs23.9 µs
test_python_json_list_none
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
138.4 µs137.7 µs
test_model_exclude_unset_false
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
28 µs27.9 µs
test_arguments
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
28.3 µs28.1 µs
test_complete_core_lax
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
371.3 µs369.6 µs
test_list_of_ints_core_py
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1.6 ms1.6 ms
test_complete_core_isinstance
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
1.7 ms1.7 ms
test_model_list_core_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
206.5 µs205.8 µs
test_json_direct_list_int
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
191.4 µs190.8 µs
test_core_dict
tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
0%
80.5 µs80.3 µs
test_generator_python
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
35.9 µs35.8 µs
test_python_json_list_str
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
169.3 µs168.9 µs
test_core_dict_filter
tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
0%
85.4 µs85.2 µs
test_set_of_ints_core_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
test_python_json_list_int
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
163.8 µs163.4 µs
test_many_models_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
test_complete_core_error
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
2.4 ms2.3 ms
test_chain_list
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
31.3 µs31.2 µs
test_json_direct_list_str
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
211 µs210.6 µs
test_json_any_list_int
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
313.1 µs312.6 µs
test_json_any_list_str
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
336.3 µs335.8 µs
test_datetime
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
26.8 µs26.8 µs
test_date_format_function
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
49.7 µs49.7 µs
test_dict_of_ints_core_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
3.2 ms3.2 ms
test_date_format
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
48.1 µs48.1 µs
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
0%
144.1 µs144.3 µs
test_list_of_nullable_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
209.5 µs210.6 µs
test_dict_of_ints_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
2.3 ms2.4 ms
test_many_models_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
2.6 ms2.6 ms
test_int_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
47.6 µs48.1 µs
test_build_schema
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
-1%
818.6 µs827.5 µs
test_list_of_dict_models_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-2%
125.6 µs128.1 µs
test_date_from_datetime
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
-4%
20.6 µs21.5 µs

Commits

Click on a commit to change the comparison range
Base
main
3ea00bd
+0.52%
adding definitions support
a44a3d6
3 years ago
by samuelcolvin
+0.21%
fix rust benchmarks
df69004
3 years ago
by samuelcolvin
-0.12%
rename "recursive" -> "definition"
8396d70
3 years ago
by samuelcolvin
-0.16%
in-line some valdiators
f300f6c
3 years ago
by samuelcolvin
-0.12%
error positions for definitions errors
00394a3
3 years ago
by samuelcolvin
+0.09%
inlining, take 3
83c4477
3 years ago
by samuelcolvin
+0.14%
cleanup
ffeefaa
3 years ago
by samuelcolvin
+0.11%
correctly inline serializers
2eaf2df
3 years ago
by samuelcolvin
+0.19%
switch to defintions as a core schema type
cd74fd0
3 years ago
by samuelcolvin
-0.01%
errors on repeated refs, more tests
bf3fb9e
3 years ago
by samuelcolvin
-0.21%
Fix benches
9f06451
3 years ago
by dmontagu
+0.2%
Update src/build_context.rs
823b316
3 years ago
by samuelcolvin
© 2026 CodSpeed Technology
Home Terms Privacy Docs