Module aws_lambda_powertools.utilities.parser.compat

Functions

def disable_pydantic_v2_warning()

Disables the Pydantic version 2 warning by filtering out the related warnings.

This function checks the version of Pydantic currently installed and if it is version 2, it filters out the PydanticDeprecationWarning and PydanticDeprecatedSince20 warnings to suppress them.

Since we only need to run the code once, we are using lru_cache to improve performance.

Note: This function assumes that Pydantic is installed.

Usage

disable_pydantic_v2_warning()