Pydantic

Latest version: v2.7.0

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

Scan your dependencies

Page 1 of 22

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)

2.6.1

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

What's Changed

Packaging

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

Fixes

* Fix bug with `mypy` plugin and `no_strict_optional = True` by dmontagu in [8666](https://github.com/pydantic/pydantic/pull/8666)
* Fix `ByteSize` error `type` change by sydney-runkle in [8681](https://github.com/pydantic/pydantic/pull/8681)
* Fix inheriting `Field` annotations in dataclasses by sydney-runkle in [8679](https://github.com/pydantic/pydantic/pull/8679)
* Fix regression in core schema generation for indirect definition references by dmontagu in [8702](https://github.com/pydantic/pydantic/pull/8702)
* Fix unsupported types bug with `PlainValidator` by sydney-runkle in [8710](https://github.com/pydantic/pydantic/pull/8710)
* Reverting problematic fix from 2.6 release, fixing schema building bug by sydney-runkle in [8718](https://github.com/pydantic/pydantic/pull/8718)
* Fix warning for tuple of wrong size in `Union` by davidhewitt in [pydantic/pydantic-core1174](https://github.com/pydantic/pydantic-core/pull/1174)
* Fix `computed_field` JSON serializer `exclude_none` behavior by sydney-runkle in [pydantic/pydantic-core1187](https://github.com/pydantic/pydantic-core/pull/1187)

Page 1 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.