Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

fix validation of ints with leading unary plus

#1272Merged
Comparing
cknv:int-leading-unary-plus
(
5a65ecc
) with
main
(
4adf47f
)
CodSpeed Performance Gauge
-1%
Untouched
155

Benchmarks

155 total
test_model_instance_abc
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
33.3 µs32.3 µs
test_chain_nested_functions
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
28.4 µs27.6 µs
test_to_json_list_of_lists
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
1.8 ms1.8 ms
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
29.9 µs29.4 µs
test_core_model_json_extra
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
30.5 µs30 µs
test_small_class_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
31 µs30.5 µs
test_core_string_strict_wrong_str_e
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
40 µs39.5 µs
test_field_function_validator
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
378.5 µs375.3 µs
test_core_dict_filter
tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
78.9 µs78.3 µs
test_core_json_fs
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
125 µs124.2 µs
test_date_from_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
17.7 µs17.6 µs
test_definition_model_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
1.2 ms1.2 ms
test_core_json_fs
tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
0%
160.6 µs159.9 µs
test_date_from_datetime_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
18.5 µs18.5 µs
test_core_dict
tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
0%
76.6 µs76.3 µs
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
0%
26 µs25.9 µs
test_date_from_date
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
14.1 µs14 µs
test_many_models_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
3.2 ms3.2 ms
test_json_direct_list_str
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
158.2 µs157.9 µs
test_date_from_datetime
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
21.6 µs21.5 µs
test_json_any_list_str
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
226.2 µs226 µs
test_complete_core_serializer_to_json
tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
289.6 µs289.4 µs
test_nested_schema_using_defs
tests/benchmarks/test_nested_benchmark.py
CodSpeed Performance Gauge
0%
20.3 ms20.3 ms
test_arguments
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
26 µs26 µs
test_dict_of_ints_core_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1.3 ms1.3 ms

Commits

Click on a commit to change the comparison range
Base
main
4adf47f
-0.65%
Support leading unary plus for ints
38d850c
2 years ago
by cknv
-0.04%
Only allow single unary plus
34587a5
2 years ago
by cknv
+0.01%
Add test case for combined plus minus prefix
5a65ecc
2 years ago
by cknv
© 2026 CodSpeed Technology
Home Terms Privacy Docs