PyAthena 3.30.1__tar.gz → 3.31.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyathena-3.30.1 → pyathena-3.31.1}/PKG-INFO +8 -8
- {pyathena-3.30.1 → pyathena-3.31.1}/README.md +5 -5
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/_version.py +2 -2
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/filesystem/s3.py +9 -2
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/model.py +50 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyproject.toml +5 -5
- {pyathena-3.30.1 → pyathena-3.31.1}/.gitignore +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/LICENSE +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/arrow/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/arrow/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/common.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/connection.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/pandas/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/pandas/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/polars/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/polars/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/result_set.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/s3fs/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/s3fs/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/spark/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/spark/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/arrow.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/base.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/pandas.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/polars.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/rest.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/s3fs.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/aio/util.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/arrow/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/arrow/async_cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/arrow/converter.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/arrow/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/arrow/result_set.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/arrow/util.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/async_cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/common.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/connection.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/converter.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/error.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/filesystem/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/filesystem/s3_async.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/filesystem/s3_executor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/filesystem/s3_object.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/formatter.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/pandas/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/pandas/async_cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/pandas/converter.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/pandas/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/pandas/result_set.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/pandas/util.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/parser.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/polars/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/polars/async_cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/polars/converter.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/polars/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/polars/result_set.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/polars/util.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/py.typed +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/result_set.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/s3fs/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/s3fs/async_cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/s3fs/converter.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/s3fs/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/s3fs/reader.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/s3fs/result_set.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/spark/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/spark/async_cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/spark/common.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/spark/cursor.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/__init__.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/arrow.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/base.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/compiler.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/constants.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/pandas.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/polars.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/preparer.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/requirements.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/rest.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/s3fs.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/types.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/sqlalchemy/util.py +0 -0
- {pyathena-3.30.1 → pyathena-3.31.1}/pyathena/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyAthena
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.31.1
|
|
4
4
|
Summary: Python DB API 2.0 (PEP 249) client for Amazon Athena
|
|
5
5
|
Project-URL: homepage, https://github.com/pyathena-dev/PyAthena/
|
|
6
6
|
Project-URL: repository, https://github.com/pyathena-dev/PyAthena/
|
|
@@ -38,8 +38,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
38
38
|
Classifier: Programming Language :: Python :: 3.14
|
|
39
39
|
Classifier: Topic :: Database :: Front-Ends
|
|
40
40
|
Requires-Python: >=3.10
|
|
41
|
-
Requires-Dist: boto3>=1.
|
|
42
|
-
Requires-Dist: botocore>=1.
|
|
41
|
+
Requires-Dist: boto3>=1.38.2
|
|
42
|
+
Requires-Dist: botocore>=1.41.2
|
|
43
43
|
Requires-Dist: fsspec
|
|
44
44
|
Requires-Dist: python-dateutil
|
|
45
45
|
Requires-Dist: tenacity>=4.1.0
|
|
@@ -80,7 +80,7 @@ PyAthena is a Python [DB API 2.0 (PEP 249)](https://www.python.org/dev/peps/pep-
|
|
|
80
80
|
|
|
81
81
|
## Requirements
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
- Python
|
|
84
84
|
|
|
85
85
|
- CPython 3.10, 3.11, 3.12, 3.13, 3.14
|
|
86
86
|
|
|
@@ -136,10 +136,10 @@ Many of the implementations in this library are based on [PyHive](https://github
|
|
|
136
136
|
|
|
137
137
|
## Links
|
|
138
138
|
|
|
139
|
-
- Documentation: https://pyathena.dev
|
|
140
|
-
- PyPI Releases: https://pypi.org/project/PyAthena
|
|
141
|
-
- Source Code: https://github.com/pyathena-dev/PyAthena
|
|
142
|
-
- Issue Tracker: https://github.com/pyathena-dev/PyAthena/issues
|
|
139
|
+
- Documentation: <https://pyathena.dev/>
|
|
140
|
+
- PyPI Releases: <https://pypi.org/project/PyAthena/>
|
|
141
|
+
- Source Code: <https://github.com/pyathena-dev/PyAthena/>
|
|
142
|
+
- Issue Tracker: <https://github.com/pyathena-dev/PyAthena/issues>
|
|
143
143
|
|
|
144
144
|
## Logo
|
|
145
145
|
|
|
@@ -21,7 +21,7 @@ PyAthena is a Python [DB API 2.0 (PEP 249)](https://www.python.org/dev/peps/pep-
|
|
|
21
21
|
|
|
22
22
|
## Requirements
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
- Python
|
|
25
25
|
|
|
26
26
|
- CPython 3.10, 3.11, 3.12, 3.13, 3.14
|
|
27
27
|
|
|
@@ -77,10 +77,10 @@ Many of the implementations in this library are based on [PyHive](https://github
|
|
|
77
77
|
|
|
78
78
|
## Links
|
|
79
79
|
|
|
80
|
-
- Documentation: https://pyathena.dev
|
|
81
|
-
- PyPI Releases: https://pypi.org/project/PyAthena
|
|
82
|
-
- Source Code: https://github.com/pyathena-dev/PyAthena
|
|
83
|
-
- Issue Tracker: https://github.com/pyathena-dev/PyAthena/issues
|
|
80
|
+
- Documentation: <https://pyathena.dev/>
|
|
81
|
+
- PyPI Releases: <https://pypi.org/project/PyAthena/>
|
|
82
|
+
- Source Code: <https://github.com/pyathena-dev/PyAthena/>
|
|
83
|
+
- Issue Tracker: <https://github.com/pyathena-dev/PyAthena/issues>
|
|
84
84
|
|
|
85
85
|
## Logo
|
|
86
86
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '3.
|
|
22
|
-
__version_tuple__ = version_tuple = (3,
|
|
21
|
+
__version__ = version = '3.31.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (3, 31, 1)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -1409,11 +1409,18 @@ class S3File(AbstractBufferedFile):
|
|
|
1409
1409
|
)
|
|
1410
1410
|
|
|
1411
1411
|
def _upload_chunk(self, final: bool = False) -> bool:
|
|
1412
|
+
# The return value controls whether fsspec's flush() resets self.buffer
|
|
1413
|
+
# afterwards: it does so only when this returns a value other than False.
|
|
1414
|
+
# Returning ``not final`` keeps the buffer intact on the final flush so a
|
|
1415
|
+
# deferred commit() (autocommit=False, i.e. inside an fsspec transaction)
|
|
1416
|
+
# can still read the bytes; resetting it there would upload an empty
|
|
1417
|
+
# object for small files. Mid-stream chunks (final=False) return True so
|
|
1418
|
+
# fsspec clears the already-uploaded buffer between parts.
|
|
1412
1419
|
if self.tell() < self.blocksize:
|
|
1413
1420
|
# Files smaller than block size in size cannot be multipart uploaded.
|
|
1414
1421
|
if self.autocommit and final:
|
|
1415
1422
|
self.commit()
|
|
1416
|
-
return
|
|
1423
|
+
return not final
|
|
1417
1424
|
|
|
1418
1425
|
if not self.multipart_upload:
|
|
1419
1426
|
raise RuntimeError("Multipart upload is not initialized.")
|
|
@@ -1456,7 +1463,7 @@ class S3File(AbstractBufferedFile):
|
|
|
1456
1463
|
|
|
1457
1464
|
if self.autocommit and final:
|
|
1458
1465
|
self.commit()
|
|
1459
|
-
return
|
|
1466
|
+
return not final
|
|
1460
1467
|
|
|
1461
1468
|
def commit(self) -> None:
|
|
1462
1469
|
if self.tell() == 0:
|
|
@@ -111,9 +111,13 @@ class AthenaQueryExecution:
|
|
|
111
111
|
self._query_planning_time_in_millis: int | None = statistics.get(
|
|
112
112
|
"QueryPlanningTimeInMillis", None
|
|
113
113
|
)
|
|
114
|
+
self._service_pre_processing_time_in_millis: int | None = statistics.get(
|
|
115
|
+
"ServicePreProcessingTimeInMillis", None
|
|
116
|
+
)
|
|
114
117
|
self._service_processing_time_in_millis: int | None = statistics.get(
|
|
115
118
|
"ServiceProcessingTimeInMillis", None
|
|
116
119
|
)
|
|
120
|
+
self._dpu_count: float | None = statistics.get("DpuCount")
|
|
117
121
|
self._data_manifest_location: str | None = statistics.get("DataManifestLocation")
|
|
118
122
|
reuse_info = statistics.get("ResultReuseInformation", {})
|
|
119
123
|
self._reused_previous_result: bool | None = reuse_info.get("ReusedPreviousResult")
|
|
@@ -127,6 +131,24 @@ class AthenaQueryExecution:
|
|
|
127
131
|
acl_conf = result_conf.get("AclConfiguration", {})
|
|
128
132
|
self._s3_acl_option: str | None = acl_conf.get("S3AclOption")
|
|
129
133
|
|
|
134
|
+
managed_results_conf = query_execution.get("ManagedQueryResultsConfiguration", {})
|
|
135
|
+
self._managed_query_results_enabled: bool | None = managed_results_conf.get("Enabled")
|
|
136
|
+
managed_results_encryption_conf = managed_results_conf.get("EncryptionConfiguration", {})
|
|
137
|
+
self._managed_query_results_kms_key: str | None = managed_results_encryption_conf.get(
|
|
138
|
+
"KmsKey"
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
s3_access_grants_conf = query_execution.get("QueryResultsS3AccessGrantsConfiguration", {})
|
|
142
|
+
self._enable_s3_access_grants: bool | None = s3_access_grants_conf.get(
|
|
143
|
+
"EnableS3AccessGrants"
|
|
144
|
+
)
|
|
145
|
+
self._create_user_level_prefix: bool | None = s3_access_grants_conf.get(
|
|
146
|
+
"CreateUserLevelPrefix"
|
|
147
|
+
)
|
|
148
|
+
self._s3_access_grants_authentication_type: str | None = s3_access_grants_conf.get(
|
|
149
|
+
"AuthenticationType"
|
|
150
|
+
)
|
|
151
|
+
|
|
130
152
|
engine_version = query_execution.get("EngineVersion", {})
|
|
131
153
|
self._selected_engine_version: str | None = engine_version.get(
|
|
132
154
|
"SelectedEngineVersion", None
|
|
@@ -224,10 +246,18 @@ class AthenaQueryExecution:
|
|
|
224
246
|
def query_planning_time_in_millis(self) -> int | None:
|
|
225
247
|
return self._query_planning_time_in_millis
|
|
226
248
|
|
|
249
|
+
@property
|
|
250
|
+
def service_pre_processing_time_in_millis(self) -> int | None:
|
|
251
|
+
return self._service_pre_processing_time_in_millis
|
|
252
|
+
|
|
227
253
|
@property
|
|
228
254
|
def service_processing_time_in_millis(self) -> int | None:
|
|
229
255
|
return self._service_processing_time_in_millis
|
|
230
256
|
|
|
257
|
+
@property
|
|
258
|
+
def dpu_count(self) -> float | None:
|
|
259
|
+
return self._dpu_count
|
|
260
|
+
|
|
231
261
|
@property
|
|
232
262
|
def output_location(self) -> str | None:
|
|
233
263
|
return self._output_location
|
|
@@ -272,6 +302,26 @@ class AthenaQueryExecution:
|
|
|
272
302
|
def result_reuse_minutes(self) -> int | None:
|
|
273
303
|
return self._result_reuse_minutes
|
|
274
304
|
|
|
305
|
+
@property
|
|
306
|
+
def managed_query_results_enabled(self) -> bool | None:
|
|
307
|
+
return self._managed_query_results_enabled
|
|
308
|
+
|
|
309
|
+
@property
|
|
310
|
+
def managed_query_results_kms_key(self) -> str | None:
|
|
311
|
+
return self._managed_query_results_kms_key
|
|
312
|
+
|
|
313
|
+
@property
|
|
314
|
+
def enable_s3_access_grants(self) -> bool | None:
|
|
315
|
+
return self._enable_s3_access_grants
|
|
316
|
+
|
|
317
|
+
@property
|
|
318
|
+
def create_user_level_prefix(self) -> bool | None:
|
|
319
|
+
return self._create_user_level_prefix
|
|
320
|
+
|
|
321
|
+
@property
|
|
322
|
+
def s3_access_grants_authentication_type(self) -> str | None:
|
|
323
|
+
return self._s3_access_grants_authentication_type
|
|
324
|
+
|
|
275
325
|
|
|
276
326
|
class AthenaCalculationExecutionStatus:
|
|
277
327
|
"""Status information for an Athena calculation execution.
|
|
@@ -5,8 +5,8 @@ authors = [
|
|
|
5
5
|
{name = "laughingman7743", email = "laughingman7743@gmail.com"},
|
|
6
6
|
]
|
|
7
7
|
dependencies = [
|
|
8
|
-
"boto3>=1.
|
|
9
|
-
"botocore>=1.
|
|
8
|
+
"boto3>=1.38.2",
|
|
9
|
+
"botocore>=1.41.2",
|
|
10
10
|
"tenacity>=4.1.0",
|
|
11
11
|
"fsspec",
|
|
12
12
|
"python-dateutil",
|
|
@@ -226,9 +226,9 @@ allowlist_externals =
|
|
|
226
226
|
make
|
|
227
227
|
commands =
|
|
228
228
|
uv sync --group dev
|
|
229
|
-
pyathena: make test
|
|
230
|
-
sqla: make test
|
|
231
|
-
sqla_async: make test
|
|
229
|
+
pyathena: make test/pyathena
|
|
230
|
+
sqla: make test/sqla
|
|
231
|
+
sqla_async: make test/sqla-async
|
|
232
232
|
passenv =
|
|
233
233
|
TOXENV
|
|
234
234
|
AWS_*
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|