Avatar for the pydantic user
pydantic
pydantic-core
BlogDocsChangelog

Raise warnings when deprecated fields are filled at model instantiation

#1551
Comparing
changhc:8922-init-deprecated-field
(
a19365c
) with
main
(
5c96bec
)
CodSpeed Performance Gauge
0%
Untouched
155

Benchmarks

155 total
test_isinstance_string_strict_false
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+8%
16.3 µs15.2 µs
test_smart_union_coerce_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+6%
18.6 µs17.5 µs
test_core_string_lax_wrong
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
27.9 µs27.3 µs
test_core_raw
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
14.1 µs13.9 µs
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
18.2 µs18 µs
test_strict_int_fails
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
27.2 µs26.9 µs
test_uuid_from_uuid_pyd
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
14.7 µs14.6 µs
test_core_string_strict_wrong
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
27.5 µs27.2 µs
test_many_models_core_dict
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
968.8 µs958 µs
test_decimal_from_string_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+1%
23.2 µs23 µs
test_validate_literal[python-few_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.6 µs14.4 µs
test_validate_literal[python-many_small_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
14.6 µs14.5 µs
test_enum_int_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.4 µs15.3 µs
test_validate_literal[json-few_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.5 µs15.3 µs
test_date_from_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+1%
15.8 µs15.6 µs
test_int_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
40.7 µs40.3 µs
test_validate_literal[json-many_large_strings]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.2 µs16 µs
test_strict_union_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
16.5 µs16.4 µs
test_dont_raise_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
20.3 µs20.1 µs
test_raise_error_value_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
39 µs38.7 µs
test_chain_function
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
24.4 µs24.2 µs
test_to_json_list_of_lists
tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+1%
2.1 ms2 ms
test_core_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
32.5 µs32.3 µs
test_validate_literal[json-many_ints]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.5 µs15.4 µs
test_raise_error_custom
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
40.1 µs39.8 µs

Commits

Click on a commit to change the comparison range
Base
main
5c96bec
-43.01%
raise warnings when deprecated fields are filled
0c07f9a
1 year ago
by changhc
+43.18%
try moving import
4a8aa3e
1 year ago
by changhc
+0.13%
revise test
8e85a60
1 year ago
by changhc
-0.12%
use pyo3 error type
a19365c
1 year ago
by changhc
© 2026 CodSpeed Technology
Home Terms Privacy Docs