Closed
Description
Expected Behaviour
Powertools includes dependencies unless the feature states that it needs extras.
Current Behaviour
The Logger
utility will not work without jmespath
. Importing the logger causes the following error:
ModuleNotFoundError: No module named 'jmespath'
Code snippet
from aws_lambda_powertools.logging import Logger
logger = Logger()
logger.info('test')
Possible Solution
This issue is unlikely to cause problems in most cases. There are very few use cases where this code would be run somewhere that does not have jmespath
available via boto/botocore.
It could be noted in the docs in the extra dependencies section.
Steps to Reproduce
- Create a new virtual environment:
python -m venv .venv
- Activate environment
source .venv/bin/activate
- Install Powertools with no extras
pip install aws-lambda-powertools
- Run example code snippet.
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped