Skip to content

Commit 86bf81e

Browse files
john-bodleyphilipher29
authored andcommitted
fix(hive): Workaround for Python 3.9 s3 transfer issue (apache#19887)
* fix(hive): Workaround for Python 3.9 s3 transfer issue * Update hive.py
1 parent c440da2 commit 86bf81e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

superset/db_engine_specs/hive.py

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def upload_to_s3(filename: str, upload_prefix: str, table: Table) -> str:
6565

6666
# pylint: disable=import-outside-toplevel
6767
import boto3
68+
from boto3.s3.transfer import TransferConfig
6869

6970
bucket_path = current_app.config["CSV_TO_HIVE_UPLOAD_S3_BUCKET"]
7071

@@ -80,6 +81,7 @@ def upload_to_s3(filename: str, upload_prefix: str, table: Table) -> str:
8081
filename,
8182
bucket_path,
8283
os.path.join(upload_prefix, table.table, os.path.basename(filename)),
84+
Config=TransferConfig(use_threads=False), # Threading is broken in Python 3.9.
8385
)
8486
return location
8587

0 commit comments

Comments
 (0)