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 d576c72c20 Limit moto to version below 5.0.0 (#37054)
d576c72c20 is described below

commit d576c72c20258e4ad56bbbec05ffac5a3e07207e
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Jan 28 11:23:20 2024 +0100

    Limit moto to version below 5.0.0 (#37054)
    
    Moto 5 replaced all decorators with single mock_aws decorator and we need to
    Replace the usage of mock decorators in our tests to be able to use moto 5
    Related: #37053
---
 airflow/providers/amazon/provider.yaml | 5 ++++-
 generated/provider_dependencies.json   | 2 +-
 pyproject.toml                         | 4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/airflow/providers/amazon/provider.yaml 
b/airflow/providers/amazon/provider.yaml
index 65603f1098..981890661c 100644
--- a/airflow/providers/amazon/provider.yaml
+++ b/airflow/providers/amazon/provider.yaml
@@ -118,7 +118,10 @@ additional-extras:
 devel-dependencies:
   - aiobotocore>=2.7.0
   - aws_xray_sdk>=2.12.0
-  - moto[cloudformation,glue]>=4.2.12
+  # Moto 5 replaced all decorators with single mock_aws decorator and we need 
to
+  # Replace the usage of mock decorators in our tests to be able to use moto 5
+  # See https://github.com/apache/airflow/issues/37053
+  - moto[cloudformation,glue]>=4.2.12,<5.0.0
   - mypy-boto3-appflow>=1.33.0
   - mypy-boto3-rds>=1.33.0
   - mypy-boto3-redshift-data>=1.33.0
diff --git a/generated/provider_dependencies.json 
b/generated/provider_dependencies.json
index 4d369c2186..933feca19a 100644
--- a/generated/provider_dependencies.json
+++ b/generated/provider_dependencies.json
@@ -41,7 +41,7 @@
     "devel-deps": [
       "aiobotocore>=2.7.0",
       "aws_xray_sdk>=2.12.0",
-      "moto[cloudformation,glue]>=4.2.12",
+      "moto[cloudformation,glue]>=4.2.12,<5.0.0",
       "mypy-boto3-appflow>=1.33.0",
       "mypy-boto3-rds>=1.33.0",
       "mypy-boto3-redshift-data>=1.33.0",
diff --git a/pyproject.toml b/pyproject.toml
index 43cb43107a..a84b4af06f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -533,6 +533,7 @@ alibaba = [
   "oss2>=2.14.0",
 ]
 amazon = [
+  "PyAthena>=3.0.10",
   "apache-airflow[common_sql]",
   "apache-airflow[http]",
   "asgiref",
@@ -546,13 +547,12 @@ amazon = [
   # Devel dependencies for the amazon provider
   "aiobotocore>=2.7.0",
   "aws_xray_sdk>=2.12.0",
-  "moto[cloudformation,glue]>=4.2.12",
+  "moto[cloudformation,glue]>=4.2.12,<5.0.0",
   "mypy-boto3-appflow>=1.33.0",
   "mypy-boto3-rds>=1.33.0",
   "mypy-boto3-redshift-data>=1.33.0",
   "mypy-boto3-s3>=1.33.0",
   "s3fs>=2023.10.0",
-  "PyAthena>=3.0.10",
 ]
 apache-beam = [
   "apache-beam>=2.53.0",

Reply via email to