pydantic
pydantic
BlogDocsChangelog

Make sure `None` is converted as `NoneType` in Python 3.14

#12370
Comparing
none-type-conversion
(
1e45c28
) with
main
(
024e292
)
CodSpeed Performance Gauge
0%
Untouched
46
Ignored
2

Benchmarks

Passed

test_nested_model_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+2%
48.7 µs47.9 µs
test_north_star_json_dumps
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
+2%
23.5 ms23.1 ms
test_list_of_models_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+1%
74.2 µs73.2 µs
test_north_star_validate_json_strict
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
+1%
38 ms37.5 ms
test_simple_model_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+1%
38.5 µs38 µs
test_import_basemodel
tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
+1%
26.7 µs26.4 µs
test_north_star_validate_python
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
+1%
36.7 ms36.3 ms
test_north_star_validate_json
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
+1%
38.1 ms37.7 ms
test_simple_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+1%
36.7 µs36.3 µs
test_complex_model_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+1%
50 µs49.5 µs
test_simple_model_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
+1%
34.2 µs33.9 µs
test_list_of_models_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
+1%
59.4 µs59 µs
test_nested_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+1%
50.3 µs49.9 µs
test_list_of_models_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+1%
75.5 µs75.1 µs
test_import_field
tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
0%
26.3 µs26.2 µs
test_complex_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
0%
48.8 µs48.6 µs
test_north_star_validate_python_strict
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
21.9 ms21.8 ms
test_north_star_dump_python
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
18.8 ms18.8 ms
test_getattr
tests/benchmarks/test_attribute_access.py
CodSpeed Performance Gauge
0%
56.3 µs56.2 µs
test_north_star_json_loads
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
20 ms20 ms
test_tagged_union_with_callable_discriminator_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1 ms1 ms
test_generic_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
724 µs723.8 µs
test_nested_recursive_generic_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
test_isinstance_basemodel
tests/benchmarks/test_isinstance.py
CodSpeed Performance Gauge
0%
6.3 ms6.3 ms
test_model_validators_serializers
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
769.2 µs769.4 µs
test_complex_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1.5 ms1.5 ms
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_generics.py
CodSpeed Performance Gauge
0%
79.9 ms80 ms
test_simple_model_schema_lots_of_fields_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
22.3 ms22.4 ms
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_simple.py
CodSpeed Performance Gauge
0%
19.5 ms19.5 ms
test_construct_dataclass_schema
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
test_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
826.1 µs827.6 µs
test_simple_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
600.7 µs601.8 µs
test_tagged_union_with_str_discriminator_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1 ms1 ms
test_lots_of_models_with_lots_of_fields
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1.9 s2 s
test_setattr
tests/benchmarks/test_attribute_access.py
CodSpeed Performance Gauge
0%
89.6 µs89.9 µs
test_nested_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
803.3 µs805.6 µs
test_north_star_dump_json
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
30.6 ms30.7 ms
test_nested_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
1.5 ms1.5 ms
test_efficiency_with_highly_nested_examples
tests/benchmarks/test_discriminated_unions.py
CodSpeed Performance Gauge
0%
646 µs648.3 µs
test_complex_model_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
0%
46.2 µs46.4 µs
test_recursive_discriminated_union_with_base_model
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
test_schema_build
tests/benchmarks/test_discriminated_unions.py
CodSpeed Performance Gauge
0%
2.6 ms2.6 ms
test_model_json_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
0%
51.1 µs51.3 µs
test_simple_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
-1%
600.3 µs603.7 µs
test_failed_rebuild
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
-1%
211.7 µs213 µs
test_deeply_nested_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
-1%
1.2 ms1.3 ms

Ignored

test_nested_model_serialization
tests/benchmarks/test_model_serialization.py
Ignored
CodSpeed Performance Gauge
+1%
43.5 µs43.2 µs
test_field_validators_serializers
tests/benchmarks/test_model_schema_generation.py
Ignored
CodSpeed Performance Gauge
-1%
1.5 ms1.6 ms

Commits

Click on a commit to change the comparison range
Base
main
024e292
+0.22%
Make sure `None` is converted as `NoneType` in Python 3.14
1e45c28
13 hours ago
by Viicos
© 2025 CodSpeed Technology
Home Terms Privacy Docs