Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Implement val_temporal_unit for deciding how datetimes and dates timestamps get validated.

#1751Merged
Comparing
ollz272:val_temporal_unit_2
(
17f54c8
) with
main
(
4c4ac6e
)
CodSpeed Performance Gauge
0%
Untouched
159

Benchmarks

159 total
test_validate_literal[python-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.4 µs15 µs
test_isinstance_string_lax_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.8 µs15.5 µs
test_dataclass_to_json
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+2%
40.6 µs39.7 µs
test_arguments
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
25.3 µs24.8 µs
test_isinstance_string_lax_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
14.1 µs13.8 µs
test_isinstance_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
18.6 µs18.3 µs
test_isinstance_string_strict_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
15.5 µs15.2 µs
test_variable_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
18.6 µs18.3 µs
test_core_string_strict_wrong_str_e
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
40.8 µs40.2 µs
test_validate_literal[json-few_mixed]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
18.9 µs18.6 µs
test_isinstance_string_strict_true
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.1 µs13.9 µs
test_validate_literal[json-few_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.6 µs16.4 µs
test_core_future_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
16.4 µs16.2 µs
test_date_from_date
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
14.4 µs14.2 µs
test_core_json_fs
tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
+1%
175.3 µs173.2 µs
test_model_core_json
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
30.8 µs30.5 µs
test_validate_literal[json-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.9 µs15.8 µs
test_validate_literal[json-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.4 µs16.2 µs
test_tagged_union_int_keys_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
24.7 µs24.5 µs
test_core_string_strict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14 µs13.8 µs
test_decimal_from_string_limit
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+1%
19 µs18.8 µs
test_int_range_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.9 µs15.8 µs
test_list_of_strs_json_uncached
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
405.1 µs401.6 µs
test_validate_literal[json-few_str_enum]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
20.5 µs20.3 µs
test_core_string_lax
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
13.9 µs13.8 µs

Commits

Click on a commit to change the comparison range
Base
main
4c4ac6e
-0.2%
feat: fin
ef3814f
8 months ago
by ollz272
+0.06%
fix: lint
7df52a1
8 months ago
by ollz272
-0.02%
fix: add some tests with the same timestamps but with seconds, milliseconds and infer to show behaviour
11ed996
8 months ago
by ollz272
-0.13%
fix: format
7721a53
8 months ago
by ollz272
+0.36%
Merge branch 'main' into val_temporal_unit_2
e476efb
8 months ago
by ollz272
-0.32%
fix: fix issue with fractional part of mstimestamps
67fcdc3
8 months ago
by ollz272
0%
style: lint
e984613
8 months ago
by ollz272
+0.46%
feat: bump speedate, update float_as_datetime to use from_float_with_config
71b2ea6
7 months ago
by ollz272
+0.04%
Merge branch 'main' into val_temporal_unit_2
17f54c8
7 months ago
by ollz272
© 2026 CodSpeed Technology
Home Terms Privacy Docs