Avatar for the pydantic user
pydantic
pydantic
BlogDocsChangelog

Add default factory with validated data to PrivateAttr

#11685
Comparing
andresliszt:add/validated-data-to-private-factory
(
0f435d3
) with
main
(
61a0673
)
CodSpeed Performance Gauge
0%
Untouched
212
Ignored
2

Benchmarks

214 total
test_north_star_validate_json
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
+4%
36 ms34.7 ms
test_list_of_strs_json_cached
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
313.1 µs304.2 µs
test_validators_build
tests/benchmarks/test_validators_build.py
CodSpeed Performance Gauge
+3%
1,011.6 µs983.3 µs
test_raise_error_custom
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
41 µs40 µs
test_simple_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+3%
39.2 µs38.2 µs
test_list_of_ints_core_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
760.9 µs744.1 µs
test_simple_model_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+2%
40.1 µs39.3 µs
test_dict_of_ints_core_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
1.4 ms1.3 ms
test_model_list_core_json
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
170 µs168 µs
test_core_future
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
15.9 µs15.8 µs
test_north_star_dump_python
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
+1%
17.5 ms17.3 ms
test_uuid_from_uuid_pyd
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
16.6 µs16.5 µs
test_smart_union_coerce_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
19.5 µs19.3 µs
test_url_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
26.1 µs25.9 µs
test_north_star_dump_json
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
+1%
28.2 ms27.9 ms
test_core_raw
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
15.5 µs15.4 µs
test_validate_literal[json-few_mixed]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
20.3 µs20.2 µs
test_validate_literal[json-many_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
17.5 µs17.4 µs
test_strict_union_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
18.1 µs18 µs
test_nested_schema_using_defs
pydantic-core/tests/benchmarks/test_nested_benchmark.py
CodSpeed Performance Gauge
+1%
15 ms15 ms
test_validate_literal[python-few_str_enum]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
17.1 µs17 µs
test_north_star_json_dumps
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
24.6 ms24.5 ms
test_validate_literal[json-few_large_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
18 µs17.9 µs
test_failed_rebuild
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
244.2 µs243 µs
test_date_from_datetime
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
19 µs18.9 µs

Commits

Click on a commit to change the comparison range
Base
main
61a0673
-0.12%
Add default factory with validated data to PrivateAttr
0f435d3
1 year ago
by andresliszt
© 2026 CodSpeed Technology
Home Terms Privacy Docs