google-cloud-bigquery-storage 2.41.0__tar.gz → 2.43.0__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 (153) hide show
  1. {google_cloud_bigquery_storage-2.41.0/google_cloud_bigquery_storage.egg-info → google_cloud_bigquery_storage-2.43.0}/PKG-INFO +3 -2
  2. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage/gapic_version.py +1 -1
  3. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1/__init__.py +62 -0
  4. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1/_compat.py +262 -0
  5. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/client.py +16 -0
  6. {google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1alpha → google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1}/gapic_version.py +1 -1
  7. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/reader.py +67 -10
  8. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_read/client.py +23 -157
  9. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_write/client.py +23 -160
  10. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1alpha/__init__.py +35 -0
  11. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1alpha/_compat.py +262 -0
  12. {google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1beta → google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1alpha}/gapic_version.py +1 -1
  13. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/metastore_partition_service/client.py +23 -162
  14. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1beta/__init__.py +35 -0
  15. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1beta/_compat.py +262 -0
  16. {google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1 → google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1beta}/gapic_version.py +1 -1
  17. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/metastore_partition_service/client.py +23 -162
  18. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1beta2/__init__.py +61 -0
  19. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1beta2/_compat.py +262 -0
  20. google_cloud_bigquery_storage-2.43.0/google/cloud/bigquery_storage_v1beta2/gapic_version.py +16 -0
  21. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py +23 -157
  22. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_write/client.py +23 -160
  23. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0/google_cloud_bigquery_storage.egg-info}/PKG-INFO +3 -2
  24. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google_cloud_bigquery_storage.egg-info/SOURCES.txt +9 -1
  25. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google_cloud_bigquery_storage.egg-info/requires.txt +1 -1
  26. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/setup.py +2 -1
  27. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/reader/test_reader.py +64 -0
  28. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py +14 -280
  29. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1/test_big_query_write.py +14 -291
  30. google_cloud_bigquery_storage-2.43.0/tests/unit/gapic/bigquery_storage_v1/test_compat.py +429 -0
  31. google_cloud_bigquery_storage-2.43.0/tests/unit/gapic/bigquery_storage_v1alpha/test_compat.py +429 -0
  32. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1alpha/test_metastore_partition_service.py +14 -315
  33. google_cloud_bigquery_storage-2.43.0/tests/unit/gapic/bigquery_storage_v1beta/test_compat.py +429 -0
  34. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1beta/test_metastore_partition_service.py +14 -315
  35. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1beta2/test_big_query_read.py +14 -280
  36. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1beta2/test_big_query_write.py +14 -291
  37. google_cloud_bigquery_storage-2.43.0/tests/unit/gapic/bigquery_storage_v1beta2/test_compat.py +429 -0
  38. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/test_read_client_v1.py +52 -0
  39. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/test_reader_v1.py +148 -0
  40. google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1/__init__.py +0 -146
  41. google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1alpha/__init__.py +0 -120
  42. google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1beta/__init__.py +0 -120
  43. google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1beta2/__init__.py +0 -145
  44. google_cloud_bigquery_storage-2.41.0/google/cloud/bigquery_storage_v1beta2/gapic_version.py +0 -16
  45. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/LICENSE +0 -0
  46. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/MANIFEST.in +0 -0
  47. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/README.rst +0 -0
  48. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage/__init__.py +0 -0
  49. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage/py.typed +0 -0
  50. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/exceptions.py +0 -0
  51. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/gapic_metadata.json +0 -0
  52. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/gapic_types.py +0 -0
  53. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/py.typed +0 -0
  54. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/__init__.py +0 -0
  55. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_read/__init__.py +0 -0
  56. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_read/async_client.py +0 -0
  57. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__init__.py +0 -0
  58. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py +0 -0
  59. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py +0 -0
  60. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py +0 -0
  61. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_write/__init__.py +0 -0
  62. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_write/async_client.py +0 -0
  63. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__init__.py +0 -0
  64. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py +0 -0
  65. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc.py +0 -0
  66. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py +0 -0
  67. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/__init__.py +0 -0
  68. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/annotations.py +0 -0
  69. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/arrow.py +0 -0
  70. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/avro.py +0 -0
  71. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/protobuf.py +0 -0
  72. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/storage.py +0 -0
  73. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/stream.py +0 -0
  74. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/types/table.py +0 -0
  75. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1/writer.py +0 -0
  76. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/gapic_metadata.json +0 -0
  77. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/py.typed +0 -0
  78. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/__init__.py +0 -0
  79. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/metastore_partition_service/__init__.py +0 -0
  80. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/metastore_partition_service/async_client.py +0 -0
  81. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/metastore_partition_service/transports/__init__.py +0 -0
  82. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/metastore_partition_service/transports/base.py +0 -0
  83. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/metastore_partition_service/transports/grpc.py +0 -0
  84. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/services/metastore_partition_service/transports/grpc_asyncio.py +0 -0
  85. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/types/__init__.py +0 -0
  86. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/types/metastore_partition.py +0 -0
  87. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1alpha/types/partition.py +0 -0
  88. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/gapic_metadata.json +0 -0
  89. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/py.typed +0 -0
  90. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/__init__.py +0 -0
  91. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/metastore_partition_service/__init__.py +0 -0
  92. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/metastore_partition_service/async_client.py +0 -0
  93. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/metastore_partition_service/transports/__init__.py +0 -0
  94. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/metastore_partition_service/transports/base.py +0 -0
  95. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/metastore_partition_service/transports/grpc.py +0 -0
  96. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/services/metastore_partition_service/transports/grpc_asyncio.py +0 -0
  97. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/types/__init__.py +0 -0
  98. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/types/metastore_partition.py +0 -0
  99. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta/types/partition.py +0 -0
  100. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/client.py +0 -0
  101. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/exceptions.py +0 -0
  102. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/gapic_metadata.json +0 -0
  103. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/py.typed +0 -0
  104. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/__init__.py +0 -0
  105. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_read/__init__.py +0 -0
  106. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_read/async_client.py +0 -0
  107. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/__init__.py +0 -0
  108. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/base.py +0 -0
  109. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py +0 -0
  110. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py +0 -0
  111. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_write/__init__.py +0 -0
  112. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py +0 -0
  113. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/__init__.py +0 -0
  114. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py +0 -0
  115. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc.py +0 -0
  116. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc_asyncio.py +0 -0
  117. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/types/__init__.py +0 -0
  118. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/types/arrow.py +0 -0
  119. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/types/avro.py +0 -0
  120. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/types/protobuf.py +0 -0
  121. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/types/storage.py +0 -0
  122. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/types/stream.py +0 -0
  123. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/types/table.py +0 -0
  124. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google/cloud/bigquery_storage_v1beta2/writer.py +0 -0
  125. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google_cloud_bigquery_storage.egg-info/dependency_links.txt +0 -0
  126. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google_cloud_bigquery_storage.egg-info/not-zip-safe +0 -0
  127. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/google_cloud_bigquery_storage.egg-info/top_level.txt +0 -0
  128. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/setup.cfg +0 -0
  129. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/__init__.py +0 -0
  130. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/__init__.py +0 -0
  131. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/assets/people_data.csv +0 -0
  132. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/assets/public_samples_copy.sql +0 -0
  133. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/conftest.py +0 -0
  134. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/helpers.py +0 -0
  135. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/reader/__init__.py +0 -0
  136. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/reader/conftest.py +0 -0
  137. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/reader/test_reader_dataframe.py +0 -0
  138. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/resources/README.md +0 -0
  139. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/resources/person.proto +0 -0
  140. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/resources/person_pb2.py +0 -0
  141. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/system/test_writer.py +0 -0
  142. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/__init__.py +0 -0
  143. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/__init__.py +0 -0
  144. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1/__init__.py +0 -0
  145. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1alpha/__init__.py +0 -0
  146. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1beta/__init__.py +0 -0
  147. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/gapic/bigquery_storage_v1beta2/__init__.py +0 -0
  148. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/helpers.py +0 -0
  149. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/test_packaging.py +0 -0
  150. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/test_reader_pandas_gbq.py +0 -0
  151. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/test_reader_v1_arrow.py +0 -0
  152. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/test_writer_v1.py +0 -0
  153. {google_cloud_bigquery_storage-2.41.0 → google_cloud_bigquery_storage-2.43.0}/tests/unit/test_writer_v1beta2.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-bigquery-storage
