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 2026/09/20 16:40:02 UTC
(airflow) branch main updated: Fix DataFusion storage-type error message on Python 3.11+ (#73413)
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 471b82e12f7 Fix DataFusion storage-type error message on Python 3.11+ (#73413)
471b82e12f7 is described below
commit 471b82e12f7c64bfd85385fa879d60ebf36bf3d3
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Sep 20 18:39:54 2026 +0200
Fix DataFusion storage-type error message on Python 3.11+ (#73413)
The scheduled CI run on main fails the common.sql datafusion object
storage tests on Python 3.11 through 3.14. `StorageType` is a
`str, Enum` mixin, and starting with Python 3.11 `Enum.__format__`
renders such members as `StorageType.GCS` instead of `gcs`, so the
"connection_config must be provided" messages no longer name the
storage type users configure. The PR that introduced the f-strings
only ran on the default Python 3.10, where the value is rendered.
Generated-by: Claude Opus 5
---
.../providers/common/sql/datafusion/object_storage_provider.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/providers/common/sql/src/airflow/providers/common/sql/datafusion/object_storage_provider.py b/providers/common/sql/src/airflow/providers/common/sql/datafusion/object_storage_provider.py
index c71c6340167..73b70079a84 100644
--- a/providers/common/sql/src/airflow/providers/common/sql/datafusion/object_storage_provider.py
+++ b/providers/common/sql/src/airflow/providers/common/sql/datafusion/object_storage_provider.py
@@ -38,7 +38,7 @@ class S3ObjectStorageProvider(ObjectStorageProvider):
def create_object_store(self, path: str, connection_config: ConnectionConfig | None = None):
"""Create an S3 object store using DataFusion's AmazonS3."""
if connection_config is None:
- raise ValueError(f"connection_config must be provided for {self.get_storage_type}")
+ raise ValueError(f"connection_config must be provided for {self.get_storage_type.value}")
try:
credentials = connection_config.credentials
@@ -68,7 +68,7 @@ class GCSObjectStorageProvider(ObjectStorageProvider):
def create_object_store(self, path: str, connection_config: ConnectionConfig | None = None):
"""Create a GCS object store using DataFusion's GoogleCloud."""
if connection_config is None:
- raise ValueError(f"connection_config must be provided for {self.get_storage_type}")
+ raise ValueError(f"connection_config must be provided for {self.get_storage_type.value}")
credentials = connection_config.credentials
key_path = credentials.get("key_path")