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(layers): add pydantic-settings package to v3 Layer #5516

Merged

Conversation

tkasuz
Copy link
Contributor

@tkasuz tkasuz commented Nov 7, 2024

Issue number: #5508

Summary

This PR adds pydantic-settings to simplify the migration from v2 to v3 for users building Lambda functions exclusively with Powertools layers, without the need for additional pip installations.

Changes

  • Adds pydantic-settings as an optional package and includes it in all extra dependencies.

User experience

Before this change, users had to rewrite code using pydantic-settings with os to read environment variables, or stick with the v2 layer to use the BaseSettings class from Pydantic v1. With this update, however, users can now migrate smoothly from v2 to v3 without any changes to code that relies on pydantic-settings.

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.

@tkasuz tkasuz requested a review from a team as a code owner November 7, 2024 01:31
@boring-cyborg boring-cyborg bot added the dependencies Pull requests that update a dependency file label Nov 7, 2024
Copy link

boring-cyborg bot commented Nov 7, 2024

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 7, 2024
@leandrodamascena leandrodamascena changed the title improv: Adds pydantic-settings for v3 Layer chore(layers): add pydantic-settings package to v3 Layer Nov 7, 2024
@leandrodamascena leandrodamascena linked an issue Nov 7, 2024 that may be closed by this pull request
2 tasks
@leandrodamascena leandrodamascena self-assigned this Nov 7, 2024
@github-actions github-actions bot added the internal Maintenance changes label Nov 7, 2024
Copy link

sonarqubecloud bot commented Nov 7, 2024

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.16%. Comparing base (6cfbbc9) to head (5e9362a).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5516   +/-   ##
========================================
  Coverage    96.16%   96.16%           
========================================
  Files          229      229           
  Lines        10810    10810           
  Branches      2007     2007           
========================================
  Hits         10395    10395           
  Misses         327      327           
  Partials        88       88           

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

@leandrodamascena leandrodamascena merged commit 8214f89 into aws-powertools:develop Nov 7, 2024
11 checks passed
Copy link

boring-cyborg bot commented Nov 7, 2024

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file internal Maintenance changes size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add pydantic-settings to v3 Layer
2 participants