3
- Version: 2.41.0
3
+ Version: 2.43.0
4
4
  Summary: Google Cloud Bigquery Storage API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-bigquery-storage
6
6
  Author: Google LLC
@@ -17,11 +17,12 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
20
21
  Classifier: Operating System :: OS Independent
21
22
  Classifier: Topic :: Internet
22
23
  Requires-Python: >=3.10
23
24
  License-File: LICENSE
24
- Requires-Dist: google-api-core[grpc]<3.0.0,>=2.25.0
25
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.28.0
25
26
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
26
27
  Requires-Dist: grpcio<2.0.0,>=1.59.0
27
28
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "2.41.0" # {x-release-please-version}
16
+ __version__ = "2.43.0" # {x-release-please-version}
@@ -0,0 +1,62 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ import google.api_core as api_core
17
+
18
+ from google.cloud.bigquery_storage_v1 import gapic_version as package_version
19
+
20
+ __version__ = package_version.__version__
21
+
22
+ # PEP 0810: Explicit Lazy Imports
23
+ # Python 3.15+ natively intercepts and defers these imports.
24
+ # Developers can disable this behavior and force eager imports.
25
+ # For more information, see:
26
+ # https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
27
+ # Older Python versions safely ignore this variable.
28
+ __lazy_modules__ = {
29
+ "google.cloud.bigquery_storage_v1.services.big_query_read",
30
+ "google.cloud.bigquery_storage_v1.services.big_query_write",
31
+ "google.cloud.bigquery_storage_v1.types.annotations",
32
+ "google.cloud.bigquery_storage_v1.types.arrow",
33
+ "google.cloud.bigquery_storage_v1.types.avro",
34
+ "google.cloud.bigquery_storage_v1.types.protobuf",
35
+ "google.cloud.bigquery_storage_v1.types.storage",
36
+ "google.cloud.bigquery_storage_v1.types.stream",
37
+ "google.cloud.bigquery_storage_v1.types.table",
38
+ }
39
+
40
+
41
+ from google.cloud.bigquery_storage_v1 import client, types
42
+
43
+
44
+ class BigQueryReadClient(client.BigQueryReadClient):
45
+ __doc__ = client.BigQueryReadClient.__doc__
46
+
47
+
48
+ class BigQueryWriteClient(client.BigQueryWriteClient):
49
+ __doc__ = client.BigQueryWriteClient.__doc__
50
+
51
+
52
+ __all__ = (
53
+ # google.cloud.bigquery_storage_v1
54
+ "__version__",
55
+ "types",
56
+ # google.cloud.bigquery_storage_v1.client
57
+ "BigQueryReadClient",
58
+ "BigQueryWriteClient",
59
+ )
60
+
61
+ api_core.check_python_version("google.cloud.bigquery_storage_v1")
62
+ api_core.check_dependency_versions("google.cloud.bigquery_storage_v1")
@@ -0,0 +1,262 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ """A compatibility module for older versions of google-api-core."""
17
+
18
+ import json
19
+ import os
20
+ from typing import Any, Dict, List, Optional, Tuple
21
+ from urllib.parse import urlparse, urlunparse
22
+
23
+ from google.api_core import path_template
24
+ from google.api_core.universe import EmptyUniverseError
25
+ from google.auth.exceptions import MutualTLSChannelError
26
+ from google.protobuf import json_format
27
+
28
+ try:
29
+ # note: `#type: ignore` is added because the return type for `should_use_client_cert`
30
+ # is different than that of the fallback implementation below. This will be removed once
31
+ # we bump the minimum supported version of google-auth.
32
+ from google.auth.transport.mtls import should_use_client_cert # type: ignore
33
+ except ImportError: # pragma: NO COVER
34
+
35
+ def should_use_client_cert():
36
+ """Returns whether client certificate should be used for mTLS."""
37
+ use_client_cert = os.getenv(
38
+ "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
39
+ ).lower()
40
+ if use_client_cert not in ("true", "false"):
41
+ raise ValueError(
42
+ "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be"
43
+ " either `true` or `false`"
44
+ )
45
+ return use_client_cert == "true"
46
+
47
+
48
+ def read_environment_variables():
49
+ """Returns the environment variables used by the client.
50
+
51
+ Returns:
52
+ Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE,
53
+ GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables.
54
+
55
+ Raises:
56
+ ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not
57
+ any of ["true", "false"].
58
+ google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT
59
+ is not any of ["auto", "never", "always"].
60
+ """
61
+ use_client_cert = should_use_client_cert()
62
+ use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower()
63
+ universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN")
64
+ if use_mtls_endpoint not in ("auto", "never", "always"):
65
+ raise MutualTLSChannelError(
66
+ "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`,"
67
+ " `auto` or `always`"
68
+ )
69
+ return use_client_cert, use_mtls_endpoint, universe_domain_env
70
+
71
+
72
+ DEFAULT_UNIVERSE = "googleapis.com"
73
+
74
+ try:
75
+ from google.api_core.universe import get_default_mtls_endpoint
76
+ except ImportError: # pragma: NO COVER
77
+
78
+ def get_default_mtls_endpoint(api_endpoint: Optional[str]) -> Optional[str]:
79
+ """Converts api endpoint to mTLS endpoint.
80
+
81
+ Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
82
+ "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
83
+ Other URLs (including those that do not match these domain suffixes or
84
+ already contain '.mtls.') are passed through as-is.
85
+
86
+ Args:
87
+ api_endpoint (Optional[str]): the api endpoint to convert.
88
+
89
+ Returns:
90
+ Optional[str]: converted mTLS api endpoint.
91
+ """
92
+ if not api_endpoint or ".mtls." in api_endpoint.lower():
93
+ return api_endpoint
94
+
95
+ has_scheme = "://" in api_endpoint
96
+ if not has_scheme:
97
+ parsed = urlparse("//" + api_endpoint)
98
+ else:
99
+ parsed = urlparse(api_endpoint)
100
+
101
+ host = parsed.hostname
102
+ if not host:
103
+ return api_endpoint
104
+
105
+ port = f":{parsed.port}" if parsed.port else ""
106
+
107
+ lowered_host = host.lower()
108
+ suffix_sandbox = ".sandbox.googleapis.com"
109
+ suffix_google = ".googleapis.com"
110
+ if lowered_host.endswith(suffix_sandbox):
111
+ new_host = host[: -len(suffix_sandbox)] + ".mtls.sandbox.googleapis.com"
112
+ elif lowered_host.endswith(suffix_google):
113
+ new_host = host[: -len(suffix_google)] + ".mtls.googleapis.com"
114
+ else:
115
+ return api_endpoint
116
+
117
+ netloc = new_host + port
118
+ new_parsed = parsed._replace(netloc=netloc)
119
+
120
+ if not has_scheme:
121
+ return urlunparse(new_parsed)[2:]
122
+ else:
123
+ return urlunparse(new_parsed)
124
+
125
+
126
+ try:
127
+ from google.api_core.universe import get_api_endpoint
128
+ except ImportError: # pragma: NO COVER
129
+
130
+ def get_api_endpoint(
131
+ api_override: Optional[str],
132
+ universe_domain: str,
133
+ default_universe: str,
134
+ default_mtls_endpoint: Optional[str],
135
+ default_endpoint_template: str,
136
+ use_mtls: bool,
137
+ ) -> str:
138
+ """Return the API endpoint used by the client.
139
+
140
+ Args:
141
+ api_override (Optional[str]): The API endpoint override. If specified,
142
+ this is always returned.
143
+ universe_domain (str): The universe domain used by the client.
144
+ default_universe (str): The default universe domain.
145
+ default_mtls_endpoint (Optional[str]): The default mTLS endpoint.
146
+ default_endpoint_template (str): The default endpoint template containing
147
+ a placeholder `{UNIVERSE_DOMAIN}`.
148
+ use_mtls (bool): Whether to use the mTLS endpoint.
149
+
150
+ Returns:
151
+ str: The API endpoint to be used by the client.
152
+
153
+ Raises:
154
+ google.auth.exceptions.MutualTLSChannelError: If mTLS is requested but
155
+ not supported in the configured universe domain.
156
+ ValueError: If mTLS is requested but no mTLS endpoint is available.
157
+ """
158
+ if api_override is not None:
159
+ return api_override
160
+
161
+ if use_mtls:
162
+ if universe_domain.lower() != default_universe.lower():
163
+ raise MutualTLSChannelError(
164
+ f"mTLS is not supported in any universe other than {default_universe}."
165
+ )
166
+ if not default_mtls_endpoint:
167
+ raise ValueError("mTLS endpoint is not available.")
168
+ return default_mtls_endpoint
169
+ else:
170
+ return default_endpoint_template.format(UNIVERSE_DOMAIN=universe_domain)
171
+
172
+
173
+ try:
174
+ from google.api_core.universe import get_universe_domain
175
+ except ImportError: # pragma: NO COVER
176
+
177
+ def get_universe_domain(
178
+ *potential_universes: Optional[str],
179
+ default_universe: str,
180
+ ) -> str:
181
+ """Return the universe domain used by the client.
182
+
183
+ Args:
184
+ *potential_universes (Optional[str]): Potential universe domains in order of preference.
185
+ default_universe (str): The default universe domain.
186
+
187
+ Returns:
188
+ str: The universe domain to be used by the client.
189
+
190
+ Raises:
191
+ EmptyUniverseError: If the resolved universe domain is an empty string.
192
+ """
193
+ resolved = next(
194
+ (x.strip() for x in potential_universes if x is not None),
195
+ default_universe,
196
+ )
197
+
198
+ if not resolved:
199
+ raise EmptyUniverseError()
200
+ return resolved
201
+
202
+
203
+ try:
204
+ from google.api_core.rest_helpers import transcode_request # type: ignore
205
+ except ImportError: # pragma: NO COVER
206
+
207
+ def transcode_request(
208
+ http_options: List[Dict[str, str]],
209
+ request: Any,
210
+ required_fields_default_values: Optional[Dict[str, Any]] = None,
211
+ rest_numeric_enums: bool = False,
212
+ ) -> Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]:
213
+ """Transcodes a request into HTTP method, URI, body, and query parameters.
214
+
215
+ Args:
216
+ http_options (List[Dict[str, str]]): List of HTTP transcoding rules.
217
+ request (Any): The protobuf or proto-plus request message.
218
+ required_fields_default_values (Optional[Dict[str, Any]]): Dictionary
219
+ of required fields default values to merge into query parameters if missing.
220
+ rest_numeric_enums (bool): Whether to encode enums as integers.
221
+
222
+ Returns:
223
+ Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]: A tuple containing:
224
+ - The raw transcoded request dictionary (containing keys like 'uri', 'method').
225
+ - The serialized request body JSON string, or None if no body.
226
+ - The query parameters dictionary.
227
+ """
228
+ if request is None:
229
+ raise TypeError("request cannot be None")
230
+
231
+ # Convert proto-plus message to its underlying protobuf message if needed
232
+ pb_request = getattr(request, "_pb", request)
233
+
234
+ transcoded_request = path_template.transcode(http_options, pb_request)
235
+
236
+ body_json = None
237
+ if transcoded_request.get("body") is not None:
238
+ body_json = json_format.MessageToJson(
239
+ transcoded_request["body"],
240
+ use_integers_for_enums=rest_numeric_enums,
241
+ )
242
+
243
+ query_params_json = {}
244
+ if transcoded_request.get("query_params") is not None:
245
+ query_params_json = json.loads(
246
+ json_format.MessageToJson(
247
+ transcoded_request["query_params"],
248
+ use_integers_for_enums=rest_numeric_enums,
249
+ )
250
+ )
251
+
252
+ # If required_fields_default_values is provided, we merge default values for missing
253
+ # required fields into the query parameters.
254
+ if required_fields_default_values:
255
+ for k, v in required_fields_default_values.items():
256
+ if k not in query_params_json:
257
+ query_params_json[k] = v
258
+
259
+ if rest_numeric_enums:
260
+ query_params_json["$alt"] = "json;enum-encoding=int"
261
+
262
+ return transcoded_request, body_json, query_params_json
@@ -57,6 +57,8 @@ class BigQueryReadClient(big_query_read.BigQueryReadClient):
57
57
  timeout=google.api_core.gapic_v1.method.DEFAULT,
