Skip to content

feat: Only install typing-extensions dependency when necessary missing in some files #3091

Closed
@HarbingersRequiem

Description

@HarbingersRequiem

Use case

This is the same issue as noted in #280. Looks like the following files are missing the conditionals put in which is causing issues, for me at least, with some Lambda scripts:

  • aws_lambda_powertools/event_handler/middlewares/base.py
  • aws_lambda_powertools/metrics/provider/cloudwatch_emf/types.py
  • aws_lambda_powertools/metrics/types.py
  • aws_lambda_powertools/utilities/batch/types.py
  • aws_lambda_powertools/utilities/parameters/ssm.py
  • aws_lambda_powertools/utilities/parameters/types.py
  • aws_lambda_powertools/utilities/streaming/s3_object.py

Solution/User Experience

Same as previous feat. Add the conditionals around the import for typing_extensions

Alternative solutions

No response

Acknowledgment

Metadata

Metadata

Assignees

Labels

typingStatic typing definition related issues (mypy, pyright, etc.)

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions