Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Avoid using `?` with `get_item` to handle unhashable inputs properly

#1089Merged
Comparing
fix-for-hash-bubble-error
(
60c2c35
) with
main
(
a7739ec
)
CodSpeed Performance Gauge
0%
Untouched
140

Benchmarks

140 total
test_validate_literal[json-few_mixed]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
19.8 µs19.1 µs
test_tuple_many_variable
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
21 µs20.3 µs
test_decimal_from_string_pyd
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+4%
34.6 µs33.5 µs
test_chain_function
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+4%
24.9 µs24.1 µs
test_variable_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
21 µs20.3 µs
test_validate_literal[python-few_mixed]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
18.5 µs17.9 µs
test_chain_two_functions
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
30 µs29 µs
test_validate_literal[python-few_str_enum]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
17.4 µs16.9 µs
test_with_default
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
24.8 µs24.1 µs
test_validate_literal[json-few_str_enum]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
22.2 µs21.6 µs
test_positional_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
20.6 µs20.1 µs
test_tuple_many_positional
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
20.5 µs20 µs
test_validate_literal[python-many_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14.9 µs14.6 µs
test_decimal_from_string_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+2%
24.6 µs24.1 µs
test_raise_error_value_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
38 µs37.3 µs
test_isinstance_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
22.6 µs22.2 µs
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+2%
28.5 µs28 µs
test_smart_union_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
15.8 µs15.6 µs
test_model_instance_abc
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
34.3 µs33.9 µs
test_validate_literal[json-few_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.8 µs16.6 µs
test_generator_python
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
27.6 µs27.3 µs
test_date_from_datetime
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
23.7 µs23.4 µs
test_bool_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
23.8 µs23.5 µs
test_model_instance
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
34 µs33.6 µs
test_strict_union_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
16.2 µs16 µs

Commits

Click on a commit to change the comparison range
Base
main
a7739ec
-0.08%
avoid using ? with get item to handle unhashable inputs properly
03d3300
2 years ago
by sydney-runkle
-0.29%
test addition
7e2d37b
2 years ago
by sydney-runkle
+0.15%
updating comment
b9d6c8a
2 years ago
by sydney-runkle
+0.56%
tweak tests and comment
60c2c35
2 years ago
by samuelcolvin
© 2026 CodSpeed Technology
Home Terms Privacy Docs