58
58
  metadata=(),
59
59
  retry_delay_callback=None,
60
+ *,
61
+ arrow_serialization_options=None,
60
62
  ):
61
63
  """
62
64
  Reads rows from the table in the format prescribed by the read
@@ -124,6 +126,14 @@ class BigQueryReadClient(big_query_read.BigQueryReadClient):
124
126
  BigQueryReadClient will call retry_delay_callback with the delay
125
127
  duration (in seconds) before it starts sleeping until the next
126
128
  attempt.
129
+ arrow_serialization_options (Optional[Union[dict, \
130
+ ~google.cloud.bigquery_storage_v1.types.ArrowSerializationOptions \
131
+ ]]):
132
+ Arrow serialization options, such as buffer compression, to
133
+ send on every ``ReadRows`` request, including after a
134
+ reconnect. Only job default streams
135
+ (``projects/{project}/locations/{location}/jobs/{job}/streams/_default``)
136
+ accept them.
127
137
 
128
138
  Returns:
129
139
  ~google.cloud.bigquery_storage_v1.reader.ReadRowsStream:
@@ -137,6 +147,11 @@ class BigQueryReadClient(big_query_read.BigQueryReadClient):
137
147
  to a retryable error and retry attempts failed.
138
148
  ValueError: If the parameters are invalid.
139
149
  """
