Skip to content
Open
Show file tree
Hide file tree
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 Dec 9, 2025
57405e9
feat: Support urllib3 >= 2.6.0 (#1658)
chandra-siri Dec 9, 2025
89a947a
chore(main): release 3.7.0 (#1621)
release-please[bot] Dec 9, 2025
de2c8e9
chore: add gcs-fs as CODEOWNERS (#1660)
chandra-siri Dec 10, 2025
4a609a4
fix: close write object stream always (#1661)
chandra-siri Dec 11, 2025
2d5a7b1
fix(experimental): no state lookup while opening bidi-write stream (#…
chandra-siri Dec 16, 2025
fc95b35
chore(python): Add support for Python 3.14 (#1593)
chalmerlowe Dec 16, 2025
e072133
chore: skip failing samples due to public access prevention enforceme…
chandra-siri Dec 17, 2025
18a0edf
chore: add system test for cloud path (#1666)
chandra-siri Dec 17, 2025
b8855b0
chore: add system 3.9 tests as required (#1670)
chandra-siri Dec 17, 2025
0e2961b
feat: expose persisted size in mrd (#1671)
chandra-siri Dec 18, 2025
6dc711d
fix: add system test for opening with read_handle (#1672)
chandra-siri Dec 18, 2025
d6b8f55
chore: Prevent OS Login key accumulation in e2e tests (#1688)
chandra-siri Dec 19, 2025
139390c
feat: compute chunk wise checksum for bidi_writes (#1675)
chandra-siri Dec 19, 2025
a0668ec
chore: Add Sys test large obj (#1676)
chandra-siri Dec 19, 2025
f7095fa
feat: make flush size configurable (#1677)
chandra-siri Dec 19, 2025
bee6089
chore: skip kms tests until b/470276398 (#1690)
chandra-siri Dec 19, 2025
fe6d7c9
chore: optimization to reduce number of open TCP connections while ru…
chandra-siri Dec 22, 2025
1333c95
feat: implement "append_from_file" (#1686)
chandra-siri Dec 22, 2025
dfc60b3
chore: delete topic after creation (#1687)
chandra-siri Dec 23, 2025
a994dbf
Revert "skip notification tests until b/470069573 is fixed" (#1694)
chandra-siri Dec 23, 2025
d90f0ee
feat(experimental): add bidi stream retry manager. (#1632)
Pulkit0110 Dec 26, 2025
0c35d3f
chore(tests): add test for reading unfinalized appendable objects wit…
chandra-siri Dec 31, 2025
a57ea0e
feat(experimental): add write resumption strategy (#1663)
Pulkit0110 Jan 2, 2026
89bfe7a
feat(experimental): flush the last chunk in append method (#1699)
Pulkit0110 Jan 11, 2026
94ad895
chore(librarian): bump library version to 3.7.0 (#1703)
parthea Jan 13, 2026
16cf512
chore: librarian release pull request: 20260113T144551Z (#1704)
parthea Jan 13, 2026
6c16079
fix(experimental): implement requests_done method to signal end of re…
chandra-siri Jan 15, 2026
ea0f5bf
feat(ZonalBuckets): add support for `generation=0` to avoid overwriti…
chandra-siri Jan 16, 2026
2e1a1eb
feat(samples): add samples for appendable objects writes and reads (#…
chandra-siri Jan 20, 2026
cdb2486
feat(grpc_user_agent): send `user_agent` to grpc channel (#1712)
chandra-siri Jan 21, 2026
cc4831d
fix: Fix formatting in setup.py dependencies list (#1713)
chandra-siri Jan 21, 2026
1917649
feat: Add micro-benchmarks for reads comparing standard (regional) vs…
chandra-siri Jan 21, 2026
dbe9d8b
feat: Add micro-benchmarks for writes comparing standard (regional) v…
chandra-siri Jan 21, 2026
f751f1e
refactor: move system tests to single event loop (#1714)
chandra-siri Jan 22, 2026
2bc15fa
feat: Add support for opening via `write_handle` and fix `write_handl…
chandra-siri Jan 22, 2026
5d9fafe
fix: update write handle on every recv() (#1716)
chandra-siri Jan 22, 2026
dbd162b
feat(experimental): integrate writes strategy and appendable object w…
Pulkit0110 Jan 28, 2026
5ac2808
feat: add context manager to mrd (#1724)
chandra-siri Jan 28, 2026
721ea2d
fix: instance grpc client once per process in benchmarks (#1725)
chandra-siri Jan 28, 2026
8e21a7f
feat: expose finalized_time in blob.py applicable for GET_OBJECT in Z…
chandra-siri Jan 28, 2026
e730bf5
fix!: Change contructors of MRD and AAOW AsyncGrpcClient.grpc_client …
chandra-siri Jan 28, 2026
7b31946
feat: add default user agent for grpc (#1726)
Pulkit0110 Jan 29, 2026
74c9ecc
feat: Move Zonal Buckets features of `_experimental` (#1728)
chandra-siri Jan 29, 2026
08bc708
feat: update generation for MRD (#1730)
Pulkit0110 Jan 29, 2026
c8dd7a0
feat: expose `DELETE_OBJECT` in `AsyncGrpcClient` (#1718)
chandra-siri Jan 30, 2026
2ef6339
fix: receive eof while closing reads stream (#1733)
Pulkit0110 Feb 2, 2026
7a00dfb
chore: Add README for running zonal buckets samples (#1734)
chandra-siri Feb 2, 2026
0e5ec29
feat: add get_object method for async grpc client (#1735)
Pulkit0110 Feb 2, 2026
77c1eda
chore: librarian release pull request: 20260202T123858Z (#1736)
chandra-siri Feb 2, 2026
2231120
chore: Migrate gsutil usage to gcloud storage (#1732)
gurusai-voleti Feb 4, 2026
d9b1923
chore: add depreciation warning for generation_number (#1740)
Pulkit0110 Feb 4, 2026
6aa3fdd
feat(storage): Sync main and async branch (#1674)
googlyrahman Dec 19, 2025
bdbb6c1
feat(storage): add async credential wrapper (#1659)
googlyrahman Dec 19, 2025
a6df069
feat(storage): Introduce base abstract class for storage client (#1655)
googlyrahman Dec 19, 2025
1b7c3c6
feat(storage): Add AsyncConnection class and unit tests (#1664)
googlyrahman Dec 24, 2025
3545989
feat(storage): Add base async client and async http iterator class (#…
googlyrahman Feb 5, 2026
2fb48fb
Merge branch 'async' into async
googlyrahman Feb 5, 2026
e39794b
Lint changes
googlyrahman Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ system_tests/local_test_setup
# Make sure a generated file isn't accidentally committed.
pylintrc
pylintrc.test

# Benchmarking results and logs
__benchmark_results__/**
4 changes: 2 additions & 2 deletions .kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
# To run this script, first download few files from gcs to /dev/shm.
# (/dev/shm is passed into the container as KOKORO_GFILE_DIR).
#
# gsutil cp gs://cloud-devrel-kokoro-resources/python-docs-samples/secrets_viewer_service_account.json /dev/shm
# gsutil cp gs://cloud-devrel-kokoro-resources/python-docs-samples/automl_secrets.txt /dev/shm
# gcloud storage cp gs://cloud-devrel-kokoro-resources/python-docs-samples/secrets_viewer_service_account.json /dev/shm
# gcloud storage cp gs://cloud-devrel-kokoro-resources/python-docs-samples/automl_secrets.txt /dev/shm
#
# Then run the script.
# .kokoro/trampoline_v2.sh
Expand Down
2 changes: 1 addition & 1 deletion .librarian/state.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:8e2c32496077054105bd06c54a59d6a6694287bc053588e24debe6da6920ad91
libraries:
- id: google-cloud-storage
version: 3.6.0
version: 3.9.0
last_generated_commit: 5400ccce473c439885bd6bf2924fd242271bfcab
apis:
- path: google/storage/v2
Expand Down
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This changelog entry is a duplicate of the one on the previous line. Please remove it to avoid redundancy.

* 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These two entries are redundant as they are already covered by the more comprehensive entry on line 26. Please remove them to improve clarity.



### 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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This changelog entry is a duplicate of the one on the previous line. Please remove it.


## [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)


Expand Down
5 changes: 4 additions & 1 deletion cloudbuild/run_zonal_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sudo apt-get update && sudo apt-get install -y git python3-pip python3-venv
# Clone the repository and checkout the specific commit from the build trigger.
git clone https://github.com/googleapis/python-storage.git
cd python-storage
git fetch origin "refs/pull/${_PR_NUMBER}/head"
git checkout ${COMMIT_SHA}


Expand All @@ -22,5 +23,7 @@ pip install -e .
echo '--- Setting up environment variables on VM ---'
export ZONAL_BUCKET=${_ZONAL_BUCKET}
export RUN_ZONAL_SYSTEM_TESTS=True
echo '--- Running Zonal tests on VM ---'
CURRENT_ULIMIT=$(ulimit -n)
echo '--- Running Zonal tests on VM with ulimit set to ---' $CURRENT_ULIMIT
pytest -vv -s --log-format='%(asctime)s %(levelname)s %(message)s' --log-date-format='%H:%M:%S' tests/system/test_zonal.py
pytest -vv -s --log-format='%(asctime)s %(levelname)s %(message)s' --log-date-format='%H:%M:%S' samples/snippets/zonal_buckets/zonal_snippets_test.py
3 changes: 2 additions & 1 deletion cloudbuild/zb-system-tests-cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ substitutions:
_ZONE: "us-central1-a"
_SHORT_BUILD_ID: ${BUILD_ID:0:8}
_VM_NAME: "py-sdk-sys-test-${_SHORT_BUILD_ID}"
_ULIMIT: "10000" # 10k, for gRPC bidi streams



Expand Down Expand Up @@ -67,7 +68,7 @@ steps:
# Execute the script on the VM via SSH.
# Capture the exit code to ensure cleanup happens before the build fails.
set +e
gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} bash run_zonal_tests.sh"
gcloud compute ssh ${_VM_NAME} --zone=${_ZONE} --internal-ip --ssh-key-file=/workspace/.ssh/google_compute_engine --command="ulimit -n {_ULIMIT}; COMMIT_SHA=${COMMIT_SHA} _ZONAL_BUCKET=${_ZONAL_BUCKET} _PR_NUMBER=${_PR_NUMBER} bash run_zonal_tests.sh"
EXIT_CODE=$?
set -e

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/_storage_v2/gapic_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "3.6.0" # {x-release-please-version}
__version__ = "3.9.0" # {x-release-please-version}
11 changes: 11 additions & 0 deletions google/cloud/storage/_experimental/asyncio/_utils.py
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,
)
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,
)
Loading