Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1230e17

Browse filesBrowse files
authored
chore: librarian generate pull request: 20260326T175601Z (#1785)
PR created by the Librarian CLI to generate Cloud Client Libraries code from protos. BEGIN_COMMIT BEGIN_NESTED_COMMIT feat: Added a new field `ComposeObjectRequest.delete_source_objects` field PiperOrigin-RevId: 863087065 Library-IDs: google-cloud-storage Source-link: [googleapis/googleapis@51ff87f4](googleapis/googleapis@51ff87f4) END_NESTED_COMMIT BEGIN_NESTED_COMMIT docs: Updated documentation for `BidiReadObject`, `ReadObjectRequest`, and `ObjectContexts` PiperOrigin-RevId: 863087065 Library-IDs: google-cloud-storage Source-link: [googleapis/googleapis@51ff87f4](googleapis/googleapis@51ff87f4) END_NESTED_COMMIT END_COMMIT This pull request is generated with proto changes between [googleapis/googleapis@5400ccce](googleapis/googleapis@5400ccc) (exclusive) and [googleapis/googleapis@51ff87f4](googleapis/googleapis@51ff87f) (inclusive). Librarian Version: v1.0.2-0.20260309131826-42ac5c451239 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:8e2c32496077054105bd06c54a59d6a6694287bc053588e24debe6da6920ad91
1 parent 0b551dc commit 1230e17
Copy full SHA for 1230e17

11 files changed

+161-39Lines changed: 161 additions & 39 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/google-cloud-storage/.librarian/generator-input/.repo-metadata.json‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/.librarian/generator-input/.repo-metadata.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"api_id": "storage.googleapis.com",
1313
"requires_billing": true,
1414
"default_version": "v2",
15-
"codeowner_team": "@googleapis/yoshi-python @googleapis/gcs-sdk-team @googleapis/gcs-fs",
15+
"codeowner_team": "@googleapis/cloud-sdk-python-team @googleapis/gcs-team @googleapis/gcs-fs",
1616
"api_shortname": "storage",
1717
"api_description": "is a durable and highly available object storage service. Google Cloud Storage is almost infinitely scalable and guarantees consistency: when a write succeeds, the latest copy of the object will be returned to any GET, globally."
1818
}
Collapse file

‎packages/google-cloud-storage/.librarian/generator-input/librarian.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/.librarian/generator-input/librarian.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
"README.rst",
4242
# Exclude autogenerated default import `google.cloud.storage`
4343
"google/cloud/storage/*",
44+
# Temporarily exclude google/cloud/_storage_v2/services/storage/client.py
45+
# and tests/unit/gapic due to customization.
46+
# This exclusion will be removed in the google-cloud-python migration PR
47+
# When librarian.py is dropped.
48+
"tests/unit/gapic/*",
49+
"google/cloud/storage_v2/services/storage/client.py",
4450
# Exclude autogenerated constraints files for Python 3.7/3.9
4551
"testing/constraints-3.7.txt",
4652
"testing/constraints-3.9.txt",
Collapse file

‎packages/google-cloud-storage/.librarian/generator-input/noxfile.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/.librarian/generator-input/noxfile.py
+75-17Lines changed: 75 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from __future__ import absolute_import
1818
import os
1919
import pathlib
20-
import re
2120
import shutil
2221

2322
import nox
@@ -28,7 +27,13 @@
2827

2928
DEFAULT_PYTHON_VERSION = "3.14"
3029
SYSTEM_TEST_PYTHON_VERSIONS = ["3.10", "3.14"]
31-
UNIT_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
30+
UNIT_TEST_PYTHON_VERSIONS = [
31+
"3.10",
32+
"3.11",
33+
"3.12",
34+
"3.13",
35+
"3.14",
36+
]
3237
CONFORMANCE_TEST_PYTHON_VERSIONS = ["3.12"]
3338

