Skip to content

Bug: Pydantic "escape hatch" no longer available #5352

Closed
@areifert

Description

@areifert

Expected Behaviour

The Parser documentation FAQ states that an "escape hatch" mechanism can be used to access imports from the base pydantic library that are not otherwise available as imports from aws_lambda_powertools.utilities.parser: https://docs.powertools.aws.dev/lambda/python/latest/utilities/parser/#faq.

Current Behaviour

aws_lambda_powertools.utilities.parser.pydantic is not a valid import path. (This may have been an older feature that has since been removed.)

Code snippet

from aws_lambda_powertools.utilities.parser.pydantic import <what you'd like to import'>

Possible Solution

If all pydantic imports can be made available at aws_lambda_powertools.utilities.parser.pydantic (likely by modifying aws_lambda_powertools/utilities/parser/__init__.py), that would be ideal. Otherwise, the documentation should be updated to remove this feature.

Steps to Reproduce

Attempting to import anything from aws_lambda_powertools.utilities.parser.pydantic will result in an import error.

Powertools for AWS Lambda (Python) version

latest

AWS Lambda function runtime

3.12

Packaging format used

Lambda Layers

Debugging logs

No response

Metadata

Metadata

Labels

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions