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 39c9882

Browse filesBrowse files
authored
feat: regenerate google-cloud-a packages (#17089)
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 ceacb14 commit 39c9882
Copy full SHA for 39c9882

310 files changed

+1,731-2,947Lines changed: 1731 additions & 2947 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-access-approval/docs/conf.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-access-approval/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-access-approval"
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-access-approval/google/cloud/accessapproval_v1/__init__.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-access-approval/google/cloud/accessapproval_v1/__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.access_approval import AccessApprovalAsyncClient, AccessApprovalClient
3327
from .types.accessapproval import (
@@ -63,28 +57,17 @@
6357
# An older version of api_core is installed which does not define the
6458
# functions above. We do equivalent checks manually.
6559
try:
66-
import sys
6760
import warnings
6861

6962
_py_version_str = sys.version.split()[0]
7063
_package_label = "google.cloud.accessapproval_v1"
71-
if sys.version_info < (3, 9):
64+
if sys.version_info < (3, 10):
7265
warnings.warn(
7366
"You are using a non-supported Python version "
7467
+ f"({_py_version_str}). Google will not post any further "
7568
+ f"updates to {_package_label} supporting this Python version. "
7669
+ "Please upgrade to the latest Python version, or at "
77-
+ f"least to Python 3.9, and then update {_package_label}.",
78-
FutureWarning,
79-
)
80-
if sys.version_info[:2] == (3, 9):
81-
warnings.warn(
82-
f"You are using a Python version ({_py_version_str}) "
83-
+ f"which Google will stop supporting in {_package_label} in "
84-
+ "January 2026. Please "
85-
+ "upgrade to the latest Python version, or at "
86-
+ "least to Python 3.10, before then, and "
87-
+ f"then update {_package_label}.",
70+
+ f"least to Python 3.10, and then update {_package_label}.",
8871
FutureWarning,
8972
)
9073

Collapse file

‎packages/google-cloud-access-approval/noxfile.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-access-approval/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-access-approval/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-access-approval/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
Collapse file

‎packages/google-cloud-access-approval/testing/constraints-3.9.txt‎

Copy file name to clipboardExpand all lines: packages/google-cloud-access-approval/testing/constraints-3.9.txt
-13Lines changed: 0 additions & 13 deletions
This file was deleted.
Collapse file

‎packages/google-cloud-access-approval/tests/unit/gapic/accessapproval_v1/test_access_approval.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-access-approval/tests/unit/gapic/accessapproval_v1/test_access_approval.py
+5-15Lines changed: 5 additions & 15 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.
@@ -13,18 +13,12 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import os
17-
18-
# try/except added for compatibility with python < 3.8
19-
try:
20-
from unittest import mock
21-
from unittest.mock import AsyncMock # pragma: NO COVER
22-
except ImportError: # pragma: NO COVER
23-
import mock
24-
2516
import json
2617
import math
18+
import os
2719
from collections.abc import AsyncIterable, Iterable, Mapping, Sequence
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
2822

2923
import grpc
3024
import pytest
@@ -1854,11 +1848,7 @@ async def test_list_approval_requests_async_pages():
18541848
RuntimeError,
18551849
)
18561850
pages = []
1857-
# Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch`
1858-
# See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372
1859-
async for page_ in ( # pragma: no branch
1860-
await client.list_approval_requests(request={})
1861-
).pages:
1851+
async for page_ in (await client.list_approval_requests(request={})).pages:
18621852
pages.append(page_)
18631853
for page_, token in zip(pages, ["abc", "def", "ghi", ""]):
18641854
assert page_.raw_page.next_page_token == token
Collapse file

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

Copy file name to clipboardExpand all lines: packages/google-cloud-advisorynotifications/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-advisorynotifications"
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-advisorynotifications/google/cloud/advisorynotifications_v1/__init__.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-advisorynotifications/google/cloud/advisorynotifications_v1/__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.advisory_notifications_service import (
3327
AdvisoryNotificationsServiceAsyncClient,
@@ -61,28 +55,17 @@
6155
# An older version of api_core is installed which does not define the
6256
# functions above. We do equivalent checks manually.
6357
try:
64-
import sys
6558
import warnings
6659

6760
_py_version_str = sys.version.split()[0]
6861
_package_label = "google.cloud.advisorynotifications_v1"
69-
if sys.version_info < (3, 9):
62+
if sys.version_info < (3, 10):
7063
warnings.warn(
7164
"You are using a non-supported Python version "
7265
+ f"({_py_version_str}). Google will not post any further "
7366
+ f"updates to {_package_label} supporting this Python version. "
7467
+ "Please upgrade to the latest Python version, or at "
75-
+ f"least to Python 3.9, and then update {_package_label}.",
76-
FutureWarning,
77-
)
78-
if sys.version_info[:2] == (3, 9):
79-
warnings.warn(
80-
f"You are using a Python version ({_py_version_str}) "
81-
+ f"which Google will stop supporting in {_package_label} in "
82-
+ "January 2026. Please "
83-
+ "upgrade to the latest Python version, or at "
84-
+ "least to Python 3.10, before then, and "
85-
+ f"then update {_package_label}.",
68+
+ f"least to Python 3.10, and then update {_package_label}.",
8669
FutureWarning,
8770
)
8871

Collapse file

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

Copy file name to clipboardExpand all lines: packages/google-cloud-advisorynotifications/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",

0 commit comments

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