3439
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
@@ -39,6 +44,7 @@
3944
nox.options.sessions = [
4045
"blacken",
4146
"conftest_retry",
47+
"conftest_retry_bidi",
4248
"docfx",
4349
"docs",
4450
"lint",
@@ -61,9 +67,7 @@ def lint(session):
6167
Returns a failure if the linters find linting errors or sufficiently
6268
serious code quality issues.
6369
"""
64-
# Pin flake8 to 6.0.0
65-
# See https://github.com/googleapis/python-storage/issues/1102
66-
session.install("flake8==6.0.0", BLACK_VERSION)
70+
session.install("flake8", BLACK_VERSION)
6771
session.run(
6872
"black",
6973
"--check",
@@ -116,6 +120,8 @@ def default(session, install_extras=True):
116120

117121
session.install("-e", ".", "-c", constraints_path)
118122

123+
session.run("python", "-m", "pip", "freeze")
124+
119125
# This dependency is included in setup.py for backwards compatibility only
120126
# and the client library is expected to pass all tests without it. See
121127
# setup.py and README for details.
@@ -180,7 +186,14 @@ def system(session):
180186
# 2021-05-06: defer installing 'google-cloud-*' to after this package,
181187
# in order to work around Python 2.7 googolapis-common-protos
182188
# issue.
183-
session.install("mock", "pytest", "pytest-rerunfailures", "-c", constraints_path)
189+
session.install(
190+
"mock",
191+
"pytest",
192+
"pytest-rerunfailures",
193+
"pytest-asyncio",
194+
"-c",
195+
constraints_path,
196+
)
184197
session.install("-e", ".", "-c", constraints_path)
185198
session.install(
186199
"google-cloud-testutils",
@@ -207,30 +220,75 @@ def system(session):
207220
@nox.session(python=CONFORMANCE_TEST_PYTHON_VERSIONS)
208221
def conftest_retry(session):
209222
"""Run the retry conformance test suite."""
210-
conformance_test_folder_path = os.path.join("tests", "conformance")
211-
conformance_test_folder_exists = os.path.exists(conformance_test_folder_path)
223+
json_conformance_tests = "tests/conformance/test_conformance.py"
212224
# Environment check: only run tests if found.
213-
if not conformance_test_folder_exists:
225+
if not os.path.exists(json_conformance_tests):
214226
session.skip("Conformance tests were not found")
215227

228+
constraints_path = str(
229+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
230+
)
231+
216232
# Install all test dependencies and pytest plugin to run tests in parallel.
217233
# Then install this package in-place.
218-
session.install("pytest", "pytest-xdist")
219-
session.install("-e", ".")
234+
session.install(
235+
"pytest",
236+
"pytest-xdist",
237+
"-c",
238+
constraints_path,
239+
)
240+
session.install("-e", ".", "-c", constraints_path)
220241

221242
# Run #CPU processes in parallel if no test session arguments are passed in.
222243
if session.posargs:
223244
test_cmd = [
224-
"py.test",
225-
"--quiet",
226-
conformance_test_folder_path,
245+
"pytest",
246+
"-vv",
247+
"-s",
248+
json_conformance_tests,
227249
*session.posargs,
228250
]
229251
else:
230-
test_cmd = ["py.test", "-n", "auto", "--quiet", conformance_test_folder_path]
252+
test_cmd = ["pytest", "-vv", "-s", "-n", "auto", json_conformance_tests]
253+
254+
# Run pytest against the conformance tests.
255+
session.run(*test_cmd, env={"DOCKER_API_VERSION": "1.39"})
256+
231257

232-
# Run py.test against the conformance tests.
233-
session.run(*test_cmd)
258+
@nox.session(python=CONFORMANCE_TEST_PYTHON_VERSIONS)
259+
def conftest_retry_bidi(session):
260+
"""Run the retry conformance test suite."""
261+
262+
constraints_path = str(
263+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
264+
)
265+
266+
# Install all test dependencies and pytest plugin to run tests in parallel.
267+
# Then install this package in-place.
268+
session.install(
269+
"pytest",
270+
"pytest-xdist",
271+
"pytest-asyncio",
272+
"grpcio",
273+
"grpcio-status",
274+
"grpc-google-iam-v1",
275+
"-c",
276+
constraints_path,
277+
)
278+
session.install("-e", ".", "-c", constraints_path)
279+
280+
bidi_tests = [
281+
"tests/conformance/test_bidi_reads.py",
282+
"tests/conformance/test_bidi_writes.py",
283+
]
284+
for test_file in bidi_tests:
285+
session.run(
286+
"pytest",
287+
"-vv",
288+
"-s",
289+
test_file,
290+
env={"DOCKER_API_VERSION": "1.39"},
291+
)
234292

235293

236294
@nox.session(python=DEFAULT_PYTHON_VERSION)
Collapse file

‎packages/google-cloud-storage/.librarian/generator-input/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/.librarian/generator-input/setup.py
+37-1Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,46 @@
4343
"google-crc32c >= 1.1.3, < 2.0.0",
4444
]
4545
extras = {
46+
# TODO: Make these extra dependencies as mandatory once gRPC out of
47+
# experimental in this SDK. More info in b/465352227
48+
"grpc": [
49+
"google-api-core[grpc] >= 2.27.0, < 3.0.0",
50+
"grpcio >= 1.33.2, < 2.0.0; python_version < '3.14'",
51+
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
52+
"grpcio-status >= 1.76.0, < 2.0.0",
53+
"proto-plus >= 1.22.3, <2.0.0; python_version < '3.13'",
54+
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
55+
"protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
56+
"grpc-google-iam-v1 >= 0.14.0, <1.0.0",
57+
],
4658
"protobuf": ["protobuf >= 3.20.2, < 7.0.0"],
4759
"tracing": [
4860
"opentelemetry-api >= 1.1.0, < 2.0.0",
4961
],
62+
"testing": [
63+
"google-cloud-testutils",
64+
"numpy",
65+
"psutil",
66+
"py-cpuinfo",
67+
"pytest-benchmark",
68+
"PyYAML",
69+
"mock",
70+
"pytest",
71+
"pytest-cov",
72+
"pytest-asyncio",
73+
"pytest-rerunfailures",
74+
"pytest-xdist",
75+
"google-cloud-testutils",
76+
"google-cloud-iam",
77+
"google-cloud-pubsub",
78+
"google-cloud-kms",
79+
"brotli",
80+
"coverage",
81+
"pyopenssl",
82+
"opentelemetry-sdk",
83+
"flake8",
84+
"black",
85+
],
5086
}
5187

5288

@@ -99,7 +135,7 @@
99135
packages=packages,
100136
install_requires=dependencies,
101137
extras_require=extras,
102-
python_requires=">=3.7",
138+
python_requires=">=3.10",
103139
include_package_data=True,
104140
zip_safe=False,
105141
)
Collapse file

‎packages/google-cloud-storage/.librarian/state.yaml‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/.librarian/state.yaml
+11-3Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-li
22
libraries:
33
- id: google-cloud-storage
44
version: 3.10.1
5-
last_generated_commit: 5400ccce473c439885bd6bf2924fd242271bfcab
5+
last_generated_commit: b3f7a1f7550d68ec7d92d12eb21092930ce16ede
66
apis:
77
- path: google/storage/v2
88
service_config: storage_v2.yaml
@@ -22,10 +22,18 @@ libraries:
2222
- ^renovate.json
2323
- ^setup.py
2424
- ^docs/summary_overview.md
25-
- ^google/cloud/_storage_v2
25+
- ^google/cloud/_storage_v2/__init__.py
26+
- ^google/cloud/_storage_v2/gapic
27+
- ^google/cloud/_storage_v2/py.typed
28+
- ^google/cloud/_storage_v2/samples/generated_samples
29+
- ^google/cloud/_storage_v2/services/__init__.py
30+
- ^google/cloud/_storage_v2/services/storage/transports
31+
- ^google/cloud/_storage_v2/services/storage/__init__.py
32+
- ^google/cloud/_storage_v2/services/storage/async_client.py
33+
- ^google/cloud/_storage_v2/services/storage/pagers.py
34+
- ^google/cloud/_storage_v2/types
2635
- ^samples/generated_samples
2736
- ^testing/constraints-3.8.txt
2837
- ^testing/constraints-3.1.*
2938
- ^tests/__init__.py
30-
- ^tests/unit/gapic
3139
tag_format: v{version}
Collapse file

‎packages/google-cloud-storage/google/cloud/_storage_v2/services/storage/async_client.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/google/cloud/_storage_v2/services/storage/async_client.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,8 +2472,9 @@ def bidi_read_object(
24722472
across several messages. If an error occurs with any request,
24732473
the stream closes with a relevant error code. Since you can have
24742474
multiple outstanding requests, the error response includes a
2475-
``BidiReadObjectRangesError`` field detailing the specific error
2476-
for each pending ``read_id``.
2475+
``BidiReadObjectError`` proto in its ``details`` field,
2476+
reporting the specific error, if any, for each pending
2477+
``read_id``.
24772478
24782479
**IAM Permissions**:
24792480
Collapse file

‎packages/google-cloud-storage/google/cloud/_storage_v2/services/storage/transports/grpc.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/google/cloud/_storage_v2/services/storage/transports/grpc.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,8 +946,9 @@ def bidi_read_object(
946946
across several messages. If an error occurs with any request,
947947
the stream closes with a relevant error code. Since you can have
948948
multiple outstanding requests, the error response includes a
949-
``BidiReadObjectRangesError`` field detailing the specific error
950-
for each pending ``read_id``.
949+
``BidiReadObjectError`` proto in its ``details`` field,
950+
reporting the specific error, if any, for each pending
951+
``read_id``.
951952
952953
**IAM Permissions**:
953954
Collapse file

‎packages/google-cloud-storage/google/cloud/_storage_v2/services/storage/transports/grpc_asyncio.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/google/cloud/_storage_v2/services/storage/transports/grpc_asyncio.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,9 @@ def bidi_read_object(
971971
across several messages. If an error occurs with any request,
972972
the stream closes with a relevant error code. Since you can have
973973
multiple outstanding requests, the error response includes a
974-
``BidiReadObjectRangesError`` field detailing the specific error
975-
for each pending ``read_id``.
974+
``BidiReadObjectError`` proto in its ``details`` field,
975+
reporting the specific error, if any, for each pending
976+
``read_id``.
976977
977978
**IAM Permissions**:
978979
Collapse file

‎packages/google-cloud-storage/google/cloud/_storage_v2/types/storage.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/google/cloud/_storage_v2/types/storage.py
+21-8Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ class ComposeObjectRequest(proto.Message):
489489
Optional. The checksums of the complete
490490
object. This is validated against the combined
491491
checksums of the component objects.
492+
delete_source_objects (bool):
493+
Whether the source objects should be deleted
494+
in the compose request.
495+
496+
This field is a member of `oneof`_ ``_delete_source_objects``.
492497
"""
493498

494499
class SourceObject(proto.Message):
@@ -580,6 +585,11 @@ class ObjectPreconditions(proto.Message):
580585
number=10,
581586
message="ObjectChecksums",
582587
)
588+
delete_source_objects: bool = proto.Field(
589+
proto.BOOL,
590+
number=11,
591+
optional=True,
592+
)
583593

