-
Notifications
You must be signed in to change notification settings - Fork 172
feat(storage): sync async with main branch #1744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
googlyrahman
wants to merge
59
commits into
googleapis:async
Choose a base branch
from
googlyrahman:pr-1743
base: async
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
ddce7e5
feat: send entire object checksum in the final api call of resumable …
chandra-siri 57405e9
feat: Support urllib3 >= 2.6.0 (#1658)
chandra-siri 89a947a
chore(main): release 3.7.0 (#1621)
release-please[bot] de2c8e9
chore: add gcs-fs as CODEOWNERS (#1660)
chandra-siri 4a609a4
fix: close write object stream always (#1661)
chandra-siri 2d5a7b1
fix(experimental): no state lookup while opening bidi-write stream (#…
chandra-siri fc95b35
chore(python): Add support for Python 3.14 (#1593)
chalmerlowe e072133
chore: skip failing samples due to public access prevention enforceme…
chandra-siri 18a0edf
chore: add system test for cloud path (#1666)
chandra-siri b8855b0
chore: add system 3.9 tests as required (#1670)
chandra-siri 0e2961b
feat: expose persisted size in mrd (#1671)
chandra-siri 6dc711d
fix: add system test for opening with read_handle (#1672)
chandra-siri d6b8f55
chore: Prevent OS Login key accumulation in e2e tests (#1688)
chandra-siri 139390c
feat: compute chunk wise checksum for bidi_writes (#1675)
chandra-siri a0668ec
chore: Add Sys test large obj (#1676)
chandra-siri f7095fa
feat: make flush size configurable (#1677)
chandra-siri bee6089
chore: skip kms tests until b/470276398 (#1690)
chandra-siri fe6d7c9
chore: optimization to reduce number of open TCP connections while ru…
chandra-siri 1333c95
feat: implement "append_from_file" (#1686)
chandra-siri dfc60b3
chore: delete topic after creation (#1687)
chandra-siri a994dbf
Revert "skip notification tests until b/470069573 is fixed" (#1694)
chandra-siri d90f0ee
feat(experimental): add bidi stream retry manager. (#1632)
Pulkit0110 0c35d3f
chore(tests): add test for reading unfinalized appendable objects wit…
chandra-siri a57ea0e
feat(experimental): add write resumption strategy (#1663)
Pulkit0110 89bfe7a
feat(experimental): flush the last chunk in append method (#1699)
Pulkit0110 94ad895
chore(librarian): bump library version to 3.7.0 (#1703)
parthea 16cf512
chore: librarian release pull request: 20260113T144551Z (#1704)
parthea 6c16079
fix(experimental): implement requests_done method to signal end of re…
chandra-siri ea0f5bf
feat(ZonalBuckets): add support for `generation=0` to avoid overwriti…
chandra-siri 2e1a1eb
feat(samples): add samples for appendable objects writes and reads (#…
chandra-siri cdb2486
feat(grpc_user_agent): send `user_agent` to grpc channel (#1712)
chandra-siri cc4831d
fix: Fix formatting in setup.py dependencies list (#1713)
chandra-siri 1917649
feat: Add micro-benchmarks for reads comparing standard (regional) vs…
chandra-siri dbe9d8b
feat: Add micro-benchmarks for writes comparing standard (regional) v…
chandra-siri f751f1e
refactor: move system tests to single event loop (#1714)
chandra-siri 2bc15fa
feat: Add support for opening via `write_handle` and fix `write_handl…
chandra-siri 5d9fafe
fix: update write handle on every recv() (#1716)
chandra-siri dbd162b
feat(experimental): integrate writes strategy and appendable object w…
Pulkit0110 5ac2808
feat: add context manager to mrd (#1724)
chandra-siri 721ea2d
fix: instance grpc client once per process in benchmarks (#1725)
chandra-siri 8e21a7f
feat: expose finalized_time in blob.py applicable for GET_OBJECT in Z…
chandra-siri e730bf5
fix!: Change contructors of MRD and AAOW AsyncGrpcClient.grpc_client …
chandra-siri 7b31946
feat: add default user agent for grpc (#1726)
Pulkit0110 74c9ecc
feat: Move Zonal Buckets features of `_experimental` (#1728)
chandra-siri 08bc708
feat: update generation for MRD (#1730)
Pulkit0110 c8dd7a0
feat: expose `DELETE_OBJECT` in `AsyncGrpcClient` (#1718)
chandra-siri 2ef6339
fix: receive eof while closing reads stream (#1733)
Pulkit0110 7a00dfb
chore: Add README for running zonal buckets samples (#1734)
chandra-siri 0e5ec29
feat: add get_object method for async grpc client (#1735)
Pulkit0110 77c1eda
chore: librarian release pull request: 20260202T123858Z (#1736)
chandra-siri 2231120
chore: Migrate gsutil usage to gcloud storage (#1732)
gurusai-voleti d9b1923
chore: add depreciation warning for generation_number (#1740)
Pulkit0110 6aa3fdd
feat(storage): Sync main and async branch (#1674)
googlyrahman bdbb6c1
feat(storage): add async credential wrapper (#1659)
googlyrahman a6df069
feat(storage): Introduce base abstract class for storage client (#1655)
googlyrahman 1b7c3c6
feat(storage): Add AsyncConnection class and unit tests (#1664)
googlyrahman 3545989
feat(storage): Add base async client and async http iterator class (#…
googlyrahman 2fb48fb
Merge branch 'async' into async
googlyrahman e39794b
Lint changes
googlyrahman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,60 @@ | |
|
|
||
| [1]: https://pypi.org/project/google-cloud-storage/#history | ||
|
|
||
| ## [3.9.0](https://github.com/googleapis/python-storage/compare/v3.8.0...v3.9.0) (2026-02-02) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * add get_object method for async grpc client (#1735) ([0e5ec29bc6a31b77bcfba4254cef5bffb199095c](https://github.com/googleapis/python-storage/commit/0e5ec29bc6a31b77bcfba4254cef5bffb199095c)) | ||
| * expose `DELETE_OBJECT` in `AsyncGrpcClient` (#1718) ([c8dd7a0b124c395b7b60189ee78f47aba8d51f7d](https://github.com/googleapis/python-storage/commit/c8dd7a0b124c395b7b60189ee78f47aba8d51f7d)) | ||
| * update generation for MRD (#1730) ([08bc7082db7392f13bc8c51511b4afa9c7b157c9](https://github.com/googleapis/python-storage/commit/08bc7082db7392f13bc8c51511b4afa9c7b157c9)) | ||
| * Move Zonal Buckets features of `_experimental` (#1728) ([74c9ecc54173420bfcd48498a8956088a035af50](https://github.com/googleapis/python-storage/commit/74c9ecc54173420bfcd48498a8956088a035af50)) | ||
| * add default user agent for grpc (#1726) ([7b319469d2e495ea0bf7367f3949190e8f5d9fff](https://github.com/googleapis/python-storage/commit/7b319469d2e495ea0bf7367f3949190e8f5d9fff)) | ||
| * expose finalized_time in blob.py applicable for GET_OBJECT in ZB (#1719) ([8e21a7fe54d0a043f31937671003630a1985a5d2](https://github.com/googleapis/python-storage/commit/8e21a7fe54d0a043f31937671003630a1985a5d2)) | ||
| * add context manager to mrd (#1724) ([5ac2808a69195c688ed42c3604d4bfadbb602a66](https://github.com/googleapis/python-storage/commit/5ac2808a69195c688ed42c3604d4bfadbb602a66)) | ||
| * integrate writes strategy and appendable object writer (#1695) ([dbd162b3583e32e6f705a51f5c3fef333a9b89d0](https://github.com/googleapis/python-storage/commit/dbd162b3583e32e6f705a51f5c3fef333a9b89d0)) | ||
| * Add support for opening via `write_handle` and fix `write_handle` type (#1715) ([2bc15fa570683ba584230c51b439d189dbdcd580](https://github.com/googleapis/python-storage/commit/2bc15fa570683ba584230c51b439d189dbdcd580)) | ||
| * Add micro-benchmarks for writes comparing standard (regional) vs rapid (zonal) buckets. (#1707) ([dbe9d8b89d975dfbed8c830a5687ccfafea51d5f](https://github.com/googleapis/python-storage/commit/dbe9d8b89d975dfbed8c830a5687ccfafea51d5f)) | ||
| * Add micro-benchmarks for reads comparing standard (regional) vs rapid (zonal) buckets. (#1697) ([1917649fac41481da1adea6c2a9f4ab1298a34c4](https://github.com/googleapis/python-storage/commit/1917649fac41481da1adea6c2a9f4ab1298a34c4)) | ||
| * send `user_agent` to grpc channel (#1712) ([cdb2486bb051dcbfbffc2510aff6aacede5e54d3](https://github.com/googleapis/python-storage/commit/cdb2486bb051dcbfbffc2510aff6aacede5e54d3)) | ||
| * add samples for appendable objects writes and reads (#1705) ([2e1a1eb5cbe1c909f1f892a0cc74fe63c8ef36ff](https://github.com/googleapis/python-storage/commit/2e1a1eb5cbe1c909f1f892a0cc74fe63c8ef36ff)) | ||
| * add samples for appendable objects writes and reads ([2e1a1eb5cbe1c909f1f892a0cc74fe63c8ef36ff](https://github.com/googleapis/python-storage/commit/2e1a1eb5cbe1c909f1f892a0cc74fe63c8ef36ff)) | ||
| * add support for `generation=0` to avoid overwriting existing objects and add `is_stream_open` support (#1709) ([ea0f5bf8316f4bfcff2728d9d1baa68dde6ebdae](https://github.com/googleapis/python-storage/commit/ea0f5bf8316f4bfcff2728d9d1baa68dde6ebdae)) | ||
| * add support for `generation=0` to prevent overwriting existing objects ([ea0f5bf8316f4bfcff2728d9d1baa68dde6ebdae](https://github.com/googleapis/python-storage/commit/ea0f5bf8316f4bfcff2728d9d1baa68dde6ebdae)) | ||
| * add `is_stream_open` property to AsyncAppendableObjectWriter for stream status check ([ea0f5bf8316f4bfcff2728d9d1baa68dde6ebdae](https://github.com/googleapis/python-storage/commit/ea0f5bf8316f4bfcff2728d9d1baa68dde6ebdae)) | ||
|
Comment on lines
+27
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * receive eof while closing reads stream (#1733) ([2ef63396dca1c36f9b0f0f3cf87a61b5aa4bd465](https://github.com/googleapis/python-storage/commit/2ef63396dca1c36f9b0f0f3cf87a61b5aa4bd465)) | ||
| * Change contructors of MRD and AAOW AsyncGrpcClient.grpc_client to AsyncGrpcClient (#1727) ([e730bf50c4584f737ab86b2e409ddb27b40d2cec](https://github.com/googleapis/python-storage/commit/e730bf50c4584f737ab86b2e409ddb27b40d2cec)) | ||
| * instance grpc client once per process in benchmarks (#1725) ([721ea2dd6c6db2aa91fd3b90e56a831aaaa64061](https://github.com/googleapis/python-storage/commit/721ea2dd6c6db2aa91fd3b90e56a831aaaa64061)) | ||
| * update write handle on every recv() (#1716) ([5d9fafe1466b5ccb1db4a814967a5cc8465148a2](https://github.com/googleapis/python-storage/commit/5d9fafe1466b5ccb1db4a814967a5cc8465148a2)) | ||
| * Fix formatting in setup.py dependencies list (#1713) ([cc4831d7e253b265b0b96e08b5479f4c759be442](https://github.com/googleapis/python-storage/commit/cc4831d7e253b265b0b96e08b5479f4c759be442)) | ||
| * implement requests_done method to signal end of requests in async streams. Gracefully close streams. (#1700) ([6c160794afded5e8f4179399f1fe5248e32bf707](https://github.com/googleapis/python-storage/commit/6c160794afded5e8f4179399f1fe5248e32bf707)) | ||
| * implement requests_done method to signal end of requests in async streams. Gracefully close streams. ([6c160794afded5e8f4179399f1fe5248e32bf707](https://github.com/googleapis/python-storage/commit/6c160794afded5e8f4179399f1fe5248e32bf707)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ## [3.8.0](https://github.com/googleapis/python-storage/compare/v3.7.0...v3.8.0) (2026-01-13) | ||
|
|
||
|
|
||
| ### Features | ||
|
|
||
| * flush the last chunk in append method (#1699) ([89bfe7a5fcd0391da35e9ceccc185279782b5420](https://github.com/googleapis/python-storage/commit/89bfe7a5fcd0391da35e9ceccc185279782b5420)) | ||
| * add write resumption strategy (#1663) ([a57ea0ec786a84c7ae9ed82c6ae5d38ecadba4af](https://github.com/googleapis/python-storage/commit/a57ea0ec786a84c7ae9ed82c6ae5d38ecadba4af)) | ||
| * add bidi stream retry manager. (#1632) ([d90f0ee09902a21b186106bcf0a8cb0b81b34340](https://github.com/googleapis/python-storage/commit/d90f0ee09902a21b186106bcf0a8cb0b81b34340)) | ||
| * implement "append_from_file" (#1686) ([1333c956da18b4db753cda98c41c3619c84caf69](https://github.com/googleapis/python-storage/commit/1333c956da18b4db753cda98c41c3619c84caf69)) | ||
| * make flush size configurable (#1677) ([f7095faf0a81239894ff9d277849788b62eb6ac5](https://github.com/googleapis/python-storage/commit/f7095faf0a81239894ff9d277849788b62eb6ac5)) | ||
| * compute chunk wise checksum for bidi_writes (#1675) ([139390cb01f93a2d61e7ec201e3637dffe0b2a34](https://github.com/googleapis/python-storage/commit/139390cb01f93a2d61e7ec201e3637dffe0b2a34)) | ||
| * expose persisted size in mrd (#1671) ([0e2961bef285fc064174a5c18e3db05c7a682521](https://github.com/googleapis/python-storage/commit/0e2961bef285fc064174a5c18e3db05c7a682521)) | ||
|
|
||
|
|
||
| ### Bug Fixes | ||
|
|
||
| * add system test for opening with read_handle (#1672) ([6dc711dacd4d38c573aa4ca9ad71fe412c0e49c1](https://github.com/googleapis/python-storage/commit/6dc711dacd4d38c573aa4ca9ad71fe412c0e49c1)) | ||
| * no state lookup while opening bidi-write stream (#1636) ([2d5a7b16846a69f3a911844971241899f60cce14](https://github.com/googleapis/python-storage/commit/2d5a7b16846a69f3a911844971241899f60cce14)) | ||
| * close write object stream always (#1661) ([4a609a4b3f4ba1396825911cb02f8a9649135cd5](https://github.com/googleapis/python-storage/commit/4a609a4b3f4ba1396825911cb02f8a9649135cd5)) | ||
|
|
||
| ## [3.7.0](https://github.com/googleapis/python-storage/compare/v3.6.0...v3.7.0) (2025-12-09) | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import warnings | ||
|
|
||
| # Import everything from the new stable module | ||
| from google.cloud.storage.asyncio._utils import * # noqa | ||
|
|
||
| warnings.warn( | ||
| "google.cloud.storage._experimental.asyncio._utils has been moved to google.cloud.storage.asyncio._utils. " | ||
| "Please update your imports.", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) |
74 changes: 9 additions & 65 deletions
74
google/cloud/storage/_experimental/asyncio/async_abstract_object_stream.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,67 +1,11 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| import warnings | ||
|
|
||
| import abc | ||
| from typing import Any, Optional | ||
| # Import everything from the new stable module | ||
| from google.cloud.storage.asyncio.async_abstract_object_stream import * # noqa | ||
|
|
||
|
|
||
| class _AsyncAbstractObjectStream(abc.ABC): | ||
| """Abstract base class to represent gRPC bidi-stream for GCS ``Object``. | ||
|
|
||
| Concrete implementation of this class could be ``_AsyncReadObjectStream`` | ||
| or ``_AsyncWriteObjectStream``. | ||
|
|
||
| :type bucket_name: str | ||
| :param bucket_name: (Optional) The name of the bucket containing the object. | ||
|
|
||
| :type object_name: str | ||
| :param object_name: (Optional) The name of the object. | ||
|
|
||
| :type generation_number: int | ||
| :param generation_number: (Optional) If present, selects a specific revision of | ||
| this object. | ||
|
|
||
| :type handle: bytes | ||
| :param handle: (Optional) The handle for the object, could be read_handle or | ||
| write_handle, based on how the stream is used. | ||
| """ | ||
|
|
||
| def __init__( | ||
| self, | ||
| bucket_name: str, | ||
| object_name: str, | ||
| generation_number: Optional[int] = None, | ||
| handle: Optional[bytes] = None, | ||
| ) -> None: | ||
| super().__init__() | ||
| self.bucket_name: str = bucket_name | ||
| self.object_name: str = object_name | ||
| self.generation_number: Optional[int] = generation_number | ||
| self.handle: Optional[bytes] = handle | ||
|
|
||
| @abc.abstractmethod | ||
| async def open(self) -> None: | ||
| pass | ||
|
|
||
| @abc.abstractmethod | ||
| async def close(self) -> None: | ||
| pass | ||
|
|
||
| @abc.abstractmethod | ||
| async def send(self, protobuf: Any) -> None: | ||
| pass | ||
|
|
||
| @abc.abstractmethod | ||
| async def recv(self) -> Any: | ||
| pass | ||
| warnings.warn( | ||
| "google.cloud.storage._experimental.asyncio.async_abstract_object_stream has been moved to google.cloud.storage.asyncio.async_abstract_object_stream. " | ||
| "Please update your imports.", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changelog entry is a duplicate of the one on the previous line. Please remove it to avoid redundancy.