Pydantic

Latest version: v2.7.1

Safety actively analyzes 622295 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 22

2.7.1

[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.1)

What's Changed

Packaging

* Bump `pydantic-core` to `v2.18.2` by sydney-runkle in [9307](https://github.com/pydantic/pydantic/pull/9307)

New Features

* Ftp and Websocket connection strings support by CherrySuryp in [9205](https://github.com/pydantic/pydantic/pull/9205)

Changes

* Use field description for RootModel schema description when there is `…` by LouisGobert in [9214](https://github.com/pydantic/pydantic/pull/9214)

Fixes

* Fix `validation_alias` behavior with `model_construct` for `AliasChoices` and `AliasPath` by sydney-runkle in [9223](https://github.com/pydantic/pydantic/pull/9223)
* Revert `typing.Literal` and import it outside the TYPE_CHECKING block by frost-nzcr4 in [9232](https://github.com/pydantic/pydantic/pull/9232)
* Fix `Secret` serialization schema, applicable for unions by sydney-runkle in [9240](https://github.com/pydantic/pydantic/pull/9240)
* Fix `strict` application to `function-after` with `use_enum_values` by sydney-runkle in [9279](https://github.com/pydantic/pydantic/pull/9279)
* Address case where `model_construct` on a class which defines `model_post_init` fails with `AttributeError` by babygrimes in [9168](https://github.com/pydantic/pydantic/pull/9168)
* Fix `model_json_schema` with config types by NeevCohen in [9287](https://github.com/pydantic/pydantic/pull/9287)
* Support multiple zeros as an `int` by samuelcolvin in [pydantic/pydantic-core1269](https://github.com/pydantic/pydantic-core/pull/1269)
* Fix validation of `int`s with leading unary plus by cknv in [pydantic/pydantic-core1272](https://github.com/pydantic/pydantic-core/pull/1272)
* Fix interaction between `extra != 'ignore'` and `from_attributes=True` by davidhewitt in [pydantic/pydantic-core1276](https://github.com/pydantic/pydantic-core/pull/1276)
* Handle error from `Enum`'s `missing` function as `ValidationError` by sydney-runkle in [pydantic/pydantic-core1274](https://github.com/pydantic/pydantic-core/pull/1754)
* Fix memory leak with `Iterable` validation by davidhewitt in [pydantic/pydantic-core1271](https://github.com/pydantic/pydantic-core/pull/1751)

New Contributors

* zzstoatzz made their first contribution in [9219](https://github.com/pydantic/pydantic/pull/9219)
* frost-nzcr4 made their first contribution in [9232](https://github.com/pydantic/pydantic/pull/9232)
* CherrySuryp made their first contribution in [9205](https://github.com/pydantic/pydantic/pull/9205)
* vagenas made their first contribution in [9268](https://github.com/pydantic/pydantic/pull/9268)
* ollz272 made their first contribution in [9262](https://github.com/pydantic/pydantic/pull/9262)
* babygrimes made their first contribution in [9168](https://github.com/pydantic/pydantic/pull/9168)
* swelborn made their first contribution in [9296](https://github.com/pydantic/pydantic/pull/9296)
* kf-novi made their first contribution in [9236](https://github.com/pydantic/pydantic/pull/9236)
* lgeiger made their first contribution in [9288](https://github.com/pydantic/pydantic/pull/9288)

2.7.0

[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.0)

The code released in v2.7.0 is practically identical to that of v2.7.0b1.

What's Changed

Packaging

* Reorganize `pyproject.toml` sections by Viicos in [8899](https://github.com/pydantic/pydantic/pull/8899)
* Bump `pydantic-core` to `v2.18.1` by sydney-runkle in [9211](https://github.com/pydantic/pydantic/pull/9211)
* Adopt `jiter` `v0.2.0` by samuelcolvin in [pydantic/pydantic-core1250](https://github.com/pydantic/pydantic-core/pull/1250)

New Features

* Extract attribute docstrings from `FieldInfo.description` by Viicos in [6563](https://github.com/pydantic/pydantic/pull/6563)
* Add a `with_config` decorator to comply with typing spec by Viicos in [8611](https://github.com/pydantic/pydantic/pull/8611)
* Allow an optional separator splitting the value and unit of the result of `ByteSize.human_readable` by jks15satoshi in [8706](https://github.com/pydantic/pydantic/pull/8706)
* Add generic `Secret` base type by conradogarciaberrotaran in [8519](https://github.com/pydantic/pydantic/pull/8519)
* Make use of `Sphinx` inventories for cross references in docs by Viicos in [8682](https://github.com/pydantic/pydantic/pull/8682)
* Add environment variable to disable plugins by geospackle in [8767](https://github.com/pydantic/pydantic/pull/8767)
* Add support for `deprecated` fields by Viicos in [8237](https://github.com/pydantic/pydantic/pull/8237)
* Allow `field_serializer('*')` by ornariece in [9001](https://github.com/pydantic/pydantic/pull/9001)
* Handle a case when `model_config` is defined as a model property by alexeyt101 in [9004](https://github.com/pydantic/pydantic/pull/9004)
* Update `create_model()` to support `typing.Annotated` as input by wannieman98 in [8947](https://github.com/pydantic/pydantic/pull/8947)
* Add `ClickhouseDsn` support by solidguy7 in [9062](https://github.com/pydantic/pydantic/pull/9062)
* Add support for `re.Pattern[str]` to `pattern` field by jag-k in [9053](https://github.com/pydantic/pydantic/pull/9053)
* Support for `serialize_as_any` runtime setting by sydney-runkle in [8830](https://github.com/pydantic/pydantic/pull/8830)
* Add support for `typing.Self` by Youssefares in [9023](https://github.com/pydantic/pydantic/pull/9023)
* Ability to pass `context` to serialization by ornariece in [8965](https://github.com/pydantic/pydantic/pull/8965)
* Add feedback widget to docs with flarelytics integration by sydney-runkle in [9129](https://github.com/pydantic/pydantic/pull/9129)
* Support for parsing partial JSON strings in Python by samuelcolvin in [pydantic/jiter66](https://github.com/pydantic/jiter/pull/66)

2.7.0b1

Pre-release, see [the GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.0b1) for details.

2.6.4

[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.4)

What's Changed

Fixes

* Fix usage of `AliasGenerator` with `computed_field` decorator by sydney-runkle in [8806](https://github.com/pydantic/pydantic/pull/8806)
* Fix nested discriminated union schema gen, pt 2 by sydney-runkle in [8932](https://github.com/pydantic/pydantic/pull/8932)
* Fix bug with no_strict_optional=True caused by API deferral by dmontagu in [8826](https://github.com/pydantic/pydantic/pull/8826)

2.6.3

[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.3)

What's Changed

Packaging

* Update `pydantic-settings` version in the docs by hramezani in [8906](https://github.com/pydantic/pydantic/pull/8906)

Fixes

* Fix discriminated union schema gen bug by sydney-runkle in [8904](https://github.com/pydantic/pydantic/pull/8904)

2.6.2

[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.2)

What's Changed

Packaging

* Upgrade to `pydantic-core` 2.16.3 by sydney-runkle in [8879](https://github.com/pydantic/pydantic/pull/8879)

Fixes

* 'YYYY-MM-DD' date string coerced to datetime shouldn't infer timezone by sydney-runkle in [pydantic/pydantic-core1193](https://github.com/pydantic/pydantic-core/pull/1193)

Page 1 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.