Skip to content

Commit 8b6332d

Browse files
Upgrade guide for v3
1 parent e984a64 commit 8b6332d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/upgrade.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We've made minimal breaking changes to make your transition to v3 as smooth as p
1717
| **Parser** | Replaced [DynamoDBStreamModel](#dynamodbstreammodel-in-parser) `AttributeValue` with native Python types | Yes |
1818
| **Lambda layer** | [Lambda layers](#new-lambda-layers-arn) are now compiled according to the specific Python version and architecture | No |
1919
| **Batch Processor** | `@batch_processor` and `@async_batch_processor` decorators [are now deprecated](#deprecated-batch-processing-decorators) | Yes |
20-
| **Event Source Data Classes** | New default values for optional fields | Yes |
20+
| **Event Source Data Classes** | Updated [default values](#event-source-default-values) for optional fields. | Yes |
2121
| **Parameters** | The [default cache TTL](#parameters-default-cache-ttl-updated-to-5-minutes) is now set to **5 minutes** | No |
2222
| **Parameters** | The `config` parameter [is deprecated](#parameters-using-the-new-boto_config-parameter) in favor of `boto_config` | Yes |
2323
| **JMESPath Functions** | The `extract_data_from_envelope` function is [deprecated in favor](#utilizing-the-new-query-function-in-jmespath-functions) of `query` | Yes |
@@ -37,7 +37,7 @@ Before you start, we suggest making a copy of your current working project or cr
3737

3838
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.
3939

40-
You don't need to make any changes related to Powertools for AWS Lambda (Python) on your end.
40+
You don't need to make any changes to your code regarding Powertools for AWS Lambda (Python), as we fully support Pydantic V2 features.
4141

4242
## DynamoDBStreamModel in parser
4343

@@ -148,6 +148,14 @@ def lambda_handler(event, context: LambdaContext):
148148
)
149149
```
150150

151+
## Event source default values
152+
153+
We've modified the **Event Source Data classes** so that optional dictionaries and lists now return empty dictionaries or lists instead of None. This improvement simplifies your code by eliminating the need for conditional checks when accessing these fields, while maintaining backward compatibility with previous implementations.
154+
155+
We've applied this change broadly across various event source data classes, ensuring a more consistent and streamlined coding experience for you.
156+
157+
**MISSING BEFORE AND AFTER**
158+
151159
## Parameters: default cache TTL updated to 5 minutes
152160

153161
!!! note "No code changes required"

0 commit comments

Comments
 (0)