Skip to content

refactor(ci): bump ruff target version#8048

Closed
maxrabin wants to merge 3 commits intoaws-powertools:developfrom
maxrabin:improv/bump-ruff-target-version
Closed

refactor(ci): bump ruff target version#8048
maxrabin wants to merge 3 commits intoaws-powertools:developfrom
maxrabin:improv/bump-ruff-target-version

Conversation

@maxrabin
Copy link
Copy Markdown
Contributor

Issue number: closes #8047

Summary

Update Ruff target Python version from 3.8 to 3.10 to align with version targets defined in Poetry.
Then fix/implement all Ruff lint issues.

Changes

Mostly changes around typing (List -> list, Optional[str] -> str | None)

User experience

Code is more modern and standardized

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.

Max Rabin added 2 commits March 18, 2026 14:37
This aligns with the Poetry defined minimum version.
Marking this with ! for Breaking Change anyways as this
will break the code on python versions 3.8 and 3.9 as Ruff
will update all syntax and libraries to 3.10+-only compatibilty
@maxrabin maxrabin requested a review from a team as a code owner March 18, 2026 13:42
@maxrabin maxrabin requested a review from hjgraca March 18, 2026 13:42
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 18, 2026
@leandrodamascena leandrodamascena changed the title Improv/bump ruff target version refactor(ci): bump ruff target version Mar 23, 2026
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 98.93390% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.61%. Comparing base (c16f302) to head (c8aab6e).
⚠️ Report is 19 commits behind head on develop.

Files with missing lines Patch % Lines
aws_lambda_powertools/logging/types.py 0.00% 3 Missing ⚠️
...lambda_powertools/utilities/feature_flags/types.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8048      +/-   ##
===========================================
- Coverage    96.65%   96.61%   -0.05%     
===========================================
  Files          282      282              
  Lines        13775    13523     -252     
  Branches      1096     1096              
===========================================
- Hits         13314    13065     -249     
+ Misses         339      336       -3     
  Partials       122      122              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leandrodamascena
Copy link
Copy Markdown
Contributor

Hey @maxrabin, thanks for putting this together - I like the direction of modernizing the typing syntax (List -> list, Optional[str] -> str | None).

However, I have a few concerns:

  1. Too many files at once - this PR touches 100 files which makes it really hard to review properly.
  2. Examples will break docs - changing examples/ files will break our documentation snippet highlighting since those are referenced by line numbers.
  3. Parser is off-limits - the parser module uses Pydantic models extensively, and changing type annotations there (e.g. Optional[str] to str | None) can cause Pydantic validation failures.

I'm going to close this PR for now, but the issue itself makes total sense I'll keep the issue open and work on splitting this into smaller, reviewable PRs that we can merge incrementally without breaking anything.

If you'd like to be part of this effort, you're more than welcome! Once I split the issue into smaller scoped tasks, feel free to pick any of them up.

Thanks a lot for another amazing idea and contribution.

@maxrabin
Copy link
Copy Markdown
Contributor Author

maxrabin commented Apr 2, 2026

Totally appreciate your concerns, this is obviously something that has to be done carefully.

I'd be very happy to be part of the effort, keep me posted.

I'm a huge fan of this project and I make extensive use of it in every single lambda function i write!

@leandrodamascena
Copy link
Copy Markdown
Contributor

Totally appreciate your concerns, this is obviously something that has to be done carefully.

I'd be very happy to be part of the effort, keep me posted.

I'm a huge fan of this project and I make extensive use of it in every single lambda function i write!

Awesome, glad to hear that! It makes supper happy to know that I'm helping customers in their workoads.

I'll split the issue into smaller tasks in the next few days and ping you here so you can pick up whatever interests you.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers internal Maintenance changes logger size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: Update ruff target version to 3.10

2 participants