Skip to content

Commit c12a0d9

Browse files
docs(upgrade_guide): update upgrade guide with Pydantic information (#5316)
* Updating uograde guide * Addressing Andrea's feedback
1 parent ece20f8 commit c12a0d9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/upgrade.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ We've made minimal breaking changes to make your transition to v3 as smooth as p
1717
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------- |
1818
| **Pydantic** | We have removed support for [Pydantic v1](#drop-support-for-pydantic-v1) | No |
1919
| **Parser** | We have replaced [DynamoDBStreamModel](#dynamodbstreammodel-in-parser) `AttributeValue` with native Python types | Yes |
20+
| **Parser** | We no longer export [Pydantic objects](#importing-pydantic-objects) from `parser.pydantic`. | Yes |
2021
| **Lambda layer** | [Lambda layers](#new-aws-lambda-layer-arns) are now compiled according to the specific Python version and architecture | No |
2122
| **Event Handler** | We [have deprecated](#event-handler-headers-are-case-insensitive) the `get_header_value` function. | Yes |
2223
| **Batch Processor** | `@batch_processor` and `@async_batch_processor` decorators [are now deprecated](#deprecated-batch-processing-decorators) | Yes |
@@ -91,6 +92,18 @@ def lambda_handler(event: DynamoDBStreamModel, context: LambdaContext):
9192

9293
```
9394

95+
## Importing Pydantic objects
96+
97+
We have stopped exporting Pydantic objects directly from `aws_lambda_powertools.utilities.parser.pydantic`. This change prevents customers from accidentally importing all of Pydantic, which could significantly slow down function startup times.
98+
99+
```diff
100+
- #BEFORE - v2
101+
- from aws_lambda_powertools.utilities.parser.pydantic import EmailStr
102+
103+
+ # NOW - v3
104+
+ from pydantic import EmailStr
105+
```
106+
94107
## New AWS Lambda Layer ARNs
95108

96109
!!! note "No code changes required"

0 commit comments

Comments
 (0)