150
+ request_template = None
151
+ if arrow_serialization_options is not None:
152
+ request_template = {
153
+ "arrow_serialization_options": arrow_serialization_options
154
+ }
140
155
  gapic_client = super(BigQueryReadClient, self)
141
156
  stream = reader.ReadRowsStream(
142
157
  gapic_client,
@@ -144,6 +159,7 @@ class BigQueryReadClient(big_query_read.BigQueryReadClient):
144
159
  offset,
145
160
  {"retry": retry, "timeout": timeout, "metadata": metadata},
146
161
  retry_delay_callback=retry_delay_callback,
162
+ request_template=request_template,
147
163
  )
148
164
  stream._reconnect()
149
165
  return stream
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "2.41.0" # {x-release-please-version}
16
+ __version__ = "2.43.0" # {x-release-please-version}
@@ -27,6 +27,8 @@ except ImportError: # pragma: NO COVER
27
27
  import google.api_core.exceptions
28
28
  import google.rpc.error_details_pb2 # type: ignore
29
29
 
30
+ from google.cloud.bigquery_storage_v1 import types as gapic_types
31
+
30
32
  try:
31
33
  import pandas
32
34
  except ImportError: # pragma: NO COVER
@@ -86,7 +88,14 @@ class ReadRowsStream(object):
86
88
  """
87
89
 
88
90
  def __init__(
89
- self, client, name, offset, read_rows_kwargs, retry_delay_callback=None
91
+ self,
92
+ client,
93
+ name,
94
+ offset,
95
+ read_rows_kwargs,
96
+ retry_delay_callback=None,
97
+ *,
98
+ request_template=None,
90
99
  ):
91
100
  """Construct a ReadRowsStream.
