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 1658393

Browse filesBrowse files
authored
feat: regenerate google-cloud-c packages (#17091)
This Pull Request drops support for Python <=3.9 in generated packages. This is part of our ongoing effort to modernize the Cloud Python SDK libraries and remove support for End-of-Life (EOL) Python versions. - Removed Python <=3.9 from testing, configuration, and constraints files. - Resolved dependency conflicts arising from dropping Python <=3.9 support. - Cleaned up obsolete code related to Python <=3.9 support. - Updated select copyright dates - Updated some autogenerated headings - Updated some tests to resolve issues discovered during this migration.
1 parent d49a2b9 commit 1658393
Copy full SHA for 1658393

567 files changed

+6,055-8,995Lines changed: 6055 additions & 8995 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/google-cloud-capacityplanner/docs/conf.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/docs/conf.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -83,7 +83,7 @@
8383

8484
# General information about the project.
8585
project = "google-cloud-capacityplanner"
86-
copyright = "2025, Google, LLC"
86+
copyright = "2026, Google, LLC"
8787
author = "Google APIs"
8888

8989
# The version info for the project you're documenting, acts as replacement for
Collapse file

‎packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/__init__.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/__init__.py
+4-21Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -21,13 +21,7 @@
2121

2222
__version__ = package_version.__version__
2323

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

3226
from .services.usage_service import UsageServiceAsyncClient, UsageServiceClient
3327
from .types.allocation import Allocation
@@ -76,28 +70,17 @@
7670
# An older version of api_core is installed which does not define the
7771
# functions above. We do equivalent checks manually.
7872
try:
79-
import sys
8073
import warnings
8174

8275
_py_version_str = sys.version.split()[0]
8376
_package_label = "google.cloud.capacityplanner_v1beta"
84-
if sys.version_info < (3, 9):
77+
if sys.version_info < (3, 10):
8578
warnings.warn(
8679
"You are using a non-supported Python version "
8780
+ f"({_py_version_str}). Google will not post any further "
8881
+ f"updates to {_package_label} supporting this Python version. "
8982
+ "Please upgrade to the latest Python version, or at "
90-
+ f"least to Python 3.9, and then update {_package_label}.",
91-
FutureWarning,
92-
)
93-
if sys.version_info[:2] == (3, 9):
94-
warnings.warn(
95-
f"You are using a Python version ({_py_version_str}) "
96-
+ f"which Google will stop supporting in {_package_label} in "
97-
+ "January 2026. Please "
98-
+ "upgrade to the latest Python version, or at "
99-
+ "least to Python 3.10, before then, and "
100-
+ f"then update {_package_label}.",
83+
+ f"least to Python 3.10, and then update {_package_label}.",
10184
FutureWarning,
10285
)
10386

Collapse file

‎packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/services/usage_service/async_client.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/services/usage_service/async_client.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -622,11 +622,11 @@ async def sample_export_usage_histories():
622622
)
623623
624624
# Make the request
625-
operation = client.export_usage_histories(request=request)
625+
operation = await client.export_usage_histories(request=request)
626626
627627
print("Waiting for operation to complete...")
628628
629-
response = (await operation).result()
629+
response = await operation.result()
630630
631631
# Handle the response
632632
print(response)
@@ -731,11 +731,11 @@ async def sample_export_forecasts():
731731
)
732732
733733
# Make the request
734-
operation = client.export_forecasts(request=request)
734+
operation = await client.export_forecasts(request=request)
735735
736736
print("Waiting for operation to complete...")
737737
738-
response = (await operation).result()
738+
response = await operation.result()
739739
740740
# Handle the response
741741
print(response)
@@ -843,11 +843,11 @@ async def sample_export_reservations_usage():
843843
)
844844
845845
# Make the request
846-
operation = client.export_reservations_usage(request=request)
846+
operation = await client.export_reservations_usage(request=request)
847847
848848
print("Waiting for operation to complete...")
849849
850-
response = (await operation).result()
850+
response = await operation.result()
851851
852852
# Handle the response
853853
print(response)
Collapse file

‎packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/types/usage_service.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/types/usage_service.py
+11-10Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -61,9 +61,9 @@ class QueryUsageHistoriesRequest(proto.Message):
6161
location for the time series values to return.
6262
The format is:
6363
64-
projects/{project}/locations/{location} or
64+
projects/{project}/locations/{location} or
6565
organizations/{organization}/locations/{location}
66-
or folders/{folder}/locations/{location}
66+
or folders/{folder}/locations/{location}
6767
location_level (google.cloud.capacityplanner_v1beta.types.TimeSeries.LocationType):
6868
Optional. The location level of the
6969
reservations usage timeseries.
@@ -1010,9 +1010,9 @@ class ExportUsageHistoriesRequest(proto.Message):
10101010
location for the time series values to return.
10111011
The format is:
10121012
1013-
projects/{project}/locations/{location} or
1013+
projects/{project}/locations/{location} or
10141014
organizations/{organization}/locations/{location}
1015-
or folders/{folder}/locations/{location}
1015+
or folders/{folder}/locations/{location}
10161016
is_spot (bool):
10171017
Optional. Set true to export usage for spot
10181018
resources.
@@ -1122,9 +1122,9 @@ class ExportForecastsRequest(proto.Message):
11221122
location for the time series values to return.
11231123
The format is:
11241124
1125-
projects/{project}/locations/{location} or
1125+
projects/{project}/locations/{location} or
11261126
organizations/{organization}/locations/{location}
1127-
or folders/{folder}/locations/{location}
1127+
or folders/{folder}/locations/{location}
11281128
machine_family (str):
11291129
Optional. The machine family to use to select the
11301130
``Forecast`` values to return. Possible values include "n1",
@@ -1252,11 +1252,12 @@ class ExportReservationsUsageRequest(proto.Message):
12521252
This field is a member of `oneof`_ ``resource``.
12531253
parent (str):
12541254
Required. The compute engine resource and
1255-
location of the reservationsusage. The format is:
1255+
location of the reservationsusage. The format
1256+
is:
12561257
1257-
projects/{project}/locations/{location} or
1258+
projects/{project}/locations/{location} or
12581259
organizations/{organization}/locations/{location}
1259-
or folders/{folder}/locations/{location}
1260+
or folders/{folder}/locations/{location}
12601261
location_level (google.cloud.capacityplanner_v1beta.types.TimeSeries.LocationType):
12611262
Optional. The location level of the
12621263
reservations usage timeseries.
Collapse file

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

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/noxfile.py
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -31,7 +31,6 @@
3131
LINT_PATHS.append("samples")
3232

