Closed LironEr closed 2 months ago
Thanks for opening your first issue here! We'll come back to you as soon as we can. In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
Hey @LironEr thanks for opening this issue! I see your point here and I agree that we should pass custom_serializer
for every function that invokes jsonable_encoder
again. Do you want to work in a PR to fix this? We can include this bugfix in our next release 11/07.
Since this is a bug, I've created a draft PR with the fix. At a first glance, we seem to be missing in other data types too so I'll look into those later before getting a review.
PS: To prevent getting lost in translation, by "do you want to work in a PR to fix this?" was meant as a "if can help out we can prioritize this for the next release".. just in case : D
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.
Oops missed the notifications about that Thank you so much for the fast fix (:
This is now released under 2.41.0 version!
Expected Behaviour
The custom serializer should be passed to all sub-functions
Current Behaviour
The custom serializer is not being called, it's passed only on the first
jsonable_encoder
run. https://github.com/aws-powertools/powertools-lambda-python/blob/develop/aws_lambda_powertools/event_handler/openapi/encoders.py#L112Code snippet
Possible Solution
pass
custom_serializer
to all functions, as this is a recursive function as mentioned in https://github.com/aws-powertools/powertools-lambda-python/issues/3892#issuecomment-1983683318Steps to Reproduce
run the code snippet (:
Powertools for AWS Lambda (Python) version
2.40.1
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs