Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: jmespath is an undeclared dependency of Logger utility #4340

Closed
TonySherman opened this issue May 16, 2024 · 3 comments · Fixed by #4422
Closed

Bug: jmespath is an undeclared dependency of Logger utility #4340

TonySherman opened this issue May 16, 2024 · 3 comments · Fixed by #4422
Assignees
Labels
bug Something isn't working

Comments

@TonySherman
Copy link
Contributor

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.
image

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

@TonySherman TonySherman added bug Something isn't working triage Pending triage from maintainers labels May 16, 2024
@heitorlessa heitorlessa removed the triage Pending triage from maintainers label May 18, 2024
@heitorlessa
Copy link
Contributor

Thanks a lot for opening the issue as discussed on discord ;)

We'll add it for the next release

Copy link
Contributor

⚠️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.

@github-actions github-actions bot added the pending-release Fix or implementation already in dev waiting to be released label May 29, 2024
Copy link
Contributor

This is now released under 2.39.0 version!

@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Shipped
3 participants