Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Fix str subclass validation for enums

#1273Merged
Comparing
enum_fixes
(
cad59ca
) with
main
(
b777774
)
CodSpeed Performance Gauge
+1%
Untouched
155

Benchmarks

155 total
test_small_class_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+5%
31.2 µs29.6 µs
test_datetime
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+5%
28.1 µs26.8 µs
test_model_instance_abc
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
33.1 µs32.2 µs
test_dataclass_to_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+3%
40.5 µs39.5 µs
test_int_range_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
15.8 µs15.4 µs
test_isinstance_string_strict_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14 µs13.7 µs
test_enum_str_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.1 µs14.8 µs
test_field_function_validator
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
388.9 µs381.4 µs
test_isinstance_string_strict_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.3 µs15 µs
test_isinstance_string_lax_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.6 µs15.3 µs
test_validate_literal[json-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.7 µs15.4 µs
test_validate_literal[python-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14.8 µs14.6 µs
test_to_string_direct
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
19.8 µs19.4 µs
test_validate_literal[python-few_str_enum]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.4 µs15.1 µs
test_core_model_py
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
28 µs27.6 µs
test_dataclass_serialization_python
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
23.6 µs23.2 µs
test_validate_literal[python-few_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14.8 µs14.5 µs
test_variable_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
19.4 µs19.1 µs
test_bytes_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
13.7 µs13.5 µs
test_strict_int
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
13.7 µs13.5 µs
test_isinstance_string_lax_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.9 µs13.7 µs
test_validate_literal[python-few_mixed]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.9 µs16.7 µs
test_small_class_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
19.5 µs19.2 µs
test_int_range
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.9 µs14.7 µs
test_to_json_list_of_lists
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
1.7 ms1.7 ms

Commits

Click on a commit to change the comparison range
Base
main
b777774
-0.66%
fix for str subclass validation
bcbcf0e
2 years ago
by sydney-runkle
+0.04%
adding test
3e5b2f4
2 years ago
by sydney-runkle
+0.38%
Fix constructor
98327b2
2 years ago
by sydney-runkle
-0.04%
syntax fix
0d7f714
2 years ago
by sydney-runkle
+0.68%
Merge branch 'main' into enum_fixes
3a31507
2 years ago
by sydney-runkle
-0.12%
add comments
d023d05
2 years ago
by sydney-runkle
+0.27%
fixing test
cad59ca
2 years ago
by sydney-runkle
© 2026 CodSpeed Technology
Home Terms Privacy Docs