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/03/13 16:54:15 UTC
[airflow] branch main updated: Skip some tests for Databricks from running on Python 3.10 (#22221)
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 af9d85c Skip some tests for Databricks from running on Python 3.10 (#22221)
af9d85c is described below
commit af9d85ccd8abdc3c252c19764d3ea16970ae0f20
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Mar 13 17:53:20 2022 +0100
Skip some tests for Databricks from running on Python 3.10 (#22221)
This is a temporary measure until the Databricks SQL library
is released in Python 3.10 - compatible version.
Related to: #22220
---
airflow/providers/databricks/provider.yaml | 3 +++
tests/providers/databricks/operators/test_databricks_sql.py | 8 +++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/airflow/providers/databricks/provider.yaml b/airflow/providers/databricks/provider.yaml
index c4a2aec..2bf7f99 100644
--- a/airflow/providers/databricks/provider.yaml
+++ b/airflow/providers/databricks/provider.yaml
@@ -34,6 +34,9 @@ versions:
additional-dependencies:
- apache-airflow>=2.1.0
+excluded-python-versions:
+ - "3.10"
+
integrations:
- integration-name: Databricks
external-doc-url: https://databricks.com/
diff --git a/tests/providers/databricks/operators/test_databricks_sql.py b/tests/providers/databricks/operators/test_databricks_sql.py
index 6b9fb43..08e24d72 100644
--- a/tests/providers/databricks/operators/test_databricks_sql.py
+++ b/tests/providers/databricks/operators/test_databricks_sql.py
@@ -24,7 +24,7 @@ from unittest import mock
import pytest
from databricks.sql.types import Row
-from airflow import AirflowException
+from airflow import PY310, AirflowException
from airflow.providers.databricks.operators.databricks_sql import (
DatabricksCopyIntoOperator,
DatabricksSqlOperator,
@@ -83,6 +83,12 @@ class TestDatabricksSqlOperator(unittest.TestCase):
db_mock.run.assert_called_once_with(sql, parameters=None)
+@pytest.mark.skipif(
+ PY310,
+ reason="Databricks SQL tests not run on Python 3.10 because there is direct Iterable import from"
+ " collections in the databricks SQL library, where it should be imported from collections.abc."
+ " This could be removed when https://github.com/apache/airflow/issues/22220 is solved",
+)
class TestDatabricksSqlCopyIntoOperator(unittest.TestCase):
def test_copy_with_files(self):
op = DatabricksCopyIntoOperator(