Avatar for the pydantic user
pydantic
pydantic
BlogDocsChangelog

Use a default of `Any` for the `ImportString` type variable

#10193Closed
Comparing
import-string-default
(
e8f6e31
) with
main
(
5d99a65
)
CodSpeed Performance Gauge
0%
Untouched
17

Benchmarks

Passed

test_north_star_validate_python
tests/benchmarks/test_north_star.py::test_north_star_validate_python
CodSpeed Performance Gauge
+1%
44.4 ms44.1 ms
test_north_star_validate_json_strict
tests/benchmarks/test_north_star.py::test_north_star_validate_json_strict
CodSpeed Performance Gauge
+1%
52.9 ms52.6 ms
test_north_star_validate_json
tests/benchmarks/test_north_star.py::test_north_star_validate_json
CodSpeed Performance Gauge
+1%
53.1 ms52.8 ms
test_construct_schema
tests/benchmarks/test_schema_build.py::test_construct_schema
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
test_schema_build
tests/benchmarks/test_discriminated_unions.py::test_schema_build
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
test_import_basemodel
tests/benchmarks/test_imports.py::test_import_basemodel
CodSpeed Performance Gauge
0%
84.7 µs84.7 µs
test_north_star_json_loads
tests/benchmarks/test_north_star.py::test_north_star_json_loads
CodSpeed Performance Gauge
0%
21.9 ms21.9 ms
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_simple.py::test_fastapi_startup_perf
CodSpeed Performance Gauge
0%
31.6 ms31.6 ms
test_north_star_validate_python_strict
tests/benchmarks/test_north_star.py::test_north_star_validate_python_strict
CodSpeed Performance Gauge
0%
29.4 ms29.4 ms
test_lots_of_models_with_lots_of_fields
tests/benchmarks/test_schema_build.py::test_lots_of_models_with_lots_of_fields
CodSpeed Performance Gauge
0%
4.5 s4.5 s
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_generics.py::test_fastapi_startup_perf
CodSpeed Performance Gauge
0%
258.7 ms258.8 ms
test_import_field
tests/benchmarks/test_imports.py::test_import_field
CodSpeed Performance Gauge
0%
83.7 µs83.8 µs
test_isinstance_basemodel
tests/benchmarks/test_isinstance.py::test_isinstance_basemodel
CodSpeed Performance Gauge
0%
26.4 ms26.5 ms
test_north_star_json_dumps
tests/benchmarks/test_north_star.py::test_north_star_json_dumps
CodSpeed Performance Gauge
0%
23.6 ms23.7 ms
test_efficiency_with_highly_nested_examples
tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples
CodSpeed Performance Gauge
0%
968.1 µs970.7 µs
test_north_star_dump_json
tests/benchmarks/test_north_star.py::test_north_star_dump_json
CodSpeed Performance Gauge
-2%
30.6 ms31.2 ms
test_north_star_dump_python
tests/benchmarks/test_north_star.py::test_north_star_dump_python
CodSpeed Performance Gauge
-2%
16.8 ms17.2 ms

Commits

Click on a commit to change the comparison range
Base
main
5d99a65
-0.13%
Use a default of `Any` for the `ImportString` type var The runtime behavior is to allow anything if `ImportString` isn't parametrized. We reflect this by providing a default value to the type variable, so that type checkers don't complain on missing parametrization.
e8f6e31
1 year ago
by Viicos
© 2025 CodSpeed Technology
Home Terms Privacy Docs