Skip to content

Commit 928a03c

Browse files
authored
feat: regenerate google-cloud-[t-w] packages (#17076)
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 558920b commit 928a03c

601 files changed

Lines changed: 3652 additions & 6013 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-talent/docs/conf.py

Lines 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-talent"
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

packages/google-cloud-talent/google/cloud/talent_v4/__init__.py

Lines 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.company_service import CompanyServiceAsyncClient, CompanyServiceClient
3327
from .services.completion import CompletionAsyncClient, CompletionClient
@@ -107,28 +101,17 @@
107101
# An older version of api_core is installed which does not define the
108102
# functions above. We do equivalent checks manually.
109103
try:
110-
import sys
111104
import warnings
112105

113106
_py_version_str = sys.version.split()[0]
114107
_package_label = "google.cloud.talent_v4"
115-
if sys.version_info < (3, 9):
108+
if sys.version_info < (3, 10):
116109
warnings.warn(
117110
"You are using a non-supported Python version "
118111
+ f"({_py_version_str}). Google will not post any further "
119112
+ f"updates to {_package_label} supporting this Python version. "
120113
+ "Please upgrade to the latest Python version, or at "
121-
+ f"least to Python 3.9, and then update {_package_label}.",
122-
FutureWarning,
123-
)
124-
if sys.version_info[:2] == (3, 9):
125-
warnings.warn(
126-
f"You are using a Python version ({_py_version_str}) "
127-
+ f"which Google will stop supporting in {_package_label} in "
128-
+ "January 2026. Please "
129-
+ "upgrade to the latest Python version, or at "
130-
+ "least to Python 3.10, before then, and "
131-
+ f"then update {_package_label}.",
114+
+ f"least to Python 3.10, and then update {_package_label}.",
132115
FutureWarning,
133116
)
134117

packages/google-cloud-talent/google/cloud/talent_v4/services/job_service/async_client.py

Lines 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.
@@ -474,11 +474,11 @@ async def sample_batch_create_jobs():
474474
)
475475
476476
# Make the request
477-
operation = client.batch_create_jobs(request=request)
477+
operation = await client.batch_create_jobs(request=request)
478478
479479
print("Waiting for operation to complete...")
480480
481-
response = (await operation).result()
481+
response = await operation.result()
482482
483483
# Handle the response
484484
print(response)
@@ -876,11 +876,11 @@ async def sample_batch_update_jobs():
876876
)
877877
878878
# Make the request
879-
operation = client.batch_update_jobs(request=request)
879+
operation = await client.batch_update_jobs(request=request)
880880
881881
print("Waiting for operation to complete...")
882882
883-
response = (await operation).result()
883+
response = await operation.result()
884884
885885
# Handle the response
886886
print(response)
@@ -1122,11 +1122,11 @@ async def sample_batch_delete_jobs():
11221122
)
11231123
11241124
# Make the request
1125-
operation = client.batch_delete_jobs(request=request)
1125+
operation = await client.batch_delete_jobs(request=request)
11261126
11271127
print("Waiting for operation to complete...")
11281128
1129-
response = (await operation).result()
1129+
response = await operation.result()
11301130
11311131
# Handle the response
11321132
print(response)

packages/google-cloud-talent/google/cloud/talent_v4beta1/__init__.py

Lines 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.company_service import CompanyServiceAsyncClient, CompanyServiceClient
3327
from .services.completion import CompletionAsyncClient, CompletionClient
@@ -104,28 +98,17 @@
10498
# An older version of api_core is installed which does not define the
10599
# functions above. We do equivalent checks manually.
106100
try:
107-
import sys
108101
import warnings
109102

