Releases: pydantic/pydantic-core
Releases · pydantic/pydantic-core
v2.18.1 2024-04-11
What's Changed
- allow serialization functions to upgrade warnings to exceptions by @Lance-Drane in #1258
- Fix: add
coerce_numbers_to_str optioninStringSchemaby @NeevCohen in #1262 - Trim leading zeros before parsing
str->intby @samuelcolvin in #1266 - Prevent trailing dots in integers by @samuelcolvin in #1267
New Contributors
- @Lance-Drane made their first contribution in #1258
Full Changelog: v2.18.0...v2.18.1
v2.18.0 2024-04-02
What's Changed
- update to PyO3 0.21 final by @davidhewitt in #1248
- Add coerce_numbers_to_str option in str_schema by @NeevCohen in #1249
- caching strings from JSON by @samuelcolvin in #1240
- Bump serde from 1.0.196 to 1.0.197 by @dependabot in #1255
- Bump smallvec from 1.13.1 to 1.13.2 by @dependabot in #1253
- Bump enum_dispatch from 0.3.12 to 0.3.13 by @dependabot in #1252
- fix build warnings on python <3.11 by @samuelcolvin in #1259
- Fixes for
ser_json_inf_naninference by @sydney-runkle in #1251 - Adopt jiter
0.2.0by @samuelcolvin in #1250
New Contributors
- @NeevCohen made their first contribution in #1249
Full Changelog: v2.17.0...v2.18.0
v2.17.0
What's Changed
Packaging
- Bump
smallvecfrom 1.11.2 to 1.13.1 by @dependabot in #1181 - Bump
regexfrom 1.10.2 to 1.10.3 by @dependabot in #1180 - Bump
uuidfrom 1.6.1 to 1.7.0 by @dependabot in #1179 - Bump
serdefrom 1.0.195 to 1.0.196 by @dependabot in #1177 - Bump
serde_jsonfrom 1.0.109 to 1.0.114 by @dependabot in #1211 - Bump
ahashfrom 0.8.7 to 0.8.10 by @dependabot in #1210 - Bump
strum_macrosfrom 0.25.3 to 0.26.1 by @dependabot in #1208 - update to
PyO30.21 beta by @davidhewitt in #1222 - Update
pyodideto 0.25.0 by @samdobson in #1199 - Really drop python<=3.7 support by @kloczek in #1232
- Uprev
speedateby @sydney-runkle in #1244
Fixes
- Add benchmarks for serializing model with complete schema by @alexmojaki in #1189
- Prevent panicking when
__dict__changes during iteration by @alexmojaki in #1196 - Fix
TzInfoequality check based on offset by @13sin in #1197 - Fix stack overflow due to recursion in some recursive serializer schemas. by @dmontagu in #1198
- Use PEP570 syntax by @Viicos in #1216
- Fix parsing
BigIntfromstrby @sydney-runkle in #1204 - Use new typing syntax for
_pydantic_core.pyiby @Viicos in #1217 - separate
Inputtrait'aand'pylifetimes by @davidhewitt in #1227 - Fix json serialization when
computed_fieldis excluded by @sydney-runkle in #1228 - Implement
Inputforstrby @davidhewitt in #1229 - Move list validation to produce an associated type by @davidhewitt in #1230
- Remove
with_new_extraby @davidhewitt in #1233 - Associated types for arguments in Input by @davidhewitt in #1234
- Associated types for dict in input by @davidhewitt in #1237
- Remaining associated types by @davidhewitt in #1238
- Refactor
Inputtrait to have singleas_pythoncast for python inputs by @davidhewitt in #1241 - Allow case where
__pydantic_extra__isNone, even ifextra='allow'by @sydney-runkle in #1236
Performance
- Rust enums validator by @samuelcolvin in #1235
- Support json cow of jiter 0.1.0 by @davidhewitt in #1231
New Features
- Add ability to pass
contextto serialization by @ornariece in #1215 - Add
serialize_as_anyruntime flag support by @sydney-runkle in #1194
Changes
- Trimming str before parsing to int and float by @hungtsetse in #1203
speedatechange: Serialize duration to hour minute second, instead of just seconds by @kakilangit in pydantic/speedate#50
New Contributors
- @alexmojaki made their first contribution in #1189
- @samdobson made their first contribution in #1199
- @13sin made their first contribution in #1197
- @hungtsetse made their first contribution in #1203
- @stonebig made their first contribution in #1214
- @ornariece made their first contribution in #1215
- @bmwiedemann made their first contribution in #1221
- @kloczek made their first contribution in #1232
Full Changelog: v2.16.3...v2.17.0
v2.16.3 2024-02-23
What's Changed
'YYYY-MM-DD'datestring coerced todatetimeshouldn't infer timezone by @sydney-runkle in #1193- CI: Updates for Rust 1.76 by @davidhewitt in #1191
Full Changelog: v2.16.2...v2.16.3
v2.16.2 2024-02-02
What's Changed
- Remove
AsLocItemtrait by @samuelcolvin in #1169 - Fix: pattern serialization by @Smixi in #1168
- Fid
UUIDvalidation from string by @JeanArhancet in #1172 - Fix warning for
tupleof wrong size inUnionby @davidhewitt in #1174 - Fix model
computed_fieldjson serialization by @sydney-runkle in #1187
New Contributors
Full Changelog: v2.16.1...v2.16.2
v2.16.1 2024-01-19
What's Changed
- Ensure recursion guard is always used as a stack by @davidhewitt in #1166
Full Changelog: v2.16.0...v2.16.1
v2.16.0 2024-01-17
What's Changed
- Group dependencies on dependabot updates by @Kludex in #1149
- simplify instantiation of undefined type by @samuelcolvin in #1157
- unify 'profile.profiling' configuration by @davidhewitt in #1158
- Bump the python-packages group with 4 updates by @dependabot in #1154
- Bump base64 from 0.21.5 to 0.21.7 by @dependabot in #1153
- Bump pyo3 from 0.20.1 to 0.20.2 by @dependabot in #1152
- Bump pyo3-build-config from 0.20.1 to 0.20.2 by @dependabot in #1151
- Bump serde from 1.0.193 to 1.0.195 by @dependabot in #1150
- correct build-profiling make command by @davidhewitt in #1160
- Int extraction by @samuelcolvin in #1155
- improve performance of recursion guard by @samuelcolvin in #1156
- dataclass serialization speedups by @samuelcolvin in #1162
- Add support for dataclass fields init by @dmontagu in #1163
- uprev to jiter v0.0.6, uprev pydantic-core by @samuelcolvin in #1165
Full Changelog: v2.15.0...v2.16.0
v2.15.0 2024-01-10
What's Changed
- Fix bug with
UUIDvalidation from json with a wrap validator by @davidhewitt in #1080 - move all
clippylints into[lints.clippy]table by @davidhewitt in #1083 - Remove lifetime from errors by @davidhewitt in #1084
- Fix typo in
is_instance_schemadocstring by @mariuswinger in #1087 - Don't build dummy objects when populating
ObTypeLookupby @davidhewitt in #1086 - Remove needless uses of
PyString::internby @davidhewitt in #1088 - Correct deprecation message for
general_after_validator_functionby @adamchainz in #1090 - support newest
jiterbehaviour by @samuelcolvin in #1092 - Fixing
exclude_nonefor json serialization ofcomputed_fields by @sydney-runkle in #1098 - Bump
pandastests to run on 3.12 by @davidhewitt in #1097 - Fix memory leak caused by not visiting the function in a
CallValidatorduring gc by @dmontagu in #1100 - Pass extra argument in arguments validator by @andresliszt in #1094
- Use input type json when validating a json schema by @dmontagu in #1117
- Implement pickling for
ValidationErrorby @davidhewitt in #1119 - Bump uuid from 1.5.0 to 1.6.1 by @dependabot in #1105
- Bump url from 2.4.1 to 2.5.0 by @dependabot in #1102
- Bump smallvec from 1.11.1 to 1.11.2 by @dependabot in #1103
- Bump serde from 1.0.190 to 1.0.193 by @dependabot in #1104
- Support
yyyy-MM-DDstring for datetimes by @sydney-runkle in #1124 - Support indirect definition references by @dmontagu in #1130
- drop Python 3.7, and PyPy 3.7 and 3.8 by @davidhewitt in #1129
- Bump ahash from 0.8.6 to 0.8.7 by @dependabot in #1135
- Bump pyo3 from 0.20.0 to 0.20.1 by @dependabot in #1136
- Bump serde_json from 1.0.108 to 1.0.109 by @dependabot in #1134
- Rework
PYDANTIC_ERRORS_OMIT_URLtoPYDANTIC_ERRORS_INCLUDE_URLby @akx in #1123 - Support serialization mode specification from model config and
SerializationConfigby @sydney-runkle in #1122 - Bump idna from 0.4.0 to 0.5.0 by @dependabot in #1101
- Add unified tuple validator that can handle "variadic" tuples via PEP-646 by @dmontagu in #865
- Use stricter serializer for unions of simple types by @alexdrydew in #1132
New Contributors
- @mariuswinger made their first contribution in #1087
- @adamchainz made their first contribution in #1090
- @andresliszt made their first contribution in #1094
- @akx made their first contribution in #1123
- @alexdrydew made their first contribution in #1132
Full Changelog: v2.14.6...v2.15.0
v2.14.6 2023-12-21
What's Changed
- fix memory leak with recursive definitions creating reference cycles by @davidhewitt in #1125
Full Changelog: v2.14.5...v2.14.6
v2.14.5
What's Changed
- Avoid using
?withget_itemto handle unhashable inputs properly by @sydney-runkle in #1089
Full Changelog: v2.14.4...v2.14.5