Skip to content
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

Deprecation Notice on support for boto/older API's #4526

Closed
bblommers opened this issue Nov 4, 2021 · 4 comments
Closed

Deprecation Notice on support for boto/older API's #4526

bblommers opened this issue Nov 4, 2021 · 4 comments

Comments

@bblommers
Copy link
Collaborator

bblommers commented Nov 4, 2021

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

  1. mock_dynamodb originally supported an older API version, 20111205.
    mock_dynamodb2 supports 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

@bblommers bblommers pinned this issue Nov 4, 2021
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Nov 11, 2021
Some test warnings are due to incompatibility between (bundled)
HTTPretty and docker-py [1]. I don't plan to dig deeper as HTTPretty
will no longer be used in moto 3.0 [2,3].

[1] gabrielfalcao/HTTPretty#311
[2] getmoto/moto#4378
[3] getmoto/moto#4526


git-svn-id: file:///srv/repos/svn-community/svn@1042171 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Nov 11, 2021
Some test warnings are due to incompatibility between (bundled)
HTTPretty and docker-py [1]. I don't plan to dig deeper as HTTPretty
will no longer be used in moto 3.0 [2,3].

[1] gabrielfalcao/HTTPretty#311
[2] getmoto/moto#4378
[3] getmoto/moto#4526

git-svn-id: file:///srv/repos/svn-community/svn@1042171 9fca08f4-af9d-4005-b8df-a31f2cc04f65
@kazanzhy
Copy link
Contributor

So for now I should use @mock_rds2 for my tests, and before version 4.0 move to @mock_rds back.
Is that correct?

@bblommers
Copy link
Collaborator Author

Yes, that's correct @kazanzhy. Don't worry - we'll give plenty of notices before completely removing the @mock_rds2-decorator.

@bblommers
Copy link
Collaborator Author

@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.

hansmannj added a commit to geoadmin/service-kml that referenced this issue Apr 1, 2022
As there were problems with dependencies recently in a legacy service caused by using an old version of Flask
this service is updated to use a recent version of Flask. Some additional changes needed to be done, in order to
solve issues that popped up after using a newer version of Flask and
also newer versions of other packages.
See getmoto/moto#4526 for example:
mock_dynamodb2 should be mock_dynamodb instead.
@bblommers
Copy link
Collaborator Author

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.

@bblommers bblommers unpinned this issue Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants