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

chore(typing): move backwards compat types to shared types #3092

Conversation

heitorlessa
Copy link
Contributor

@heitorlessa heitorlessa commented Sep 14, 2023

Issue number: #3091

Summary

Moves all future types under shared/types.py to avoid common mistakes on version mismatch, plus additional import machinery.

Changes

Please provide a summary of what's being changed

  • aws_lambda_powertools/metrics/provider/cloudwatch_emf/types.py
  • aws_lambda_powertools/event_handler/middlewares/base.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
  • Final search for typing_extensions
  • Ensure all types are imported for 3.7 from extension

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@heitorlessa heitorlessa requested a review from a team September 14, 2023 15:40
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 14, 2023
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.5% 0.5% Duplication

@codecov-commenter
Copy link

codecov-commenter commented Sep 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% ⚠️

Comparison is base (86619e5) 96.36% compared to head (3d7b778) 96.36%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3092      +/-   ##
===========================================
- Coverage    96.36%   96.36%   -0.01%     
===========================================
  Files          185      185              
  Lines         8066     8064       -2     
  Branches      1510     1509       -1     
===========================================
- Hits          7773     7771       -2     
  Misses         236      236              
  Partials        57       57              
Files Changed Coverage Δ
...ambda_powertools/event_handler/middlewares/base.py 88.88% <100.00%> (ø)
aws_lambda_powertools/logging/types.py 100.00% <100.00%> (ø)
aws_lambda_powertools/metrics/functions.py 100.00% <100.00%> (ø)
...owertools/metrics/provider/cloudwatch_emf/types.py 100.00% <100.00%> (ø)
aws_lambda_powertools/metrics/types.py 100.00% <100.00%> (ø)
aws_lambda_powertools/shared/cookies.py 59.57% <100.00%> (+0.87%) ⬆️
aws_lambda_powertools/shared/types.py 100.00% <100.00%> (ø)
aws_lambda_powertools/utilities/batch/types.py 80.00% <100.00%> (ø)
...ls/utilities/data_classes/secrets_manager_event.py 100.00% <100.00%> (ø)
aws_lambda_powertools/utilities/parameters/ssm.py 97.59% <100.00%> (ø)
... and 3 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leandrodamascena leandrodamascena merged commit f673368 into aws-powertools:develop Sep 14, 2023
@heitorlessa heitorlessa added the internal Maintenance changes label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commons event_handlers internal Maintenance changes logger metrics size/L Denotes a PR that changes 100-499 lines, ignoring generated files. streaming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Only install typing-extensions dependency when necessary missing in some files
3 participants