Pydantic

Latest version: v2.7.1

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

Scan your dependencies

Page 10 of 22

1.9.0

Not secure
* Apply `update_forward_refs` to `Config.json_encodes` prevent name clashes in types defined via strings, [3583](https://github.com/pydantic/pydantic/pull/3583) by samuelcolvin
* Extend pydantic's mypy plugin to support mypy versions `0.910`, `0.920`, `0.921` & `0.930`, [3573](https://github.com/pydantic/pydantic/pull/3573) & [#3594](https://github.com/pydantic/pydantic/pull/3594) by PrettyWood, christianbundy, samuelcolvin

1.9.0a2

Not secure
* support generic models with discriminated union, [3551](https://github.com/pydantic/pydantic/pull/3551) by PrettyWood
* keep old behaviour of `json()` by default, [3542](https://github.com/pydantic/pydantic/pull/3542) by PrettyWood
* Removed typing-only `__root__` attribute from `BaseModel`, [3540](https://github.com/pydantic/pydantic/pull/3540) by layday
* Build Python 3.10 wheels, [3539](https://github.com/pydantic/pydantic/pull/3539) by mbachry
* Fix display of `extra` fields with model `__repr__`, [3234](https://github.com/pydantic/pydantic/pull/3234) by cocolman
* models copied via `Config.copy_on_model_validation` always have all fields, [3201](https://github.com/pydantic/pydantic/pull/3201) by PrettyWood
* nested ORM from nested dictionaries, [3182](https://github.com/pydantic/pydantic/pull/3182) by PrettyWood
* fix link to discriminated union section by PrettyWood

1.9.0a1

Not secure
* Add support for `Decimal`-specific validation configurations in `Field()`, additionally to using `condecimal()`,
to allow better support from editors and tooling, [3507](https://github.com/pydantic/pydantic/pull/3507) by tiangolo
* Add `arm64` binaries suitable for MacOS with an M1 CPU to PyPI, [3498](https://github.com/pydantic/pydantic/pull/3498) by samuelcolvin
* Fix issue where `None` was considered invalid when using a `Union` type containing `Any` or `object`, [3444](https://github.com/pydantic/pydantic/pull/3444) by tharradine
* When generating field schema, pass optional `field` argument (of type
`pydantic.fields.ModelField`) to `__modify_schema__()` if present, [3434](https://github.com/pydantic/pydantic/pull/3434) by jasujm
* Fix issue when pydantic fail to parse `typing.ClassVar` string type annotation, [3401](https://github.com/pydantic/pydantic/pull/3401) by uriyyo
* Mention Python >= 3.9.2 as an alternative to `typing_extensions.TypedDict`, [3374](https://github.com/pydantic/pydantic/pull/3374) by BvB93
* Changed the validator method name in the [Custom Errors example](https://docs.pydantic.dev/usage/models/#custom-errors)
to more accurately describe what the validator is doing; changed from `name_must_contain_space` to ` value_must_equal_bar`, [3327](https://github.com/pydantic/pydantic/pull/3327) by michaelrios28
* Add `AmqpDsn` class, [3254](https://github.com/pydantic/pydantic/pull/3254) by kludex
* Always use `Enum` value as default in generated JSON schema, [3190](https://github.com/pydantic/pydantic/pull/3190) by joaommartins
* Add support for Mypy 0.920, [3175](https://github.com/pydantic/pydantic/pull/3175) by christianbundy
* `validate_arguments` now supports `extra` customization (used to always be `Extra.forbid`), [3161](https://github.com/pydantic/pydantic/pull/3161) by PrettyWood
* Complex types can be set by nested environment variables, [3159](https://github.com/pydantic/pydantic/pull/3159) by Air-Mark
* Fix mypy plugin to collect fields based on `pydantic.utils.is_valid_field` so that it ignores untyped private variables, [3146](https://github.com/pydantic/pydantic/pull/3146) by hi-ogawa
* fix `validate_arguments` issue with `Config.validate_all`, [3135](https://github.com/pydantic/pydantic/pull/3135) by PrettyWood
* avoid dict coercion when using dict subclasses as field type, [3122](https://github.com/pydantic/pydantic/pull/3122) by PrettyWood
* add support for `object` type, [3062](https://github.com/pydantic/pydantic/pull/3062) by PrettyWood
* Updates pydantic dataclasses to keep `_special` properties on parent classes, [3043](https://github.com/pydantic/pydantic/pull/3043) by zulrang
* Add a `TypedDict` class for error objects, [3038](https://github.com/pydantic/pydantic/pull/3038) by matthewhughes934
* Fix support for using a subclass of an annotation as a default, [3018](https://github.com/pydantic/pydantic/pull/3018) by JacobHayes
* make `create_model_from_typeddict` mypy compliant, [3008](https://github.com/pydantic/pydantic/pull/3008) by PrettyWood
* Make multiple inheritance work when using `PrivateAttr`, [2989](https://github.com/pydantic/pydantic/pull/2989) by hmvp
* Parse environment variables as JSON, if they have a `Union` type with a complex subfield, [2936](https://github.com/pydantic/pydantic/pull/2936) by cbartz
* Prevent `StrictStr` permitting `Enum` values where the enum inherits from `str`, [2929](https://github.com/pydantic/pydantic/pull/2929) by samuelcolvin
* Make `SecretsSettingsSource` parse values being assigned to fields of complex types when sourced from a secrets file,
just as when sourced from environment variables, [2917](https://github.com/pydantic/pydantic/pull/2917) by davidmreed
* add a dark mode to _pydantic_ documentation, [2913](https://github.com/pydantic/pydantic/pull/2913) by gbdlin
* Make `pydantic-mypy` plugin compatible with `pyproject.toml` configuration, consistent with `mypy` changes.
See the [doc](https://docs.pydantic.dev/mypy_plugin/#configuring-the-plugin) for more information, [2908](https://github.com/pydantic/pydantic/pull/2908) by jrwalk
* add Python 3.10 support, [2885](https://github.com/pydantic/pydantic/pull/2885) by PrettyWood
* Correctly parse generic models with `Json[T]`, [2860](https://github.com/pydantic/pydantic/pull/2860) by geekingfrog
* Update contrib docs re: Python version to use for building docs, [2856](https://github.com/pydantic/pydantic/pull/2856) by paxcodes
* Clarify documentation about _pydantic_'s support for custom validation and strict type checking,
despite _pydantic_ being primarily a parsing library, [2855](https://github.com/pydantic/pydantic/pull/2855) by paxcodes
* Fix schema generation for `Deque` fields, [2810](https://github.com/pydantic/pydantic/pull/2810) by sergejkozin
* fix an edge case when mixing constraints and `Literal`, [2794](https://github.com/pydantic/pydantic/pull/2794) by PrettyWood
* Fix postponed annotation resolution for `NamedTuple` and `TypedDict` when they're used directly as the type of fields
within Pydantic models, [2760](https://github.com/pydantic/pydantic/pull/2760) by jameysharp
* Fix bug when `mypy` plugin fails on `construct` method call for `BaseSettings` derived classes, [2753](https://github.com/pydantic/pydantic/pull/2753) by uriyyo
* Add function overloading for a `pydantic.create_model` function, [2748](https://github.com/pydantic/pydantic/pull/2748) by uriyyo
* Fix mypy plugin issue with self field declaration, [2743](https://github.com/pydantic/pydantic/pull/2743) by uriyyo
* The colon at the end of the line "The fields which were supplied when user was initialised:" suggests that the code following it is related.
Changed it to a period, [2733](https://github.com/pydantic/pydantic/pull/2733) by krisaoe
* Renamed variable `schema` to `schema_` to avoid shadowing of global variable name, [2724](https://github.com/pydantic/pydantic/pull/2724) by shahriyarr
* Add support for autocomplete in VS Code via `__dataclass_transform__`, [2721](https://github.com/pydantic/pydantic/pull/2721) by tiangolo
* add missing type annotations in `BaseConfig` and handle `max_length = 0`, [2719](https://github.com/pydantic/pydantic/pull/2719) by PrettyWood
* Change `orm_mode` checking to allow recursive ORM mode parsing with dicts, [2718](https://github.com/pydantic/pydantic/pull/2718) by nuno-andre
* Add episode 313 of the *Talk Python To Me* podcast, where Michael Kennedy and Samuel Colvin discuss Pydantic, to the docs, [2712](https://github.com/pydantic/pydantic/pull/2712) by RatulMaharaj
* fix JSON schema generation when a field is of type `NamedTuple` and has a default value, [2707](https://github.com/pydantic/pydantic/pull/2707) by PrettyWood
* `Enum` fields now properly support extra kwargs in schema generation, [2697](https://github.com/pydantic/pydantic/pull/2697) by sammchardy
* **Breaking Change, see [3780](https://github.com/pydantic/pydantic/pull/3780)**: Make serialization of referenced pydantic models possible, [#2650](https://github.com/pydantic/pydantic/pull/2650) by PrettyWood
* Add `uniqueItems` option to `ConstrainedList`, [2618](https://github.com/pydantic/pydantic/pull/2618) by nuno-andre
* Try to evaluate forward refs automatically at model creation, [2588](https://github.com/pydantic/pydantic/pull/2588) by uriyyo
* Switch docs preview and coverage display to use [smokeshow](https://smokeshow.helpmanual.io/), [#2580](https://github.com/pydantic/pydantic/pull/2580) by samuelcolvin
* Add `__version__` attribute to pydantic module, [2572](https://github.com/pydantic/pydantic/pull/2572) by paxcodes
* Add `postgresql+asyncpg`, `postgresql+pg8000`, `postgresql+psycopg2`, `postgresql+psycopg2cffi`, `postgresql+py-postgresql`
and `postgresql+pygresql` schemes for `PostgresDsn`, [2567](https://github.com/pydantic/pydantic/pull/2567) by postgres-asyncpg
* Enable the Hypothesis plugin to generate a constrained decimal when the `decimal_places` argument is specified, [2524](https://github.com/pydantic/pydantic/pull/2524) by cwe5590
* Allow `collections.abc.Callable` to be used as type in Python 3.9, [2519](https://github.com/pydantic/pydantic/pull/2519) by daviskirk
* Documentation update how to custom compile pydantic when using pip install, small change in `setup.py`
to allow for custom CFLAGS when compiling, [2517](https://github.com/pydantic/pydantic/pull/2517) by peterroelants
* remove side effect of `default_factory` to run it only once even if `Config.validate_all` is set, [2515](https://github.com/pydantic/pydantic/pull/2515) by PrettyWood
* Add lookahead to ip regexes for `AnyUrl` hosts. This allows urls with DNS labels
looking like IPs to validate as they are perfectly valid host names, [2512](https://github.com/pydantic/pydantic/pull/2512) by sbv-csis
* Set `minItems` and `maxItems` in generated JSON schema for fixed-length tuples, [2497](https://github.com/pydantic/pydantic/pull/2497) by PrettyWood
* Add `strict` argument to `conbytes`, [2489](https://github.com/pydantic/pydantic/pull/2489) by koxudaxi
* Support user defined generic field types in generic models, [2465](https://github.com/pydantic/pydantic/pull/2465) by daviskirk
* Add an example and a short explanation of subclassing `GetterDict` to docs, [2463](https://github.com/pydantic/pydantic/pull/2463) by nuno-andre
* add `KafkaDsn` type, `HttpUrl` now has default port 80 for http and 443 for https, [2447](https://github.com/pydantic/pydantic/pull/2447) by MihanixA
* Add `PastDate` and `FutureDate` types, [2425](https://github.com/pydantic/pydantic/pull/2425) by Kludex
* Support generating schema for `Generic` fields with subtypes, [2375](https://github.com/pydantic/pydantic/pull/2375) by maximberg
* fix(encoder): serialize `NameEmail` to str, [2341](https://github.com/pydantic/pydantic/pull/2341) by alecgerona
* add `Config.smart_union` to prevent coercion in `Union` if possible, see
[the doc](https://docs.pydantic.dev/usage/model_config/#smart-union) for more information, [2092](https://github.com/pydantic/pydantic/pull/2092) by PrettyWood
* Add ability to use `typing.Counter` as a model field type, [2060](https://github.com/pydantic/pydantic/pull/2060) by uriyyo
* Add parameterised subclasses to `__bases__` when constructing new parameterised classes, so that `A <: B => A[int] <: B[int]`, [2007](https://github.com/pydantic/pydantic/pull/2007) by diabolo-dan
* Create `FileUrl` type that allows URLs that conform to [RFC 8089](https://tools.ietf.org/html/rfc8089#section-2).
Add `host_required` parameter, which is `True` by default (`AnyUrl` and subclasses), `False` in `RedisDsn`, `FileUrl`, [1983](https://github.com/pydantic/pydantic/pull/1983) by vgerak
* add `confrozenset()`, analogous to `conset()` and `conlist()`, [1897](https://github.com/pydantic/pydantic/pull/1897) by PrettyWood
* stop calling parent class `root_validator` if overridden, [1895](https://github.com/pydantic/pydantic/pull/1895) by PrettyWood
* Add `repr` (defaults to `True`) parameter to `Field`, to hide it from the default representation of the `BaseModel`, [1831](https://github.com/pydantic/pydantic/pull/1831) by fnep
* Accept empty query/fragment URL parts, [1807](https://github.com/pydantic/pydantic/pull/1807) by xavier

1.8.2

Not secure
!!! warning
A security vulnerability, level "moderate" is fixed in v1.8.2. Please upgrade **ASAP**.
See security advisory [CVE-2021-29510](https://github.com/pydantic/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh)

* **Security fix:** Fix `date` and `datetime` parsing so passing either `'infinity'` or `float('inf')`
(or their negative values) does not cause an infinite loop,
see security advisory [CVE-2021-29510](https://github.com/pydantic/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh)
* fix schema generation with Enum by generating a valid name, [2575](https://github.com/pydantic/pydantic/pull/2575) by PrettyWood
* fix JSON schema generation with a `Literal` of an enum member, [2536](https://github.com/pydantic/pydantic/pull/2536) by PrettyWood
* Fix bug with configurations declarations that are passed as
keyword arguments during class creation, [2532](https://github.com/pydantic/pydantic/pull/2532) by uriyyo
* Allow passing `json_encoders` in class kwargs, [2521](https://github.com/pydantic/pydantic/pull/2521) by layday
* support arbitrary types with custom `__eq__`, [2483](https://github.com/pydantic/pydantic/pull/2483) by PrettyWood
* support `Annotated` in `validate_arguments` and in generic models with Python 3.9, [2483](https://github.com/pydantic/pydantic/pull/2483) by PrettyWood

1.8.1

Not secure
Bug fixes for regressions and new features from `v1.8`

* allow elements of `Config.field` to update elements of a `Field`, [2461](https://github.com/pydantic/pydantic/pull/2461) by samuelcolvin
* fix validation with a `BaseModel` field and a custom root type, [2449](https://github.com/pydantic/pydantic/pull/2449) by PrettyWood
* expose `Pattern` encoder to `fastapi`, [2444](https://github.com/pydantic/pydantic/pull/2444) by PrettyWood
* enable the Hypothesis plugin to generate a constrained float when the `multiple_of` argument is specified, [2442](https://github.com/pydantic/pydantic/pull/2442) by tobi-lipede-oodle
* Avoid `RecursionError` when using some types like `Enum` or `Literal` with generic models, [2436](https://github.com/pydantic/pydantic/pull/2436) by PrettyWood
* do not overwrite declared `__hash__` in subclasses of a model, [2422](https://github.com/pydantic/pydantic/pull/2422) by PrettyWood
* fix `mypy` complaints on `Path` and `UUID` related custom types, [2418](https://github.com/pydantic/pydantic/pull/2418) by PrettyWood
* Support properly variable length tuples of compound types, [2416](https://github.com/pydantic/pydantic/pull/2416) by PrettyWood

1.8

Not secure
Thank you to pydantic's sponsors:
jorgecarleitao, BCarley, chdsbd, tiangolo, matin, linusg, kevinalh, koxudaxi, timdrijvers, mkeen, meadsteve,
ginomempin, primer-io, and-semakin, tomthorogood, AjitZK, westonsteimel, Mazyod, christippett, CarlosDomingues,
Kludex, r-m-n
for their kind support.

Highlights

* [Hypothesis plugin](https://docs.pydantic.dev/hypothesis_plugin/) for testing, [#2097](https://github.com/pydantic/pydantic/pull/2097) by Zac-HD
* support for [`NamedTuple` and `TypedDict`](https://docs.pydantic.dev/usage/types/#annotated-types), [2216](https://github.com/pydantic/pydantic/pull/2216) by PrettyWood
* Support [`Annotated` hints on model fields](https://docs.pydantic.dev/usage/schema/#typingannotated-fields), [2147](https://github.com/pydantic/pydantic/pull/2147) by JacobHayes
* [`frozen` parameter on `Config`](https://docs.pydantic.dev/usage/model_config/) to allow models to be hashed, [#1880](https://github.com/pydantic/pydantic/pull/1880) by rhuille

Changes

* **Breaking Change**, remove old deprecation aliases from v1, [2415](https://github.com/pydantic/pydantic/pull/2415) by samuelcolvin:
* remove notes on migrating to v1 in docs
* remove `Schema` which was replaced by `Field`
* remove `Config.case_insensitive` which was replaced by `Config.case_sensitive` (default `False`)
* remove `Config.allow_population_by_alias` which was replaced by `Config.allow_population_by_field_name`
* remove `model.fields` which was replaced by `model.__fields__`
* remove `model.to_string()` which was replaced by `str(model)`
* remove `model.__values__` which was replaced by `model.__dict__`
* **Breaking Change:** always validate only first sublevel items with `each_item`.
There were indeed some edge cases with some compound types where the validated items were the last sublevel ones, [1933](https://github.com/pydantic/pydantic/pull/1933) by PrettyWood
* Update docs extensions to fix local syntax highlighting, [2400](https://github.com/pydantic/pydantic/pull/2400) by daviskirk
* fix: allow `utils.lenient_issubclass` to handle `typing.GenericAlias` objects like `list[str]` in Python >= 3.9, [2399](https://github.com/pydantic/pydantic/pull/2399) by daviskirk
* Improve field declaration for _pydantic_ `dataclass` by allowing the usage of _pydantic_ `Field` or `'metadata'` kwarg of `dataclasses.field`, [2384](https://github.com/pydantic/pydantic/pull/2384) by PrettyWood
* Making `typing-extensions` a required dependency, [2368](https://github.com/pydantic/pydantic/pull/2368) by samuelcolvin
* Make `resolve_annotations` more lenient, allowing for missing modules, [2363](https://github.com/pydantic/pydantic/pull/2363) by samuelcolvin
* Allow configuring models through class kwargs, [2356](https://github.com/pydantic/pydantic/pull/2356) by Bobronium
* Prevent `Mapping` subclasses from always being coerced to `dict`, [2325](https://github.com/pydantic/pydantic/pull/2325) by ofek
* fix: allow `None` for type `Optional[conset / conlist]`, [2320](https://github.com/pydantic/pydantic/pull/2320) by PrettyWood
* Support empty tuple type, [2318](https://github.com/pydantic/pydantic/pull/2318) by PrettyWood
* fix: `python_requires` metadata to require >=3.6.1, [2306](https://github.com/pydantic/pydantic/pull/2306) by hukkinj1
* Properly encode `Decimal` with, or without any decimal places, [2293](https://github.com/pydantic/pydantic/pull/2293) by hultner
* fix: update `__fields_set__` in `BaseModel.copy(update=…)`, [2290](https://github.com/pydantic/pydantic/pull/2290) by PrettyWood
* fix: keep order of fields with `BaseModel.construct()`, [2281](https://github.com/pydantic/pydantic/pull/2281) by PrettyWood
* Support generating schema for Generic fields, [2262](https://github.com/pydantic/pydantic/pull/2262) by maximberg
* Fix `validate_decorator` so `**kwargs` doesn't exclude values when the keyword
has the same name as the `*args` or `**kwargs` names, [2251](https://github.com/pydantic/pydantic/pull/2251) by cybojenix
* Prevent overriding positional arguments with keyword arguments in
`validate_arguments`, as per behaviour with native functions, [2249](https://github.com/pydantic/pydantic/pull/2249) by cybojenix
* add documentation for `con*` type functions, [2242](https://github.com/pydantic/pydantic/pull/2242) by tayoogunbiyi
* Support custom root type (aka `__root__`) when using `parse_obj()` with nested models, [2238](https://github.com/pydantic/pydantic/pull/2238) by PrettyWood
* Support custom root type (aka `__root__`) with `from_orm()`, [2237](https://github.com/pydantic/pydantic/pull/2237) by PrettyWood
* ensure cythonized functions are left untouched when creating models, based on [1944](https://github.com/pydantic/pydantic/pull/1944) by kollmats, [#2228](https://github.com/pydantic/pydantic/pull/2228) by samuelcolvin
* Resolve forward refs for stdlib dataclasses converted into _pydantic_ ones, [2220](https://github.com/pydantic/pydantic/pull/2220) by PrettyWood
* Add support for `NamedTuple` and `TypedDict` types.
Those two types are now handled and validated when used inside `BaseModel` or _pydantic_ `dataclass`.
Two utils are also added `create_model_from_namedtuple` and `create_model_from_typeddict`, [2216](https://github.com/pydantic/pydantic/pull/2216) by PrettyWood
* Do not ignore annotated fields when type is `Union[Type[...], ...]`, [2213](https://github.com/pydantic/pydantic/pull/2213) by PrettyWood
* Raise a user-friendly `TypeError` when a `root_validator` does not return a `dict` (e.g. `None`), [2209](https://github.com/pydantic/pydantic/pull/2209) by masalim2
* Add a `FrozenSet[str]` type annotation to the `allowed_schemes` argument on the `strict_url` field type, [2198](https://github.com/pydantic/pydantic/pull/2198) by Midnighter
* add `allow_mutation` constraint to `Field`, [2195](https://github.com/pydantic/pydantic/pull/2195) by sblack-usu
* Allow `Field` with a `default_factory` to be used as an argument to a function
decorated with `validate_arguments`, [2176](https://github.com/pydantic/pydantic/pull/2176) by thomascobb
* Allow non-existent secrets directory by only issuing a warning, [2175](https://github.com/pydantic/pydantic/pull/2175) by davidolrik
* fix URL regex to parse fragment without query string, [2168](https://github.com/pydantic/pydantic/pull/2168) by andrewmwhite
* fix: ensure to always return one of the values in `Literal` field type, [2166](https://github.com/pydantic/pydantic/pull/2166) by PrettyWood
* Support `typing.Annotated` hints on model fields. A `Field` may now be set in the type hint with `Annotated[..., Field(...)`; all other annotations are ignored but still visible with `get_type_hints(..., include_extras=True)`, [2147](https://github.com/pydantic/pydantic/pull/2147) by JacobHayes
* Added `StrictBytes` type as well as `strict=False` option to `ConstrainedBytes`, [2136](https://github.com/pydantic/pydantic/pull/2136) by rlizzo
* added `Config.anystr_lower` and `to_lower` kwarg to `constr` and `conbytes`, [2134](https://github.com/pydantic/pydantic/pull/2134) by tayoogunbiyi
* Support plain `typing.Tuple` type, [2132](https://github.com/pydantic/pydantic/pull/2132) by PrettyWood
* Add a bound method `validate` to functions decorated with `validate_arguments`
to validate parameters without actually calling the function, [2127](https://github.com/pydantic/pydantic/pull/2127) by PrettyWood
* Add the ability to customize settings sources (add / disable / change priority order), [2107](https://github.com/pydantic/pydantic/pull/2107) by kozlek
* Fix mypy complaints about most custom _pydantic_ types, [2098](https://github.com/pydantic/pydantic/pull/2098) by PrettyWood
* Add a [Hypothesis](https://hypothesis.readthedocs.io/) plugin for easier [property-based testing](https://increment.com/testing/in-praise-of-property-based-testing/) with Pydantic's custom types - [usage details here](https://docs.pydantic.dev/hypothesis_plugin/), [#2097](https://github.com/pydantic/pydantic/pull/2097) by Zac-HD
* add validator for `None`, `NoneType` or `Literal[None]`, [2095](https://github.com/pydantic/pydantic/pull/2095) by PrettyWood
* Handle properly fields of type `Callable` with a default value, [2094](https://github.com/pydantic/pydantic/pull/2094) by PrettyWood
* Updated `create_model` return type annotation to return type which inherits from `__base__` argument, [2071](https://github.com/pydantic/pydantic/pull/2071) by uriyyo
* Add merged `json_encoders` inheritance, [2064](https://github.com/pydantic/pydantic/pull/2064) by art049
* allow overwriting `ClassVar`s in sub-models without having to re-annotate them, [2061](https://github.com/pydantic/pydantic/pull/2061) by layday
* add default encoder for `Pattern` type, [2045](https://github.com/pydantic/pydantic/pull/2045) by PrettyWood
* Add `NonNegativeInt`, `NonPositiveInt`, `NonNegativeFloat`, `NonPositiveFloat`, [1975](https://github.com/pydantic/pydantic/pull/1975) by mdavis-xyz
* Use % for percentage in string format of colors, [1960](https://github.com/pydantic/pydantic/pull/1960) by EdwardBetts
* Fixed issue causing `KeyError` to be raised when building schema from multiple `BaseModel` with the same names declared in separate classes, [1912](https://github.com/pydantic/pydantic/pull/1912) by JSextonn
* Add `rediss` (Redis over SSL) protocol to `RedisDsn`
Allow URLs without `user` part (e.g., `rediss://:passlocalhost`), [1911](https://github.com/pydantic/pydantic/pull/1911) by TrDex
* Add a new `frozen` boolean parameter to `Config` (default: `False`).
Setting `frozen=True` does everything that `allow_mutation=False` does, and also generates a `__hash__()` method for the model. This makes instances of the model potentially hashable if all the attributes are hashable, [1880](https://github.com/pydantic/pydantic/pull/1880) by rhuille
* fix schema generation with multiple Enums having the same name, [1857](https://github.com/pydantic/pydantic/pull/1857) by PrettyWood
* Added support for 13/19 digits VISA credit cards in `PaymentCardNumber` type, [1416](https://github.com/pydantic/pydantic/pull/1416) by AlexanderSov
* fix: prevent `RecursionError` while using recursive `GenericModel`s, [1370](https://github.com/pydantic/pydantic/pull/1370) by xppt
* use `enum` for `typing.Literal` in JSON schema, [1350](https://github.com/pydantic/pydantic/pull/1350) by PrettyWood
* Fix: some recursive models did not require `update_forward_refs` and silently behaved incorrectly, [1201](https://github.com/pydantic/pydantic/pull/1201) by PrettyWood
* Fix bug where generic models with fields where the typevar is nested in another type `a: List[T]` are considered to be concrete. This allows these models to be subclassed and composed as expected, [947](https://github.com/pydantic/pydantic/pull/947) by daviskirk
* Add `Config.copy_on_model_validation` flag. When set to `False`, _pydantic_ will keep models used as fields
untouched on validation instead of reconstructing (copying) them, [265](https://github.com/pydantic/pydantic/pull/265) by PrettyWood

Page 10 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.