92
101
 
@@ -114,6 +123,13 @@ class ReadRowsStream(object):
114
123
  ReadRowsStream will call retry_delay_callback with the delay
115
124
  duration (in seconds) before it starts sleeping until the next
116
125
  attempt.
126
+ request_template (Optional[Union[dict, \
127
+ ~google.cloud.bigquery_storage_v1.types.ReadRowsRequest \
128
+ ]]):
129
+ Request fields, such as ``arrow_serialization_options``, to
130
+ send on every ``ReadRows`` request, including after a
131
+ reconnect. ``read_stream`` and ``offset`` are set from
132
+ ``name`` and the current stream offset.
117
133
 
118
134
  Returns:
119
135
  Iterable[ \
@@ -129,6 +145,8 @@ class ReadRowsStream(object):
129
145
  self._offset = offset
130
146
  self._read_rows_kwargs = read_rows_kwargs
131
147
  self._retry_delay_callback = retry_delay_callback
148
+ self._request_template = request_template
149
+ self._cancelled = False
132
150
  self._wrapped = None
133
151
 
134
152
  def __iter__(self):
@@ -140,19 +158,20 @@ class ReadRowsStream(object):
140
158
  ]:
141
159
  A sequence of row messages.
142
160
  """
143
- # Infinite loop to reconnect on reconnectable errors while processing
144
- # the row stream.
161
+ # Loop to reconnect on reconnectable errors while processing the row
162
+ # stream, until the stream ends or is cancelled.
145
163
 
146
164
  if self._wrapped is None:
147
165
  self._reconnect()
148
166
 
149
- while True:
167
+ while not self._cancelled:
150
168
  try:
151
169
  for message in self._wrapped:
152
170
  rowcount = message.row_count
153
171
  self._offset += rowcount
154
172
  yield message
155
173
 
174
+ self._wrapped = None
156
175
  return # Made it through the whole stream.
157
176
  except google.api_core.exceptions.InternalServerError as exc:
158
177
  resumable_error = any(
@@ -165,22 +184,60 @@ class ReadRowsStream(object):
165
184
  # Transient error, so reconnect to the stream.
166
185
  pass
167
186
  except Exception as exc:
187
+ # cancel() makes the call fail, which isn't an error here.
188
+ if self._cancelled:
189
+ return
168
190
  if not self._resource_exhausted_exception_is_retryable(exc):
169
191
  raise
170
192
 
171
193
  self._reconnect()
172
194
 
195
+ def cancel(self):
196
+ """Cancel the ``ReadRows`` call.
197
+
198
+ Use this to stop reading before the end of the stream. After
199
+ ``cancel()``, iterating the stream yields no more messages, and the
200
+ stream doesn't reconnect. The client stays open for other calls.
201
+ """
202
+ self._cancelled = True
203
+ cancel = getattr(self._wrapped, "cancel", None)
204
+ if cancel is not None:
205
+ cancel()
206
+
207
+ def __del__(self):
208
+ if not getattr(self, "_cancelled", True):
209
+ self.cancel()
210
+
173
211
  def _reconnect(self):
174
212
  """Reconnect to the ReadRows stream using the most recent offset."""
175
- while True:
213
+ while not self._cancelled:
176
214
  try:
177
- self._wrapped = self._client.read_rows(
178
- read_stream=self._name,
179
- offset=self._offset,
180
- **self._read_rows_kwargs,
181
- )
215
+ if self._request_template is None:
216
+ wrapped = self._client.read_rows(
217
+ read_stream=self._name,
218
+ offset=self._offset,
219
+ **self._read_rows_kwargs,
220
+ )
221
+ else:
222
+ # The flattened read_rows() arguments only include
223
+ # read_stream and offset, so send a full request copy.
224
+ request = gapic_types.ReadRowsRequest(self._request_template)
225
+ request.read_stream = self._name
226
+ request.offset = self._offset
227
+ wrapped = self._client.read_rows(
228
+ request=request,
229
+ **self._read_rows_kwargs,
230
+ )
231
+ # Store the new call before checking for cancel(), so a
232
+ # concurrent cancel() either cancels it or is seen here.
233
+ self._wrapped = wrapped
234
+ if self._cancelled:
235
+ self.cancel()
236
+ return
182
237
  break
183
238
  except Exception as exc:
239
+ if self._cancelled:
240
+ return
184
241
  if not self._resource_exhausted_exception_is_retryable(exc):
185
242
  raise
186
243