Avatar for the pydantic user
pydantic
pydantic
BlogDocsChangelog

Make validation `Extra` immutable, like with serialization

#13081Merged
Comparing
dh/no-rebind-extra
(
f20a472
) with
main
(
b7e81cf
)
CodSpeed Performance Gauge
-16%
Regression
1
Untouched
214
Ignored
2

Benchmarks

217 total
test_simple_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
-16%
635.2 µs757.2 µs
test_definition_model_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
1.1 ms1 ms
test_core_raw
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+3%
15.7 µs15.2 µs
test_validate_literal[python-few_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
16.3 µs15.8 µs
test_validate_literal[json-few_small_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
18 µs17.5 µs
test_uuid_from_uuid_pyd
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+3%
16.6 µs16.2 µs
test_validate_literal[python-few_str_enum]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
17 µs16.6 µs
test_tuple_many_variable
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
19.5 µs19 µs
test_validate_literal[json-few_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
17.7 µs17.2 µs
test_validate_literal[json-many_small_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
17.9 µs17.4 µs
test_validators_build
tests/benchmarks/test_validators_build.py
CodSpeed Performance Gauge
+2%
1,014 µs989.6 µs
test_core_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+2%
21.9 µs21.4 µs
test_validate_literal[json-few_mixed]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
20.6 µs20.1 µs
test_core_raw
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+2%
15.8 µs15.4 µs
test_core_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+2%
27.9 µs27.2 µs
test_validate_literal[json-many_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
17.7 µs17.3 µs
test_date_from_datetime
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+2%
19.2 µs18.8 µs
test_enum_str_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
16.6 µs16.3 µs
test_nested_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+2%
51.3 µs50.2 µs
test_core_string_lax
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.4 µs15.1 µs
test_core_future_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+2%
18.1 µs17.7 µs
test_tuple_many_positional
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
19.5 µs19.1 µs
test_validate_literal[python-many_small_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
16.5 µs16.2 µs
test_validate_literal[python-many_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
16.2 µs15.9 µs
test_validate_literal[python-few_large_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
16.7 µs16.3 µs

Commits

Click on a commit to change the comparison range
Base
main
b7e81cf
+0.03%
Make validation `Extra` immutable, like with serialization
f9227ea
1 month ago
by davidhewitt
-16.14%
tidy up accessor type aliases
f20a472
1 month ago
by davidhewitt
© 2026 CodSpeed Technology
Home Terms Privacy Docs