Skip to content

Bump aws-lambda-powertools[parser] from 2.41.0 to 3.7.0 #333

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

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 25, 2025

Bumps aws-lambda-powertools[parser] from 2.41.0 to 3.7.0.

Release notes

Sourced from aws-lambda-powertools[parser]'s releases.

v3.7.0

Summary

In this release, we are thrilled to announce new features and improvements:

  • New Event Source Data Classes and Parser models for IoT Core Registry Events
  • Support for OpenAPI examples within parameters fields

We also fixed a bug in the Logger utility's custom handlers and expanded Lambda layer support to Thailand (ap-southeast-7) and Mexico Central (mx-central-1) regions.

⭐ Huge thanks to our new contributors: @​basvandriel and @​DKurilo

Working with IoT Core Registry Events with Parser

Docs

We have improved the Parser utility by adding support for events from IoT Core Registry Events

parser (1)

Here are all the models we have added for IoT Core Registry Events:

  • IoTCoreThingEvent - For Things Created/Updated/Deleted events
  • IoTCoreThingTypeEvent - For Thing Type Created/Updated/Deprecated/Deleted events
  • IoTCoreThingTypeAssociationEvent - For associating or disassociating a thing events
  • IoTCoreThingGroupEvent - For Thing Group Created/Updated/Deleted events
  • IoTCoreAddOrRemoveFromThingGroupEvent - For adding or removing a thing from a group events
  • IoTCoreAddOrDeleteFromThingGroupEvent - For adding or deleting a group within another group events

Adding examples to the OpenAPI schema

Docs

You can now include specific examples of parameter values directly in the schema objects. These examples are rendered in API documentation tools like SwaggerUI and provide a better experience when reading the OpenAPI schema.

openapi

Using Logger custom handlers

Docs

Customers can now rely on a correct logger handler selection in compute environments or custom setups where a standard logging logger shares the same name as a Powertools logger.

logger

Changes

🌟New features and non-breaking changes

... (truncated)

Changelog

Sourced from aws-lambda-powertools[parser]'s changelog.

[v3.7.0] - 2025-02-25

