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_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_core_string_strict_wrong_str_e
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
40.7 µs40.3 µs
test_bytes_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.9 µs13.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_uuid_from_uuid_pyd
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
14.9 µs14.8 µs
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
26.5 µs26.3 µs
test_decimal_from_string_limit
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+1%
19 µs18.9 µs
test_dataclass_to_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
40.1 µs39.8 µs
test_isinstance_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
18.8 µs18.6 µs
test_dont_raise_error_no_info
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
18.4 µs18.2 µs
test_list_of_strs_json_uncached
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
405.1 µs402.3 µs
test_validate_literal[json-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.6 µs16.5 µs
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
25.8 µs25.7 µs
test_validate_literal[json-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16 µs15.9 µs
test_complete_core_error
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+1%
1.8 ms1.8 ms
test_enum_str_python
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
24 µs23.8 µs
test_field_function_validator
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
396.5 µs394.3 µs
test_dataclass_serialization_python
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
21.7 µs21.6 µs
test_raise_error_value_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
36.6 µs36.4 µs
test_core_string_lax
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14 µs13.9 µs
test_date_from_date
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
14.3 µs14.2 µs
test_model_exclude_unset_true
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
35.3 µs35.1 µs
test_dont_raise_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
20.3 µs20.2 µs
test_core_future_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
0%
18.6 µs18.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