110103
_py_version_str = sys.version.split()[0]
111104
_package_label = "google.cloud.talent_v4beta1"
112-
if sys.version_info < (3, 9):
105+
if sys.version_info < (3, 10):
113106
warnings.warn(
114107
"You are using a non-supported Python version "
115108
+ f"({_py_version_str}). Google will not post any further "
116109
+ f"updates to {_package_label} supporting this Python version. "
117110
+ "Please upgrade to the latest Python version, or at "
118-
+ f"least to Python 3.9, and then update {_package_label}.",
119-
FutureWarning,
120-
)
121-
if sys.version_info[:2] == (3, 9):
122-
warnings.warn(
123-
f"You are using a Python version ({_py_version_str}) "
124-
+ f"which Google will stop supporting in {_package_label} in "
125-
+ "January 2026. Please "
126-
+ "upgrade to the latest Python version, or at "
127-
+ "least to Python 3.10, before then, and "
128-
+ f"then update {_package_label}.",
111+
+ f"least to Python 3.10, and then update {_package_label}.",
129112
FutureWarning,
130113
)
131114

packages/google-cloud-talent/google/cloud/talent_v4beta1/services/job_service/async_client.py

Lines changed: 5 additions & 5 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.
@@ -473,11 +473,11 @@ async def sample_batch_create_jobs():
473473
)
474474
475475
# Make the request
476-
operation = client.batch_create_jobs(request=request)
476+
operation = await client.batch_create_jobs(request=request)
477477
478478
print("Waiting for operation to complete...")
479479
480-
response = (await operation).result()
480+
response = await operation.result()
481481
482482
# Handle the response
483483
print(response)
@@ -860,11 +860,11 @@ async def sample_batch_update_jobs():
860860
)
861861
862862
# Make the request
863-
operation = client.batch_update_jobs(request=request)
863+
operation = await client.batch_update_jobs(request=request)
864864
865865
print("Waiting for operation to complete...")
866866
867-
response = (await operation).result()
867+
response = await operation.result()
868868
869869
# Handle the response
870870
print(response)

packages/google-cloud-talent/noxfile.py

Lines 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",

packages/google-cloud-talent/samples/generated_samples/jobs_v4_generated_job_service_batch_create_jobs_async.py

Lines 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.
@@ -51,11 +51,11 @@ async def sample_batch_create_jobs():
5151
)
5252

5353
# Make the request
54-
operation = client.batch_create_jobs(request=request)
54+
operation = await client.batch_create_jobs(request=request)
5555

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

58-
response = (await operation).result()
58+
response = await operation.result()
5959

6060
# Handle the response
6161
print(response)

packages/google-cloud-talent/samples/generated_samples/jobs_v4_generated_job_service_batch_delete_jobs_async.py

Lines 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.
@@ -44,11 +44,11 @@ async def sample_batch_delete_jobs():
4444
)
4545

4646
# Make the request
47-
operation = client.batch_delete_jobs(request=request)
47+
operation = await client.batch_delete_jobs(request=request)
4848

4949
print("Waiting for operation to complete...")
5050

51-
response = (await operation).result()
51+
response = await operation.result()
5252

5353
# Handle the response
5454
print(response)

packages/google-cloud-talent/samples/generated_samples/jobs_v4_generated_job_service_batch_update_jobs_async.py

Lines 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.
@@ -51,11 +51,11 @@ async def sample_batch_update_jobs():
5151
)
5252

5353
# Make the request
54-
operation = client.batch_update_jobs(request=request)
54+
operation = await client.batch_update_jobs(request=request)
5555

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

58-
response = (await operation).result()
58+
response = await operation.result()
5959

6060
# Handle the response
6161
print(response)

packages/google-cloud-talent/samples/generated_samples/jobs_v4beta1_generated_job_service_batch_create_jobs_async.py

Lines 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.
@@ -51,11 +51,11 @@ async def sample_batch_create_jobs():
5151
)
5252

5353
# Make the request
54-
operation = client.batch_create_jobs(request=request)
54+
operation = await client.batch_create_jobs(request=request)
5555

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

58-
response = (await operation).result()
58+
response = await operation.result()
5959

6060
# Handle the response
6161
print(response)

0 commit comments

Comments
 (0)