584594

585595
class DeleteObjectRequest(proto.Message):
@@ -1460,18 +1470,18 @@ class ReadRange(proto.Message):
14601470
``ReadObjectRequest`` with ``read_offset`` = -5 and
14611471
``read_length`` = 3 would return bytes 10 through 12 of the
14621472
object. Requesting a negative offset with magnitude larger
1463-
than the size of the object returns the entire object. A
1464-
``read_offset`` larger than the size of the object results
1465-
in an ``OutOfRange`` error.
1473+
than the size of the object is equivalent to ``read_offset``
1474+
= 0. A ``read_offset`` larger than the size of the object
1475+
results in an ``OutOfRange`` error.
14661476
read_length (int):
14671477
Optional. The maximum number of data bytes the server is
14681478
allowed to return across all response messages with the same
14691479
``read_id``. A ``read_length`` of zero indicates to read
14701480
until the resource end, and a negative ``read_length``
1471-
causes an error. If the stream returns fewer bytes than
1472-
allowed by the ``read_length`` and no error occurred, the
1473-
stream includes all data from the ``read_offset`` to the
1474-
resource end.
1481+
causes an ``OutOfRange`` error. If the stream returns fewer
1482+
bytes than allowed by the ``read_length`` and no error
1483+
occurred, the stream includes all data from the
1484+
``read_offset`` to the resource end.
14751485
read_id (int):
14761486
Required. Read identifier provided by the client. When the
14771487
client issues more than one outstanding ``ReadRange`` on the
@@ -4364,7 +4374,10 @@ class ObjectContexts(proto.Message):
43644374
43654375
Attributes:
43664376
custom (MutableMapping[str, google.cloud._storage_v2.types.ObjectCustomContextPayload]):
4367-
Optional. User-defined object contexts.
4377+
Optional. User-defined object contexts. The maximum key or
4378+
value size is ``256`` characters. The maximum number of
4379+
entries is ``50``. The maximum total serialized size of all
4380+
entries is ``25KiB``.
43684381
"""
43694382

43704383
custom: MutableMapping[str, "ObjectCustomContextPayload"] = proto.MapField(
Collapse file

‎packages/google-cloud-storage/noxfile.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-storage/noxfile.py
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ def lint(session):
6767
Returns a failure if the linters find linting errors or sufficiently
6868
serious code quality issues.
6969
"""
70-
# Pin flake8 to 6.0.0
71-
# See https://github.com/googleapis/python-storage/issues/1102
7270
session.install("flake8", BLACK_VERSION)
7371
session.run(
7472
"black",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.