Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Allow subclassing ValidationError and PydanticCustomError

#1413Merged
Comparing
Youssefares:subclass-errors
(
2d367c8
) with
main
(
4113638
)
CodSpeed Performance Gauge
0%
Untouched
155

Benchmarks

155 total
test_to_string_direct
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+6%
19.6 µs18.5 µs
test_int_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
41.4 µs39.8 µs
test_strict_union_error_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+3%
32.8 µs31.9 µs
test_raise_error_custom
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
38.1 µs37.2 µs
test_date_format_function
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
51.7 µs50.8 µs
test_date_format
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
50.9 µs50 µs
test_date_format_function_no_info
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
50.5 µs49.7 µs
test_arguments
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
26 µs25.6 µs
test_decimal_from_string_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+1%
24.1 µs23.8 µs
test_core_dict
tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
76.9 µs76.1 µs
test_complete_core_json
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+1%
499.9 µs495 µs
test_uuid
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
22.8 µs22.6 µs
test_dont_raise_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
20 µs19.8 µs
test_core_model_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
26.3 µs26.1 µs
test_validate_literal[json-few_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.4 µs15.3 µs
test_dict_of_ints_core_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
1.4 ms1.4 ms
test_validate_literal[json-few_str_enum]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
19.8 µs19.7 µs
test_generator_python
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
26.8 µs26.6 µs
test_core_string_strict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.5 µs13.4 µs
test_bytes_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.5 µs13.4 µs
test_strict_int
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.5 µs13.4 µs
test_small_class_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
19.2 µs19 µs
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
30 µs29.8 µs
test_core_model_json_extra
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
30.6 µs30.5 µs
test_validate_literal[json-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.4 µs15.3 µs

Commits

Click on a commit to change the comparison range
Base
main
4113638
-0.21%
Add ValidationError.__new__, Change from_exception_data to classmethod, remove @final
bec6b4b
2 years ago
by Youssefares
+0.14%
Move some typing imports to typing_extensions
29ddee7
2 years ago
by Youssefares
-0.03%
More python3.8+ compatiblity test fixes
a7ab834
2 years ago
by Youssefares
+0.16%
More & more python3.8+ compatiblity test fixes
2d367c8
2 years ago
by Youssefares
© 2026 CodSpeed Technology
Home Terms Privacy Docs