Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ replacements:
"google-api-core[grpc] >= 2.27.0, < 3.0.0",
"grpcio >= 1.44.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio-status >= 1.76.0, < 2.0.0",
"grpcio-status >= 1.44.0, < 2.0.0; python_version < '3.14'",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0; python_version < '3.13'",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
"protobuf >= 4.25.8, < 8.0.0",
Expand Down Expand Up @@ -636,23 +637,30 @@ replacements:
}
count: 1
- paths: [
packages/google-cloud-storage/testing/constraints-3.10.txt,
packages/google-cloud-storage/testing/constraints-3.10.txt
]
before: |
google-api-core[\s\S]*
[\s\S]*?grpc-google-iam-v1[\s\S]*
google-api-core==2.17.1
google-auth==2.14.1
grpcio==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
grpc-google-iam-v1==0.14.0
Comment thread
chalmerlowe marked this conversation as resolved.
after: |
google-auth
google-auth==2.26.1
# cryptography is a direct dependency of google-auth
cryptography
google-api-core
google-cloud-core
google-resumable-media
grpcio
requests
google-crc32c
protobuf
opentelemetry-api
cryptography==38.0.0
google-api-core==2.27.0
google-cloud-core==2.4.2
google-resumable-media==2.7.2
grpcio==1.44.0
grpcio-status==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
grpc-google-iam-v1==0.14.0
opentelemetry-api==1.1.0
requests==2.22.0
google-crc32c==1.6.0
count: 1
- paths: [
packages/google-cloud-storage/testing/constraints-3.11.txt,
Expand Down
1 change: 0 additions & 1 deletion librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,6 @@ libraries:
version: 3.10.1
apis:
- path: google/storage/v2
skip_generate: true
skip_release: true
python:
library_type: GAPIC_MANUAL
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-storage/docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,7 +83,7 @@

# General information about the project.
project = "google-cloud-storage"
copyright = "2025, Google, LLC"
copyright = "2026, Google, LLC"
author = "Google APIs"

# The version info for the project you're documenting, acts as replacement for
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,13 +21,7 @@

__version__ = package_version.__version__

if sys.version_info >= (3, 8): # pragma: NO COVER
from importlib import metadata
else: # pragma: NO COVER
# TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
# this code path once we drop support for Python 3.7
import importlib_metadata as metadata

from importlib import metadata

from .services.storage import StorageAsyncClient, StorageClient
from .types.storage import (
Expand Down Expand Up @@ -98,28 +92,17 @@
# An older version of api_core is installed which does not define the
# functions above. We do equivalent checks manually.
try:
import sys
import warnings

_py_version_str = sys.version.split()[0]
_package_label = "google.cloud._storage_v2"
if sys.version_info < (3, 9):
if sys.version_info < (3, 10):
warnings.warn(
"You are using a non-supported Python version "
+ f"({_py_version_str}). Google will not post any further "
+ f"updates to {_package_label} supporting this Python version. "
+ "Please upgrade to the latest Python version, or at "
+ f"least to Python 3.9, and then update {_package_label}.",
FutureWarning,
)
if sys.version_info[:2] == (3, 9):
warnings.warn(
f"You are using a Python version ({_py_version_str}) "
+ f"which Google will stop supporting in {_package_label} in "
+ "January 2026. Please "
+ "upgrade to the latest Python version, or at "
+ "least to Python 3.10, before then, and "
+ f"then update {_package_label}.",
+ f"least to Python 3.10, and then update {_package_label}.",
FutureWarning,
)

Expand Down
4 changes: 1 addition & 3 deletions packages/google-cloud-storage/noxfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,6 @@
LINT_PATHS.append("samples")

ALL_PYTHON = [
"3.9",
"3.10",
"3.11",
"3.12",
Expand Down Expand Up @@ -494,7 +493,6 @@ def docs(session):
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
"-W", # warnings as errors
Comment thread
chalmerlowe marked this conversation as resolved.
"-T", # show full traceback on exception
"-N", # no colors
"-b",
Expand Down
12 changes: 6 additions & 6 deletions packages/google-cloud-storage/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,9 +58,10 @@
# experimental in this SDK. More info in b/465352227
"grpc": [
"google-api-core[grpc] >= 2.27.0, < 3.0.0",
"grpcio >= 1.33.2, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.44.0, < 2.0.0; python_version < '3.14'",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"grpcio-status >= 1.76.0, < 2.0.0",
"grpcio-status >= 1.44.0, < 2.0.0; python_version < '3.14'",
"grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0; python_version < '3.13'",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
"protobuf >= 4.25.8, < 8.0.0",
Expand Down Expand Up @@ -116,15 +117,14 @@
long_description=readme,
author="Google LLC",
author_email="googleapis-packages@google.com",
license="Apache 2.0",
license="Apache-2.0",
url=url,
classifiers=[
release_status,
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -135,7 +135,7 @@
],
platforms="Posix; MacOS X; Windows",
packages=packages,
python_requires=">=3.9",
python_requires=">=3.10",
install_requires=dependencies,
extras_require=extras,
include_package_data=True,
Expand Down
32 changes: 19 additions & 13 deletions packages/google-cloud-storage/testing/constraints-3.10.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# -*- coding: utf-8 -*-
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-auth
# This constraints file is used to check that lower bounds
# are correct in setup.py
# List all library dependencies and extras in this file,
# pinning their versions to their lower bounds.
# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
# then this file should have google-cloud-foo==1.14.0
google-auth==2.26.1
# cryptography is a direct dependency of google-auth
cryptography
google-api-core
google-cloud-core
google-resumable-media
grpcio
requests
google-crc32c
protobuf
opentelemetry-api
cryptography==38.0.0
google-api-core==2.27.0
google-cloud-core==2.4.2
google-resumable-media==2.7.2
grpcio==1.44.0
grpcio-status==1.44.0
proto-plus==1.22.3
protobuf==4.25.8
grpc-google-iam-v1==0.14.0
opentelemetry-api==1.1.0
requests==2.22.0
google-crc32c==1.6.0
18 changes: 0 additions & 18 deletions packages/google-cloud-storage/testing/constraints-3.9.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,18 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import os

# try/except added for compatibility with python < 3.8
try:
from unittest import mock
from unittest.mock import AsyncMock # pragma: NO COVER
except ImportError: # pragma: NO COVER
import mock

import json
import math
import os
from collections.abc import Mapping, Sequence
from unittest import mock
from unittest.mock import AsyncMock

import grpc
import pytest
Expand Down Expand Up @@ -2565,11 +2559,7 @@ async def test_list_buckets_async_pages():
RuntimeError,
)
pages = []
# Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch`
# See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372
async for page_ in ( # pragma: no branch
await client.list_buckets(request={})
).pages:
async for page_ in (await client.list_buckets(request={})).pages:
pages.append(page_)
for page_, token in zip(pages, ["abc", "def", "ghi", ""]):
assert page_.raw_page.next_page_token == token
Expand Down Expand Up @@ -7085,11 +7075,7 @@ async def test_list_objects_async_pages():
RuntimeError,
)
pages = []
# Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch`
# See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372
async for page_ in ( # pragma: no branch
await client.list_objects(request={})
).pages:
async for page_ in (await client.list_objects(request={})).pages:
pages.append(page_)
for page_, token in zip(pages, ["abc", "def", "ghi", ""]):
assert page_.raw_page.next_page_token == token
Expand Down
Loading