From abd9e96e813375125d81638951e436b017b81086 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Sat, 2 Mar 2024 14:14:59 +0100
Subject: [PATCH] chore(deps): update dependency moto to v5 (#243)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [moto](https://togithub.com/getmoto/moto)
([changelog](https://togithub.com/getmoto/moto/blob/master/CHANGELOG.md))
| `^4.0.0` -> `^5.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/moto/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/moto/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/moto/4.2.12/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/moto/4.2.12/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
getmoto/moto (moto)
###
[`v5.0.0`](https://togithub.com/getmoto/moto/blob/HEAD/CHANGELOG.md#500)
[Compare
Source](https://togithub.com/getmoto/moto/compare/4.2.14...5.0.0)
Docker Digest for 5.0.0:
*sha256:2faf2460a6446dfe472ac0d799e00341b1c84203d08540c247a6cc09be7c54e9*
General:
* All decorators have been replaced with a single decorator:
`mock_aws`
* The `mock_batch_simple` and `mock_lambda_simple` decorators can now be
configured using the `config`-parameter:
`@mock_aws(config={"batch": {"use_docker": False}, "lambda":
{"use_docker": False}})`
* It is now possible to configure methods/services which should reach
out to AWS.
@mock_aws(
config={"core": {"mock_credentials": False, "passthrough": {"urls": [],
"services": []}}}
)
* All requests now return a RequestId
Miscellaneous:
* IAM: The AWS managed Policies are no longer loaded by default.
If your application depends on these policies, tell Moto explicitly to
load them like so:
@mock_aws(config={"iam": {"load_aws_managed_policies": True}})
Or by setting an environment variable:
MOTO_IAM_LOAD_MANAGED_POLICIES=true
* S3: list_objects() now returns a hashed ContinuationToken
###
[`v4.2.14`](https://togithub.com/getmoto/moto/blob/HEAD/CHANGELOG.md#4214)
[Compare
Source](https://togithub.com/getmoto/moto/compare/4.2.13...4.2.14)
Docker Digest for 4.2.14:
*sha256:2fa10aa48e32f85c63c62a7d437b8a4b320a56a8494bc25d45ced370bc159c23*
New Services:
* Backup:
* create_backup_plan()
* create_backup_vault()
* get_backup_plan()
* describe_backup_vault()
* delete_backup_plan()
* list_backup_plans()
* list_backup_vaults()
* list_tags()
* tag_resource()
* untag_resource()
New Methods:
* RDS:
* describe_db_cluster_snapshot_attributes()
* describe_db_snapshot_attributes()
* modify_db_cluster_snapshot_attribute()
* modify_db_snapshot_attribute()
* restore_db_instance_to_point_in_time()
* SageMaker:
* create_feature_group()
* SageMakerRuntime:
* invoke_endpoint_async()
Miscellaneous:
* Cognito: The ID-token now contains custom attributes
* DynamoDB: query() now returns the correct ScannedCount
* EC2: Security Group Rules now have tag support
* LakeFormation: grant_permissions() now has better support for known
principal-resource pairs
* SNS: set_subscription_attributes() can now unset the FilterPolicy
###
[`v4.2.13`](https://togithub.com/getmoto/moto/blob/HEAD/CHANGELOG.md#4213)
[Compare
Source](https://togithub.com/getmoto/moto/compare/4.2.12...4.2.13)
Docker Digest for 4.2.13:
*sha256:20a2fdd4828b0ce1170ae26186ed28b64523cf6af83af892a74d9b3e23f84471*
New Services:
* Panorama:
* delete_device()
* describe_device()
* list_devices()
* provision_device()
* update_device_metadata()
New Methods:
* CognitoIDP:
* admin_respond_to_auth_challenge()
* IdentityStore:
* list_group_memberships_for_member()
* Rekognition:
* compare_faces()
* detect_labels()
* detect_text()
* SSO-Admin:
* attach_customer_managed_policy_reference_to_permission_set()
* attach_managed_policy_to_permission_set()
* delete_inline_policy_from_permission_set()
* detach_customer_managed_policy_reference_from_permission_set()
* detach_managed_policy_from_permission_set()
* get_inline_policy_for_permission_set()
* list_account_assignments_for_principal()
* list_customer_managed_policy_references_in_permission_set()
* list_managed_policies_in_permission_set()
* put_inline_policy_to_permission_set()
* Textract:
* detect_document_text()
Miscellaneous:
* ACM: describe_certificate() now returns a DomainValidationOption for
each SN
* CloudFormation: create_change_set() now longer throws an exception
when supplying a YAML TemplateBody
* CognitoIDP: create_resource_server() no longer crashes when the
scope-parameter is not provided
* DynamoDB: scan() now correctly handles the ScanFilter-attribute again
(broken in 4.2.11)
* EC2: launch templates created by CloudFormation now have a generated
name if not provided
* EC2: describe_instance_types() now handles unknown values for
EnaSupport correctly
* Sagemaker: create_model_package() nown supports Versioned packages
* Scheduler: delete_scheduler() now throws the correct exception when a
Schedule does not exist
* SSO-Admin: list_account_assignments() now supports pagination
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/jooola/earhorn).
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jo
---
poetry.lock | 44 ++++++++++++++-------------------
pyproject.toml | 2 +-
tests/stream_archive_s3_test.py | 4 +--
3 files changed, 22 insertions(+), 28 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index fa726eb..bd1e8bc 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1347,50 +1347,44 @@ files = [
[[package]]
name = "moto"
-version = "4.2.12"
+version = "5.0.2"
description = ""
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "moto-4.2.12-py2.py3-none-any.whl", hash = "sha256:bdcad46e066a55b7d308a786e5dca863b3cba04c6239c6974135a48d1198b3ab"},
- {file = "moto-4.2.12.tar.gz", hash = "sha256:7c4d37f47becb4a0526b64df54484e988c10fde26861fc3b5c065bc78800cb59"},
+ {file = "moto-5.0.2-py2.py3-none-any.whl", hash = "sha256:71bb832a18b64f10fc4cec117b9b0e2305e5831d9a17eb74f6b9819ed7613843"},
+ {file = "moto-5.0.2.tar.gz", hash = "sha256:7e27395e5c63ff9554ae14b5baa41bfe6d6b1be0e59eb02977c6ce28411246de"},
]
[package.dependencies]
boto3 = ">=1.9.201"
-botocore = ">=1.12.201"
+botocore = ">=1.14.0"
cryptography = ">=3.3.1"
Jinja2 = ">=2.10.1"
python-dateutil = ">=2.1,<3.0.0"
requests = ">=2.5"
-responses = ">=0.13.0"
+responses = ">=0.15.0"
werkzeug = ">=0.5,<2.2.0 || >2.2.0,<2.2.1 || >2.2.1"
xmltodict = "*"
[package.extras]
-all = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "ecdsa (!=0.15)", "graphql-core", "jsondiff (>=1.1.2)", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.0)", "pyparsing (>=3.0.7)", "python-jose[cryptography] (>=3.1.0,<4.0.0)", "setuptools", "sshpubkeys (>=3.1.0)"]
-apigateway = ["PyYAML (>=5.1)", "ecdsa (!=0.15)", "openapi-spec-validator (>=0.5.0)", "python-jose[cryptography] (>=3.1.0,<4.0.0)"]
-apigatewayv2 = ["PyYAML (>=5.1)"]
+all = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.1)", "pyparsing (>=3.0.7)", "setuptools"]
+apigateway = ["PyYAML (>=5.1)", "joserfc (>=0.9.0)", "openapi-spec-validator (>=0.5.0)"]
+apigatewayv2 = ["PyYAML (>=5.1)", "openapi-spec-validator (>=0.5.0)"]
appsync = ["graphql-core"]
awslambda = ["docker (>=3.0.0)"]
batch = ["docker (>=3.0.0)"]
-cloudformation = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "ecdsa (!=0.15)", "graphql-core", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.0)", "pyparsing (>=3.0.7)", "python-jose[cryptography] (>=3.1.0,<4.0.0)", "setuptools", "sshpubkeys (>=3.1.0)"]
-cognitoidp = ["ecdsa (!=0.15)", "python-jose[cryptography] (>=3.1.0,<4.0.0)"]
-ds = ["sshpubkeys (>=3.1.0)"]
-dynamodb = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.0)"]
-dynamodbstreams = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.0)"]
-ebs = ["sshpubkeys (>=3.1.0)"]
-ec2 = ["sshpubkeys (>=3.1.0)"]
-efs = ["sshpubkeys (>=3.1.0)"]
-eks = ["sshpubkeys (>=3.1.0)"]
+cloudformation = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.1)", "pyparsing (>=3.0.7)", "setuptools"]
+cognitoidp = ["joserfc (>=0.9.0)"]
+dynamodb = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.1)"]
+dynamodbstreams = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.1)"]
glue = ["pyparsing (>=3.0.7)"]
iotdata = ["jsondiff (>=1.1.2)"]
-proxy = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=2.5.1)", "ecdsa (!=0.15)", "graphql-core", "jsondiff (>=1.1.2)", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.0)", "pyparsing (>=3.0.7)", "python-jose[cryptography] (>=3.1.0,<4.0.0)", "setuptools", "sshpubkeys (>=3.1.0)"]
-resourcegroupstaggingapi = ["PyYAML (>=5.1)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "ecdsa (!=0.15)", "graphql-core", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.0)", "pyparsing (>=3.0.7)", "python-jose[cryptography] (>=3.1.0,<4.0.0)", "sshpubkeys (>=3.1.0)"]
-route53resolver = ["sshpubkeys (>=3.1.0)"]
-s3 = ["PyYAML (>=5.1)", "py-partiql-parser (==0.5.0)"]
-s3crc32c = ["PyYAML (>=5.1)", "crc32c", "py-partiql-parser (==0.5.0)"]
-server = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "ecdsa (!=0.15)", "flask (!=2.2.0,!=2.2.1)", "flask-cors", "graphql-core", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.0)", "pyparsing (>=3.0.7)", "python-jose[cryptography] (>=3.1.0,<4.0.0)", "setuptools", "sshpubkeys (>=3.1.0)"]
+proxy = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=2.5.1)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.1)", "pyparsing (>=3.0.7)", "setuptools"]
+resourcegroupstaggingapi = ["PyYAML (>=5.1)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.1)", "pyparsing (>=3.0.7)"]
+s3 = ["PyYAML (>=5.1)", "py-partiql-parser (==0.5.1)"]
+s3crc32c = ["PyYAML (>=5.1)", "crc32c", "py-partiql-parser (==0.5.1)"]
+server = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "flask (!=2.2.0,!=2.2.1)", "flask-cors", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.1)", "pyparsing (>=3.0.7)", "setuptools"]
ssm = ["PyYAML (>=5.1)"]
xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"]
@@ -2337,4 +2331,4 @@ sentry = ["sentry-sdk"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.9"
-content-hash = "29946eff68525210bf77acda065986a98704c3000eba253ab852f5171bf14452"
+content-hash = "d013a0de7e62bfe9478ea54f3831c2bee8586dda52aba2cac3358e32e3c52aa2"
diff --git a/pyproject.toml b/pyproject.toml
index 47e7be7..2d43bc2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -41,7 +41,7 @@ black = "^24.2"
flake8 = "^7.0.0"
isort = "^5.9.3"
lxml-stubs = "^0.5.0"
-moto = "^4.0.0"
+moto = "^5.0.0"
mypy = "^1.0"
pylint = "^3.0.0"
pytest = "^8.0.0"
diff --git a/tests/stream_archive_s3_test.py b/tests/stream_archive_s3_test.py
index 111de05..489a563 100644
--- a/tests/stream_archive_s3_test.py
+++ b/tests/stream_archive_s3_test.py
@@ -1,12 +1,12 @@
from pathlib import Path
import boto3
-from moto import mock_s3 # type: ignore
+from moto import mock_aws
from earhorn.stream_archive_s3 import S3ArchiveStorage
-@mock_s3
+@mock_aws
def test_s3_archive_storage_ingest_segment(tmp_path: Path):
tmp_segment = tmp_path / "somefile.txt"
tmp_segment.write_text("test")