PyAthena 3.31.0__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.
Files changed (88) hide show
  1. {pyathena-3.31.0 → pyathena-3.31.1}/PKG-INFO +1 -1
  2. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/_version.py +2 -2
  3. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/filesystem/s3.py +9 -2
  4. {pyathena-3.31.0 → pyathena-3.31.1}/.gitignore +0 -0
  5. {pyathena-3.31.0 → pyathena-3.31.1}/LICENSE +0 -0
  6. {pyathena-3.31.0 → pyathena-3.31.1}/README.md +0 -0
  7. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/__init__.py +0 -0
  8. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/__init__.py +0 -0
  9. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/arrow/__init__.py +0 -0
  10. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/arrow/cursor.py +0 -0
  11. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/common.py +0 -0
  12. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/connection.py +0 -0
  13. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/cursor.py +0 -0
  14. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/pandas/__init__.py +0 -0
  15. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/pandas/cursor.py +0 -0
  16. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/polars/__init__.py +0 -0
  17. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/polars/cursor.py +0 -0
  18. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/result_set.py +0 -0
  19. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/s3fs/__init__.py +0 -0
  20. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/s3fs/cursor.py +0 -0
  21. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/spark/__init__.py +0 -0
  22. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/spark/cursor.py +0 -0
  23. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/__init__.py +0 -0
  24. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/arrow.py +0 -0
  25. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/base.py +0 -0
  26. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/pandas.py +0 -0
  27. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/polars.py +0 -0
  28. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/rest.py +0 -0
  29. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/sqlalchemy/s3fs.py +0 -0
  30. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/aio/util.py +0 -0
  31. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/arrow/__init__.py +0 -0
  32. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/arrow/async_cursor.py +0 -0
  33. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/arrow/converter.py +0 -0
  34. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/arrow/cursor.py +0 -0
  35. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/arrow/result_set.py +0 -0
  36. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/arrow/util.py +0 -0
  37. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/async_cursor.py +0 -0
  38. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/common.py +0 -0
  39. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/connection.py +0 -0
  40. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/converter.py +0 -0
  41. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/cursor.py +0 -0
  42. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/error.py +0 -0
  43. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/filesystem/__init__.py +0 -0
  44. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/filesystem/s3_async.py +0 -0
  45. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/filesystem/s3_executor.py +0 -0
  46. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/filesystem/s3_object.py +0 -0
  47. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/formatter.py +0 -0
  48. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/model.py +0 -0
  49. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/pandas/__init__.py +0 -0
  50. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/pandas/async_cursor.py +0 -0
  51. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/pandas/converter.py +0 -0
  52. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/pandas/cursor.py +0 -0
  53. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/pandas/result_set.py +0 -0
  54. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/pandas/util.py +0 -0
  55. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/parser.py +0 -0
  56. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/polars/__init__.py +0 -0
  57. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/polars/async_cursor.py +0 -0
  58. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/polars/converter.py +0 -0
  59. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/polars/cursor.py +0 -0
  60. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/polars/result_set.py +0 -0
  61. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/polars/util.py +0 -0
  62. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/py.typed +0 -0
  63. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/result_set.py +0 -0
  64. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/s3fs/__init__.py +0 -0
  65. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/s3fs/async_cursor.py +0 -0
  66. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/s3fs/converter.py +0 -0
  67. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/s3fs/cursor.py +0 -0
  68. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/s3fs/reader.py +0 -0
  69. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/s3fs/result_set.py +0 -0
  70. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/spark/__init__.py +0 -0
  71. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/spark/async_cursor.py +0 -0
  72. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/spark/common.py +0 -0
  73. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/spark/cursor.py +0 -0
  74. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/__init__.py +0 -0
  75. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/arrow.py +0 -0
  76. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/base.py +0 -0
  77. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/compiler.py +0 -0
  78. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/constants.py +0 -0
  79. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/pandas.py +0 -0
  80. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/polars.py +0 -0
  81. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/preparer.py +0 -0
  82. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/requirements.py +0 -0
  83. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/rest.py +0 -0
  84. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/s3fs.py +0 -0
  85. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/types.py +0 -0
  86. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/sqlalchemy/util.py +0 -0
  87. {pyathena-3.31.0 → pyathena-3.31.1}/pyathena/util.py +0 -0
  88. {pyathena-3.31.0 → pyathena-3.31.1}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyAthena
3
- Version: 3.31.0
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/
@@ -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.31.0'
22
- __version_tuple__ = version_tuple = (3, 31, 0)
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 True
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 True
1466
+ return not final
1460
1467
 
1461
1468
  def commit(self) -> None:
1462
1469
  if self.tell() == 0:
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