aws-powertools / powertools-lambda-python

A developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/python/latest/
MIT No Attribution
2.72k stars 378 forks source link

Bug: ModuleNotFoundError: No module named 'pydantic' #4498

Closed Wurstnase closed 3 weeks ago

Wurstnase commented 3 weeks ago

Expected Behaviour

pydantic shouldn't be mandatory for default usage, as in <=2.38.1.

Current Behaviour

A ModuleNotFoundError is raised.

Code snippet

from aws_lambda_powertools.event_handler import Response

Possible Solution

No response

Steps to Reproduce

pip install aws-lambda-powertools
cat << EOF >> foo.py
from aws_lambda_powertools.event_handler import Response
EOF
python foo.py

Powertools for AWS Lambda (Python) version

2.39.0

AWS Lambda function runtime

3.12

Packaging format used

PyPi

Debugging logs

No response

leandrodamascena commented 3 weeks ago

Looking at this now.

heitorlessa commented 3 weeks ago

it's a regression not caught by tests - we're making a fix and a patch release now

heitorlessa commented 3 weeks ago

2.39.0 release yanked, merged regression fix, and we're starting a patch release now.

heitorlessa commented 3 weeks ago

@Wurstnase 2.39.1 is now live in PyPi; we're testing locally with a new project to be sure too. Lambda Layers are starting now

Edit: @leandrodamascena just tested in a new project and worked. Let us know otherwise please.


Release pipeline as it's public: https://github.com/aws-powertools/powertools-lambda-python/actions/runs/9501863707

github-actions[bot] commented 3 weeks ago

This is now released under 2.39.1 version!

heitorlessa commented 3 weeks ago

reopening to make sure we hear back from @Wurstnase

Wurstnase commented 3 weeks ago

Thanks! Everything is working again.

github-actions[bot] commented 3 weeks ago

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.