Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Improving the alias configuration API for validation and serialization

#1640Merged
Comparing
new-alias-api
(
77c8c03
) with
main
(
7dc19c3
)
CodSpeed Performance Gauge
0%
Untouched
157

Benchmarks

157 total
test_nested_schema_inlined
tests/benchmarks/test_nested_benchmark.py
CodSpeed Performance Gauge
-4%
15.3 ms16 ms
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
-3%
122.7 µs126.3 µs
test_build_schema
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
-3%
708 µs728.9 µs
test_core_json_fs
tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
-2%
137.3 µs140.7 µs
test_small_class_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-2%
26.3 µs26.9 µs
test_complete_core_strict
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
-1%
244.6 µs248.2 µs
test_definition_model_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
1 ms1 ms
test_enum_str_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.2 µs15 µs
test_validate_literal[python-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.1 µs14.9 µs
test_to_json_list_of_lists
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
2 ms2 ms
test_tagged_union_int_keys_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
25.3 µs25.6 µs
test_core_string_strict_wrong_str_e
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
40.7 µs40.3 µs
test_core_model_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
25.6 µs25.9 µs
test_bytes_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.9 µs13.7 µs
test_core_model_json_extra
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
29.4 µs29.7 µs
test_validate_literal[json-many_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.8 µs16.7 µs
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
-1%
18.2 µs18.4 µs
test_uuid_from_uuid_pyd
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
14.9 µs14.8 µs
test_nested_schema_using_defs
tests/benchmarks/test_nested_benchmark.py
CodSpeed Performance Gauge
-1%
14.3 ms14.4 ms
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
26.5 µs26.3 µs
test_core_future_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
-1%
16 µs16.1 µs
test_dataclass_serialization_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
24.6 µs24.8 µs
test_core_python_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
-1%
68.4 µs69 µs
test_decimal_from_string_limit
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+1%
19 µs18.9 µs
test_many_models_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
921.4 µs928.5 µs

Commits

Click on a commit to change the comparison range
Base
main
7dc19c3
+0.39%
starting on alias API unification
a780908
1 year ago
by sydney-runkle
-0.15%
add support for serialize_by_alias
2c5c0f8
1 year ago
by sydney-runkle
+0.23%
serialize_by_alias tests
772f706
1 year ago
by sydney-runkle
-0.23%
Implement support for by_alias and by_name for model validation functions
2c9ac6d
1 year ago
by sydney-runkle
-0.54%
use Option<bool> for serialize_by_alias config to be consistent with validation alias/name settings
4fac099
1 year ago
by sydney-runkle
+0.23%
Merge branch 'main' into new-alias-api
5e2a102
1 year ago
by sydney-runkle
-0.64%
Merge branch 'new-alias-api' of https://github.com/pydantic/pydantic-core into new-alias-api
afed325
1 year ago
by sydney-runkle
+0.17%
a and A -> my_field and my_alias
93f1aef
1 year ago
by sydney-runkle
-0.02%
Using .or(x).unwrap_or(y) syntax
b5e3b4c
1 year ago
by sydney-runkle
+0.12%
Merge branch 'new-alias-api' of https://github.com/pydantic/pydantic-core into new-alias-api
57c1409
1 year ago
by sydney-runkle
-0.33%
formatting
f64a0fa
1 year ago
by sydney-runkle
+0.73%
Update python/pydantic_core/core_schema.py
c2a1b67
1 year ago
by sydney-runkle
-0.1%
revert test skip
77c8c03
1 year ago
by sydney-runkle
© 2026 CodSpeed Technology
Home Terms Privacy Docs