Features

  • parser: Event source dataclasses for IoT Core Registry Events (#6123)

Maintenance

  • version bump

[v3.6.0] - 2025-02-11

Bug Fixes

  • docs: typo in a service name in Event Handler (#5944)
  • logger: child logger must respect log level (#5950)

Code Refactoring

  • metrics: Improve type annotations for metrics decorator (#6000)

Documentation

  • api: migrating the event handler utility to mkdocstrings (#6023)
  • api: migrating the metrics utility to mkdocstrings (#6022)
  • api: migrating the logger utility to mkdocstrings (#6021)
  • api: migrating the Middleware Factory utility to mkdocstrings (#6019)
  • api: migrating the tracer utility to mkdocstrings (#6017)
  • api: migrating the batch utility to mkdocstrings (#6016)
  • api: migrating the event source data classes utility to mkdocstrings (#6015)
  • api: migrating the data masking utility to mkdocstrings (#6013)
  • api: migrating the AppConfig utility to mkdocstrings (#6008)
  • api: migrating the idempotency utility to mkdocstrings (#6007)
  • api: migrating the jmespath utility to mkdocstrings (#6006)
  • api: migrating the parameters utility to mkdocstrings (#6005)
  • api: migrating the parser utility to mkdocstrings (#6004)
  • api: migrating the streaming utility to mkdocstrings (#6003)
  • api: migrating the typing utility to mkdocstrings (#5996)
  • api: migrating the validation utility to mkdocstrings (#5972)
  • layer: update layer version number - v3.5.0 (#5952)

Features

  • data-masking: add custom mask functionalities (#5837)
  • event_source: add class APIGatewayAuthorizerResponseWebSocket (#6058)
  • logger: add clear_state method (#5956)
  • metrics: disable metrics flush via environment variables (#6046)
  • openapi: enhance support for tuple return type validation (#5997)

Maintenance

... (truncated)

Upgrade guide

Sourced from aws-lambda-powertools[parser]'s upgrade guide.


title: Upgrade guide description: Guide to update between major Powertools for AWS Lambda (Python) versions

Migrate to v3 from v2

!!! info "We strongly encourage you to migrate to v3. However, if you still need to upgrade from v1 to v2, you can find the upgrade guide."

We've made minimal breaking changes to make your transition to v3 as smooth as possible.

Quick summary

Area Change Code change required
Pydantic We have removed support for Pydantic v1 No
Parser We have replaced DynamoDBStreamModel AttributeValue with native Python types Yes
Parser We no longer export Pydantic objects from parser.pydantic. Yes
Lambda layer Lambda layers are now compiled according to the specific Python version and architecture No
Event Handler We have deprecated the get_header_value function. Yes
Batch Processor @batch_processor and @async_batch_processor decorators are now deprecated Yes
Event Source Data Classes We have updated default values for optional fields. Yes
Parameters The default cache TTL is now set to 5 minutes No
Parameters The config parameter is deprecated in favor of boto_config Yes
JMESPath Functions The extract_data_from_envelope function is deprecated in favor of query Yes
Types file We have removed the type imports from the shared/types.py file Yes

First Steps

Before you start, we suggest making a copy of your current working project or create a new branch with git.

  1. Upgrade Python to at least v3.9.
  2. Ensure you have the latest version via Lambda Layer or PyPi{target="_blank"}.
  3. Review the following sections to confirm if you need to make changes to your code.

Drop support for Pydantic v1

!!! note "No code changes required"

As of June 30, 2024, Pydantic v1 has reached its end-of-life, and we have discontinued support for this version. We now exclusively support Pydantic v2.

Use Pydantic v2 Migration Guide{target="_blank"} to migrate your custom Pydantic models to v2.

DynamoDBStreamModel in parser

!!! info "This also applies if you're using DynamoDB BatchProcessor{target="_blank"}."

DynamoDBStreamModel now returns native Python types when you access DynamoDB records through Keys, NewImage, and OldImage attributes.

... (truncated)

Commits
  • aadd4da chore: version bump
  • 79d57d8 feat(parser): Event source dataclasses for IoT Core Registry Events (#6123)
  • 1258d6d chore(deps): bump slsa-framework/slsa-github-generator from 2.0.0 to 2.1.0 (#...
  • 9ce2af6 chore(ci): new pre-release 3.6.1a9 (#6157)
  • b72078f fix(parser): fix data types for sourceIPAddress and sequencer fields in S...
  • 3544c54 chore(ci): new pre-release 3.6.1a8 (#6152)
  • 360da8a chore(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 (#6143)
  • d96e93f chore(deps): bump pydantic-settings from 2.7.1 to 2.8.0 (#6147)
  • bcfa47d chore(deps-dev): bump aws-cdk-lib from 2.179.0 to 2.180.0 (#6148)
  • 1a31afc chore(deps-dev): bump boto3-stubs from 1.36.25 to 1.36.26 (#6146)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [aws-lambda-powertools[parser]](https://github.com/aws-powertools/powertools-lambda-python) from 2.41.0 to 3.7.0.
- [Release notes](https://github.com/aws-powertools/powertools-lambda-python/releases)
- [Changelog](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/CHANGELOG.md)
- [Upgrade guide](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/docs/upgrade.md)
- [Commits](aws-powertools/powertools-lambda-python@v2.41.0...v3.7.0)

---
updated-dependencies:
- dependency-name: aws-lambda-powertools[parser]
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 25, 2025

The following labels could not be found: dependencies.

Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 7, 2025

Superseded by #347.

@dependabot dependabot bot closed this Mar 7, 2025
@dependabot dependabot bot deleted the dependabot/pip/main/aws-lambda-powertools-parser--3.7.0 branch March 7, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants