Pydantic

Latest version: v2.7.1

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

Scan your dependencies

Page 13 of 22

1.2

Not secure
* **Possible Breaking Change:** Add support for required `Optional` with `name: Optional[AnyType] = Field(...)`
and refactor `ModelField` creation to preserve `required` parameter value, [1031](https://github.com/pydantic/pydantic/pull/1031) by tiangolo;
see [here](https://docs.pydantic.dev/usage/models/#required-optional-fields) for details
* Add benchmarks for `cattrs`, [513](https://github.com/pydantic/pydantic/pull/513) by sebastianmika
* Add `exclude_none` option to `dict()` and friends, [587](https://github.com/pydantic/pydantic/pull/587) by niknetniko
* Add benchmarks for `valideer`, [670](https://github.com/pydantic/pydantic/pull/670) by gsakkis
* Add `parse_obj_as` and `parse_file_as` functions for ad-hoc parsing of data into arbitrary pydantic-compatible types, [934](https://github.com/pydantic/pydantic/pull/934) by dmontagu
* Add `allow_reuse` argument to validators, thus allowing validator reuse, [940](https://github.com/pydantic/pydantic/pull/940) by dmontagu
* Add support for mapping types for custom root models, [958](https://github.com/pydantic/pydantic/pull/958) by dmontagu
* Mypy plugin support for dataclasses, [966](https://github.com/pydantic/pydantic/pull/966) by koxudaxi
* Add support for dataclasses default factory, [968](https://github.com/pydantic/pydantic/pull/968) by ahirner
* Add a `ByteSize` type for converting byte string (`1GB`) to plain bytes, [977](https://github.com/pydantic/pydantic/pull/977) by dgasmith
* Fix mypy complaint about `root_validator(pre=True)`, [984](https://github.com/pydantic/pydantic/pull/984) by samuelcolvin
* Add manylinux binaries for Python 3.8 to pypi, also support manylinux2010, [994](https://github.com/pydantic/pydantic/pull/994) by samuelcolvin
* Adds ByteSize conversion to another unit, [995](https://github.com/pydantic/pydantic/pull/995) by dgasmith
* Fix `__str__` and `__repr__` inheritance for models, [1022](https://github.com/pydantic/pydantic/pull/1022) by samuelcolvin
* add testimonials section to docs, [1025](https://github.com/pydantic/pydantic/pull/1025) by sullivancolin
* Add support for `typing.Literal` for Python 3.8, [1026](https://github.com/pydantic/pydantic/pull/1026) by dmontagu

1.1.1

Not secure
* Fix bug where use of complex fields on sub-models could cause fields to be incorrectly configured, [1015](https://github.com/pydantic/pydantic/pull/1015) by samuelcolvin

1.1

Not secure
* Add a mypy plugin for type checking `BaseModel.__init__` and more, [722](https://github.com/pydantic/pydantic/pull/722) by dmontagu
* Change return type typehint for `GenericModel.__class_getitem__` to prevent PyCharm warnings, [936](https://github.com/pydantic/pydantic/pull/936) by dmontagu
* Fix usage of `Any` to allow `None`, also support `TypeVar` thus allowing use of un-parameterised collection types
e.g. `Dict` and `List`, [962](https://github.com/pydantic/pydantic/pull/962) by samuelcolvin
* Set `FieldInfo` on subfields to fix schema generation for complex nested types, [965](https://github.com/pydantic/pydantic/pull/965) by samuelcolvin

1.0

Not secure
* **Breaking Change:** deprecate the `Model.fields` property, use `Model.__fields__` instead, [883](https://github.com/pydantic/pydantic/pull/883) by samuelcolvin
* **Breaking Change:** Change the precedence of aliases so child model aliases override parent aliases,
including using `alias_generator`, [904](https://github.com/pydantic/pydantic/pull/904) by samuelcolvin
* **Breaking change:** Rename `skip_defaults` to `exclude_unset`, and add ability to exclude actual defaults, [915](https://github.com/pydantic/pydantic/pull/915) by dmontagu
* Add `**kwargs` to `pydantic.main.ModelMetaclass.__new__` so `__init_subclass__` can take custom parameters on extended
`BaseModel` classes, [867](https://github.com/pydantic/pydantic/pull/867) by retnikt
* Fix field of a type that has a default value, [880](https://github.com/pydantic/pydantic/pull/880) by koxudaxi
* Use `FutureWarning` instead of `DeprecationWarning` when `alias` instead of `env` is used for settings models, [881](https://github.com/pydantic/pydantic/pull/881) by samuelcolvin
* Fix issue with `BaseSettings` inheritance and `alias` getting set to `None`, [882](https://github.com/pydantic/pydantic/pull/882) by samuelcolvin
* Modify `__repr__` and `__str__` methods to be consistent across all public classes, add `__pretty__` to support
python-devtools, [884](https://github.com/pydantic/pydantic/pull/884) by samuelcolvin
* deprecation warning for `case_insensitive` on `BaseSettings` config, [885](https://github.com/pydantic/pydantic/pull/885) by samuelcolvin
* For `BaseSettings` merge environment variables and in-code values recursively, as long as they create a valid object
when merged together, to allow splitting init arguments, [888](https://github.com/pydantic/pydantic/pull/888) by idmitrievsky
* change secret types example, [890](https://github.com/pydantic/pydantic/pull/890) by ashears
* Change the signature of `Model.construct()` to be more user-friendly, document `construct()` usage, [898](https://github.com/pydantic/pydantic/pull/898) by samuelcolvin
* Add example for the `construct()` method, [907](https://github.com/pydantic/pydantic/pull/907) by ashears
* Improve use of `Field` constraints on complex types, raise an error if constraints are not enforceable,
also support tuples with an ellipsis `Tuple[X, ...]`, `Sequence` and `FrozenSet` in schema, [909](https://github.com/pydantic/pydantic/pull/909) by samuelcolvin
* update docs for bool missing valid value, [911](https://github.com/pydantic/pydantic/pull/911) by trim21
* Better `str`/`repr` logic for `ModelField`, [912](https://github.com/pydantic/pydantic/pull/912) by samuelcolvin
* Fix `ConstrainedList`, update schema generation to reflect `min_items` and `max_items` `Field()` arguments, [917](https://github.com/pydantic/pydantic/pull/917) by samuelcolvin
* Allow abstracts sets (eg. dict keys) in the `include` and `exclude` arguments of `dict()`, [921](https://github.com/pydantic/pydantic/pull/921) by samuelcolvin
* Fix JSON serialization errors on `ValidationError.json()` by using `pydantic_encoder`, [922](https://github.com/pydantic/pydantic/pull/922) by samuelcolvin
* Clarify usage of `remove_untouched`, improve error message for types with no validators, [926](https://github.com/pydantic/pydantic/pull/926) by retnikt

1.0b2

Not secure
* Mark `StrictBool` typecheck as `bool` to allow for default values without mypy errors, [690](https://github.com/pydantic/pydantic/pull/690) by dmontagu
* Transfer the documentation build from sphinx to mkdocs, re-write much of the documentation, [856](https://github.com/pydantic/pydantic/pull/856) by samuelcolvin
* Add support for custom naming schemes for `GenericModel` subclasses, [859](https://github.com/pydantic/pydantic/pull/859) by dmontagu
* Add `if TYPE_CHECKING:` to the excluded lines for test coverage, [874](https://github.com/pydantic/pydantic/pull/874) by dmontagu
* Rename `allow_population_by_alias` to `allow_population_by_field_name`, remove unnecessary warning about it, [875](https://github.com/pydantic/pydantic/pull/875) by samuelcolvin

1.0b1

Not secure
* **Breaking Change:** rename `Schema` to `Field`, make it a function to placate mypy, [577](https://github.com/pydantic/pydantic/pull/577) by samuelcolvin
* **Breaking Change:** modify parsing behavior for `bool`, [617](https://github.com/pydantic/pydantic/pull/617) by dmontagu
* **Breaking Change:** `get_validators` is no longer recognised, use `__get_validators__`.
`Config.ignore_extra` and `Config.allow_extra` are no longer recognised, use `Config.extra`, [720](https://github.com/pydantic/pydantic/pull/720) by samuelcolvin
* **Breaking Change:** modify default config settings for `BaseSettings`; `case_insensitive` renamed to `case_sensitive`,
default changed to `case_sensitive = False`, `env_prefix` default changed to `''` - e.g. no prefix, [721](https://github.com/pydantic/pydantic/pull/721) by dmontagu
* **Breaking change:** Implement `root_validator` and rename root errors from `__obj__` to `__root__`, [729](https://github.com/pydantic/pydantic/pull/729) by samuelcolvin
* **Breaking Change:** alter the behaviour of `dict(model)` so that sub-models are nolonger
converted to dictionaries, [733](https://github.com/pydantic/pydantic/pull/733) by samuelcolvin
* **Breaking change:** Added `initvars` support to `post_init_post_parse`, [748](https://github.com/pydantic/pydantic/pull/748) by Raphael-C-Almeida
* **Breaking Change:** Make `BaseModel.json()` only serialize the `__root__` key for models with custom root, [752](https://github.com/pydantic/pydantic/pull/752) by dmontagu
* **Breaking Change:** complete rewrite of `URL` parsing logic, [755](https://github.com/pydantic/pydantic/pull/755) by samuelcolvin
* **Breaking Change:** preserve superclass annotations for field-determination when not provided in subclass, [757](https://github.com/pydantic/pydantic/pull/757) by dmontagu
* **Breaking Change:** `BaseSettings` now uses the special `env` settings to define which environment variables to
read, not aliases, [847](https://github.com/pydantic/pydantic/pull/847) by samuelcolvin
* add support for `assert` statements inside validators, [653](https://github.com/pydantic/pydantic/pull/653) by abdusco
* Update documentation to specify the use of `pydantic.dataclasses.dataclass` and subclassing `pydantic.BaseModel`, [710](https://github.com/pydantic/pydantic/pull/710) by maddosaurus
* Allow custom JSON decoding and encoding via `json_loads` and `json_dumps` `Config` properties, [714](https://github.com/pydantic/pydantic/pull/714) by samuelcolvin
* make all annotated fields occur in the order declared, [715](https://github.com/pydantic/pydantic/pull/715) by dmontagu
* use pytest to test `mypy` integration, [735](https://github.com/pydantic/pydantic/pull/735) by dmontagu
* add `__repr__` method to `ErrorWrapper`, [738](https://github.com/pydantic/pydantic/pull/738) by samuelcolvin
* Added support for `FrozenSet` members in dataclasses, and a better error when attempting to use types from the `typing` module that are not supported by Pydantic, [745](https://github.com/pydantic/pydantic/pull/745) by djpetti
* add documentation for Pycharm Plugin, [750](https://github.com/pydantic/pydantic/pull/750) by koxudaxi
* fix broken examples in the docs, [753](https://github.com/pydantic/pydantic/pull/753) by dmontagu
* moving typing related objects into `pydantic.typing`, [761](https://github.com/pydantic/pydantic/pull/761) by samuelcolvin
* Minor performance improvements to `ErrorWrapper`, `ValidationError` and datetime parsing, [763](https://github.com/pydantic/pydantic/pull/763) by samuelcolvin
* Improvements to `datetime`/`date`/`time`/`timedelta` types: more descriptive errors,
change errors to `value_error` not `type_error`, support bytes, [766](https://github.com/pydantic/pydantic/pull/766) by samuelcolvin
* fix error messages for `Literal` types with multiple allowed values, [770](https://github.com/pydantic/pydantic/pull/770) by dmontagu
* Improved auto-generated `title` field in JSON schema by converting underscore to space, [772](https://github.com/pydantic/pydantic/pull/772) by skewty
* support `mypy --no-implicit-reexport` for dataclasses, also respect `--no-implicit-reexport` in pydantic itself, [783](https://github.com/pydantic/pydantic/pull/783) by samuelcolvin
* add the `PaymentCardNumber` type, [790](https://github.com/pydantic/pydantic/pull/790) by matin
* Fix const validations for lists, [794](https://github.com/pydantic/pydantic/pull/794) by hmvp
* Set `additionalProperties` to false in schema for models with extra fields disallowed, [796](https://github.com/pydantic/pydantic/pull/796) by Code0x58
* `EmailStr` validation method now returns local part case-sensitive per RFC 5321, [798](https://github.com/pydantic/pydantic/pull/798) by henriklindgren
* Added ability to validate strictness to `ConstrainedFloat`, `ConstrainedInt` and `ConstrainedStr` and added
`StrictFloat` and `StrictInt` classes, [799](https://github.com/pydantic/pydantic/pull/799) by DerRidda
* Improve handling of `None` and `Optional`, replace `whole` with `each_item` (inverse meaning, default `False`)
on validators, [803](https://github.com/pydantic/pydantic/pull/803) by samuelcolvin
* add support for `Type[T]` type hints, [807](https://github.com/pydantic/pydantic/pull/807) by timonbimon
* Performance improvements from removing `change_exceptions`, change how pydantic error are constructed, [819](https://github.com/pydantic/pydantic/pull/819) by samuelcolvin
* Fix the error message arising when a `BaseModel`-type model field causes a `ValidationError` during parsing, [820](https://github.com/pydantic/pydantic/pull/820) by dmontagu
* allow `getter_dict` on `Config`, modify `GetterDict` to be more like a `Mapping` object and thus easier to work with, [821](https://github.com/pydantic/pydantic/pull/821) by samuelcolvin
* Only check `TypeVar` param on base `GenericModel` class, [842](https://github.com/pydantic/pydantic/pull/842) by zpencerq
* rename `Model._schema_cache` -> `Model.__schema_cache__`, `Model._json_encoder` -> `Model.__json_encoder__`,
`Model._custom_root_type` -> `Model.__custom_root_type__`, [851](https://github.com/pydantic/pydantic/pull/851) by samuelcolvin

Page 13 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.