Releases: pydantic/pydantic-core
Releases · pydantic/pydantic-core
v2.20.0 2024-06-24
What's Changed
- Tidy up
tagged_union_schema
by @davidhewitt in #1333 - Improvements in
Union
matching logic during validation by @sydney-runkle in #1332 - Fix
Union
validation logic whenextra='allow'
by @sydney-runkle in #1334 - Add list
fail_fast
config option by @uriyyo in #1322 - Update to PyO3 0.22, add Python 3.13 support by @davidhewitt in #1340
New Contributors
Full Changelog: v2.19.0...v2.20.0
v2.19.0 2024-06-11
What's Changed
Packaging
Fixes
- Make
ValidatorFunctionWrapHandler
positional only by @Viicos in #1323 - Reuse
re.Pattern
object in regex patterns by @sydney-runkle in #1318
Features
- Add ser_json_inf_nan='strings' mode to produce valid JSON by @josh-newman in #1307
New Contributors
- @tiran made their first contribution in #1316
- @wxpppp made their first contribution in #1317
- @josh-newman made their first contribution in #1307
Full Changelog: v2.18.4...v2.19.0
v2.18.4 2024-06-03
What's Changed
Packaging
- Bump uuid from 1.7.0 to 1.8.0 by @dependabot in #1311
- Bump serde from 1.0.197 to 1.0.203 by @dependabot in #1310
- Bump the python-packages group with 6 updates by @dependabot in #1312
- Uprev
jiter
to v0.4.1 by @sydney-runkle in #1306
Fixes
- Fix
context
type hints by @OhioDschungel6 in #1303
New Contributors
- @OhioDschungel6 made their first contribution in #1303
Full Changelog: v2.18.3...v2.18.4
v2.18.3 2024-05-28
What's Changed
Packaging
- Bump
serde_json
from 1.0.114 to 1.0.116 by @dependabot in #1281 - Bump the python-packages group with 7 updates by @dependabot in #1280
- Bump
regex
from 1.10.3 to 1.10.4 by @dependabot in #1282 - Bump
pyo3
from 0.21.1 to 0.21.2 by @dependabot in #1283 - Bump
uraimo/run-on-arch-action
from 2.7.1 to 2.7.2 by @dependabot in #1284
Fixes
- CI: lint fixes for rust 1.78 by @davidhewitt in #1289
- Fix validation of
int
s with leading unary minus by @RajatRajdeep in #1291 - Defer to PyO3
i64
extraction to avoid implicit integer casts by @davidhewitt in #1288 - Fix: keyword only non default argument by @JeanArhancet in #1290
- Fix
str
subclass validation for enums by @sydney-runkle in #1273 - Support
BigInt
s inLiteral
s andEnum
s by @samuelcolvin in #1297 - Fix: uuid - allow
str
subclass as input by @davidhewitt in #1296 - Fix case of checking truthiness of
NotImplemented
by @davidhewitt in #1298 - Fix generate_self_schema for Python 3.12+ by @JelleZijlstra in #1299
New Contributors
- @RajatRajdeep made their first contribution in #1291
- @JelleZijlstra made their first contribution in #1299
Full Changelog: v2.18.2...v2.18.3
v2.18.2 2024-04-22
What's Changed
- Support multiple zeros as an
int
by @samuelcolvin in #1269 - Fix validation of
int
s with leading unary plus by @cknv in #1272 - Fix interaction between
extra != 'ignore'
andfrom_attributes=True
by @davidhewitt in #1275 - Handle error from
Enum
'smissing
function asValidationError
by @sydney-runkle in #1274 - Fix memory leak with
Iterable
validation by @davidhewitt in #1271
New Contributors
Full Changelog: v2.18.1...v2.18.2
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 option
inStringSchema
by @NeevCohen in #1262 - Trim leading zeros before parsing
str
->int
by @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_nan
inference by @sydney-runkle in #1251 - Adopt jiter
0.2.0
by @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
smallvec
from 1.11.2 to 1.13.1 by @dependabot in #1181 - Bump
regex
from 1.10.2 to 1.10.3 by @dependabot in #1180 - Bump
uuid
from 1.6.1 to 1.7.0 by @dependabot in #1179 - Bump
serde
from 1.0.195 to 1.0.196 by @dependabot in #1177 - Bump
serde_json
from 1.0.109 to 1.0.114 by @dependabot in #1211 - Bump
ahash
from 0.8.7 to 0.8.10 by @dependabot in #1210 - Bump
strum_macros
from 0.25.3 to 0.26.1 by @dependabot in #1208 - update to
PyO3
0.21 beta by @davidhewitt in #1222 - Update
pyodide
to 0.25.0 by @samdobson in #1199 - Really drop python<=3.7 support by @kloczek in #1232
- Uprev
speedate
by @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
TzInfo
equality 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
BigInt
fromstr
by @sydney-runkle in #1204 - Use new typing syntax for
_pydantic_core.pyi
by @Viicos in #1217 - separate
Input
trait'a
and'py
lifetimes by @davidhewitt in #1227 - Fix json serialization when
computed_field
is excluded by @sydney-runkle in #1228 - Implement
Input
forstr
by @davidhewitt in #1229 - Move list validation to produce an associated type by @davidhewitt in #1230
- Remove
with_new_extra
by @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
Input
trait to have singleas_python
cast 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
context
to serialization by @ornariece in #1215 - Add
serialize_as_any
runtime flag support by @sydney-runkle in #1194
Changes
- Trimming str before parsing to int and float by @hungtsetse in #1203
speedate
change: 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'
date
string coerced todatetime
shouldn'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
AsLocItem
trait by @samuelcolvin in #1169 - Fix: pattern serialization by @Smixi in #1168
- Fid
UUID
validation from string by @JeanArhancet in #1172 - Fix warning for
tuple
of wrong size inUnion
by @davidhewitt in #1174 - Fix model
computed_field
json serialization by @sydney-runkle in #1187
New Contributors
Full Changelog: v2.16.1...v2.16.2