Skip to content

Commit 8054871

Browse files
Fix connect() docstring: update Raises to ProgrammingError, add s3_staging_dir="" docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9a87f40 commit 8054871

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pyathena/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def connect(*args, **kwargs) -> "Connection[Any]":
8585
Args:
8686
s3_staging_dir: S3 location to store query results. Required if not
8787
using workgroups or if the workgroup doesn't have a result location.
88+
Pass an empty string to explicitly disable S3 staging and skip
89+
the ``AWS_ATHENA_S3_STAGING_DIR`` environment variable fallback
90+
(required for workgroups with managed query result storage).
8891
region_name: AWS region name. If not specified, uses the default region
8992
from your AWS configuration.
9093
schema_name: Athena database/schema name. Defaults to "default".
@@ -109,7 +112,7 @@ def connect(*args, **kwargs) -> "Connection[Any]":
109112
A Connection object that can be used to create cursors and execute queries.
110113
111114
Raises:
112-
AssertionError: If neither s3_staging_dir nor work_group is provided.
115+
ProgrammingError: If neither s3_staging_dir nor work_group is provided.
113116
114117
Example:
115118
>>> import pyathena

0 commit comments

Comments
 (0)