3333
ALL_PYTHON = [
34-
"3.9",
3534
"3.10",
3635
"3.11",
3736
"3.12",
@@ -390,7 +389,6 @@ def docs(session):
390389
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
391390
session.run(
392391
"sphinx-build",
393-
"-W", # warnings as errors
394392
"-T", # show full traceback on exception
395393
"-N", # no colors
396394
"-b",
Collapse file

‎packages/google-cloud-capacityplanner/samples/generated_samples/capacityplanner_v1beta_generated_usage_service_export_forecasts_async.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/samples/generated_samples/capacityplanner_v1beta_generated_usage_service_export_forecasts_async.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -50,11 +50,11 @@ async def sample_export_forecasts():
5050
)
5151

5252
# Make the request
53-
operation = client.export_forecasts(request=request)
53+
operation = await client.export_forecasts(request=request)
5454

5555
print("Waiting for operation to complete...")
5656

57-
response = (await operation).result()
57+
response = await operation.result()
5858

5959
# Handle the response
6060
print(response)
Collapse file

‎packages/google-cloud-capacityplanner/samples/generated_samples/capacityplanner_v1beta_generated_usage_service_export_reservations_usage_async.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/samples/generated_samples/capacityplanner_v1beta_generated_usage_service_export_reservations_usage_async.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -52,11 +52,11 @@ async def sample_export_reservations_usage():
5252
)
5353

5454
# Make the request
55-
operation = client.export_reservations_usage(request=request)
55+
operation = await client.export_reservations_usage(request=request)
5656

5757
print("Waiting for operation to complete...")
5858

59-
response = (await operation).result()
59+
response = await operation.result()
6060

6161
# Handle the response
6262
print(response)
Collapse file

‎packages/google-cloud-capacityplanner/samples/generated_samples/capacityplanner_v1beta_generated_usage_service_export_usage_histories_async.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/samples/generated_samples/capacityplanner_v1beta_generated_usage_service_export_usage_histories_async.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -50,11 +50,11 @@ async def sample_export_usage_histories():
5050
)
5151

5252
# Make the request
53-
operation = client.export_usage_histories(request=request)
53+
operation = await client.export_usage_histories(request=request)
5454

5555
print("Waiting for operation to complete...")
5656

57-
response = (await operation).result()
57+
response = await operation.result()
5858

5959
# Handle the response
6060
print(response)
Collapse file

‎packages/google-cloud-capacityplanner/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-capacityplanner/setup.py
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2025 Google LLC
2+
# Copyright 2026 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -41,11 +41,11 @@
4141
release_status = "Development Status :: 5 - Production/Stable"
4242

4343
dependencies = [
44-
"google-api-core[grpc] >= 2.11.0, <3.0.0",
44+
"google-api-core[grpc] >= 2.17.1, <3.0.0",
4545
# Exclude incompatible versions of `google-auth`
4646
# See https://github.com/googleapis/google-cloud-python/issues/12364
4747
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
48-
"grpcio >= 1.33.2, < 2.0.0",
48+
"grpcio >= 1.44.0, < 2.0.0",
4949
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
5050
"proto-plus >= 1.22.3, <2.0.0",
5151
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
@@ -73,15 +73,14 @@
7373
long_description=readme,
7474
author="Google LLC",
7575
author_email="googleapis-packages@google.com",
76-
license="Apache 2.0",
76+
license="Apache-2.0",
7777
url=url,
7878
classifiers=[
7979
release_status,
8080
"Intended Audience :: Developers",
8181
"License :: OSI Approved :: Apache Software License",
8282
"Programming Language :: Python",
8383
"Programming Language :: Python :: 3",
84-
"Programming Language :: Python :: 3.9",
8584
"Programming Language :: Python :: 3.10",
8685
"Programming Language :: Python :: 3.11",
8786
"Programming Language :: Python :: 3.12",
@@ -92,7 +91,7 @@
9291
],
9392
platforms="Posix; MacOS X; Windows",
9493
packages=packages,
95-
python_requires=">=3.9",
94+
python_requires=">=3.10",
9695
install_requires=dependencies,
9796
extras_require=extras,
9897
include_package_data=True,
Collapse file
+11-10Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# -*- coding: utf-8 -*-
2-
# This constraints file is required for unit tests.
3-
# List all library dependencies and extras in this file.
4-
google-api-core
5-
google-auth
6-
grpcio
7-
proto-plus
8-
protobuf
9-
# cryptography is a direct dependency of google-auth
10-
cryptography
1+
# This constraints file is used to check that lower bounds
2+
# are correct in setup.py
3+
# List all library dependencies and extras in this file,
4+
# pinning their versions to their lower bounds.
5+
# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
6+
# then this file should have google-cloud-foo==1.14.0
7+
google-api-core==2.17.1
8+
google-auth==2.14.1
9+
grpcio==1.44.0
10+
proto-plus==1.22.3
11+
protobuf==4.25.8

0 commit comments

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