You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/04/24 15:33:48 UTC

[airflow] branch main updated: Fix main failure after moto upgrade (#23200)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new f3f07574a6 Fix main failure after moto upgrade (#23200)
f3f07574a6 is described below

commit f3f07574a61482fc9ca20e54fba594d3ceae72ef
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Sun Apr 24 17:33:42 2022 +0200

    Fix main failure after moto upgrade (#23200)
    
    The moto library 3.1.6 extracted MotoAPI to dedicated module
    (How about SemVer?).
    
    https://github.com/spulec/moto/pull/5055
    
    This broke our S3/CloudWatch tests.
    
    This PR bumps minimum version of Moto to 3.1.6 and switches to
    the new module when importing the API.
---
 setup.py                                                       | 2 +-
 tests/providers/amazon/aws/log/test_cloudwatch_task_handler.py | 2 +-
 tests/providers/amazon/aws/log/test_s3_task_handler.py         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index ca6124e35d..111042f14f 100644
--- a/setup.py
+++ b/setup.py
@@ -629,7 +629,7 @@ devel_only = [
     'jira',
     'jsondiff',
     'mongomock',
-    'moto[glue]>=3.1.0',
+    'moto[glue]>=3.1.6',
     'parameterized',
     'paramiko',
     'pipdeptree',
diff --git a/tests/providers/amazon/aws/log/test_cloudwatch_task_handler.py b/tests/providers/amazon/aws/log/test_cloudwatch_task_handler.py
index e3c7099daf..dbd2ae28d5 100644
--- a/tests/providers/amazon/aws/log/test_cloudwatch_task_handler.py
+++ b/tests/providers/amazon/aws/log/test_cloudwatch_task_handler.py
@@ -75,7 +75,7 @@ class TestCloudwatchTaskHandler(unittest.TestCase):
             ':', '_'
         )
 
-        moto.core.moto_api_backend.reset()
+        moto.moto_api._internal.models.moto_api_backend.reset()
         self.conn = boto3.client('logs', region_name=self.region_name)
 
     def tearDown(self):
diff --git a/tests/providers/amazon/aws/log/test_s3_task_handler.py b/tests/providers/amazon/aws/log/test_s3_task_handler.py
index 147f52912f..a322f167ec 100644
--- a/tests/providers/amazon/aws/log/test_s3_task_handler.py
+++ b/tests/providers/amazon/aws/log/test_s3_task_handler.py
@@ -70,7 +70,7 @@ class TestS3TaskHandler(unittest.TestCase):
         self.conn = boto3.client('s3')
         # We need to create the bucket since this is all in Moto's 'virtual'
         # AWS account
-        moto.core.moto_api_backend.reset()
+        moto.moto_api._internal.models.moto_api_backend.reset()
         self.conn.create_bucket(Bucket="bucket")
 
     def tearDown(self):