Deprecation Notice on support for boto/older API's
Deprecation Notice for boto
As discussed in #2950, it is about time for us to drop support for Boto2. AWS has dropped support for this a long time ago, and now so will we.
For now, users can mock calls to the boto-module using the deprecated decorators, such as @mock_ec2_deprecated, but these decorators will be removed in Moto 3.0.
Changes to other decorators
Two other old decorators will be changed:
@mock_dynamodb@mock_rds
Users have long been adviced to use the later@mock_dynamodb2 and @mock_rds2 instead, as those decorators are fully compatible with boto3 and support all mocked features.
The old decorators will be repurposed in Moto 3.1, and their functionality will become synonymous with @mock_dynamodb2 and @mock_rds2.
Changes on a per-version basis:
| Version | Change | Date |
|---|---|---|
| Moto 2.2.13 | Warnings will be added to @mock_dynamodb and @mock_rds |
07/Nov/2021 |
| Moto 3.0 | Removal of all @mock_{service}_deprecated-decorators |
21/Jan/2022 |
| Moto 3.1 | @mock_dynamodb will have the same functionality as @mock_dynamodb2 |
12/Mar/2022 |
@mock_rds will have the same functionality as @mock_rds2 |
||
@mock_dynamodb2 and @mock_rds2-decorators will be deprecated |
||
| Moto 4.0 | @mock_dynamodb2 and @mock_rds2-decorators will be removed. |
Timeline
An exact timeline is TBD. If you are impacted by this change, we advise you to:
- Watch this issue for further updates
- Pin Moto to a major version (
moto < 3), to avoid breaking things until you are ready to upgrade.
Feedback
Please let us know below whether you have any questions/feedback on these changes.
Notes
mock_dynamodboriginally supported an older API version, 20111205.mock_dynamodb2supports the latest API version, 20120810. AWS still supports the older version when using the HTTP API, but only when specifying an additional header:"X-Amz-Target": "DynamoDB_20111205.CreateTable". Moto supports this header now, and will continue to do so for the foreseeable future.
Edits: 07/Nov/2021 - Added the date-column to the table 21/Jan/2021 - Added release date Moto 3 12/Mar/2021 - Added release date Moto 3.1
So for now I should use @mock_rds2 for my tests, and before version 4.0 move to @mock_rds back.
Is that correct?
Yes, that's correct @kazanzhy. Don't worry - we'll give plenty of notices before completely removing the @mock_rds2-decorator.
@kazanzhy Moto 3.1.0 has now been released.
The mock_rds2 decorator still exists with the same functionality, but it is recommended to now start switching the decorators to mock_rds instead.
The deprecated decorators are now removed as of moto >= 4.0.0.dev4.
I'm going to close this now - please see #5366 for a full timeline of the Moto 4 release.