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 cc4f36f

Browse filesBrowse files
authored
feat: regenerate remaining packages (#17078)
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 928a03c commit cc4f36f
Copy full SHA for cc4f36f

220 files changed

+1,626-3,253Lines changed: 1626 additions & 3253 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-ads-admanager/docs/conf.py‎

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

Copy file name to clipboardExpand all lines: packages/google-ads-admanager/google/ads/admanager_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.ad_break_service import AdBreakServiceClient
3327
from .services.ad_review_center_ad_service import AdReviewCenterAdServiceClient
@@ -572,28 +566,17 @@
572566
# An older version of api_core is installed which does not define the
573567
# functions above. We do equivalent checks manually.
574568
try:
575-
import sys
576569
import warnings
577570

578571
_py_version_str = sys.version.split()[0]
579572
_package_label = "google.ads.admanager_v1"
580-
if sys.version_info < (3, 9):
573+
if sys.version_info < (3, 10):
581574
warnings.warn(
582575
"You are using a non-supported Python version "
583576
+ f"({_py_version_str}). Google will not post any further "
584577
+ f"updates to {_package_label} supporting this Python version. "
585578
+ "Please upgrade to the latest Python version, or at "
586-
+ f"least to Python 3.9, and then update {_package_label}.",
587-
FutureWarning,
588-
)
589-
if sys.version_info[:2] == (3, 9):
590-
warnings.warn(
591-
f"You are using a Python version ({_py_version_str}) "
592-
+ f"which Google will stop supporting in {_package_label} in "
593-
+ "January 2026. Please "
594-
+ "upgrade to the latest Python version, or at "
595-
+ "least to Python 3.10, before then, and "
596-
+ f"then update {_package_label}.",
579+
+ f"least to Python 3.10, and then update {_package_label}.",
597580
FutureWarning,
598581
)
599582

Collapse file

‎packages/google-ads-admanager/noxfile.py‎

Copy file name to clipboardExpand all lines: packages/google-ads-admanager/noxfile.py
+1-2Lines changed: 1 addition & 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.
@@ -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",
Collapse file

‎packages/google-ads-admanager/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-ads-admanager/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.
@@ -39,11 +39,11 @@
3939
release_status = "Development Status :: 5 - Production/Stable"
4040

4141
dependencies = [
42-
"google-api-core[grpc] >= 2.11.0, <3.0.0",
42+
"google-api-core[grpc] >= 2.17.1, <3.0.0",
4343
# Exclude incompatible versions of `google-auth`
4444
# See https://github.com/googleapis/google-cloud-python/issues/12364
4545
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
46-
"grpcio >= 1.33.2, < 2.0.0",
46+
"grpcio >= 1.44.0, < 2.0.0",
4747
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
4848
"proto-plus >= 1.22.3, <2.0.0",
4949
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
@@ -71,15 +71,14 @@
7171
long_description=readme,
7272
author="Google LLC",
7373
author_email="googleapis-packages@google.com",
74-
license="Apache 2.0",
74+
license="Apache-2.0",
7575
url=url,
7676
classifiers=[
7777
release_status,
7878
"Intended Audience :: Developers",
7979
"License :: OSI Approved :: Apache Software License",
8080
"Programming Language :: Python",
8181
"Programming Language :: Python :: 3",
82-
"Programming Language :: Python :: 3.9",
8382
"Programming Language :: Python :: 3.10",
8483
"Programming Language :: Python :: 3.11",
8584
"Programming Language :: Python :: 3.12",
@@ -90,7 +89,7 @@
9089
],
9190
platforms="Posix; MacOS X; Windows",
9291
packages=packages,
93-
python_requires=">=3.9",
92+
python_requires=">=3.10",
9493
install_requires=dependencies,
9594
extras_require=extras,
9695
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-ads-admanager/testing/constraints-3.9.txt‎

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

‎packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_ad_break_service.py‎

Copy file name to clipboardExpand all lines: packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_ad_break_service.py
+9-15Lines changed: 9 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
@@ -1268,7 +1262,7 @@ def test_get_ad_break_rest_required_fields(
12681262

12691263
expected_params = [("$alt", "json;enum-encoding=int")]
12701264
actual_params = req.call_args.kwargs["params"]
1271-
assert expected_params == actual_params
1265+
assert sorted(expected_params) == sorted(actual_params)
12721266

12731267

12741268
def test_get_ad_break_rest_unset_required_fields():
@@ -1458,7 +1452,7 @@ def test_list_ad_breaks_rest_required_fields(
14581452

14591453
expected_params = [("$alt", "json;enum-encoding=int")]
14601454
actual_params = req.call_args.kwargs["params"]
1461-
assert expected_params == actual_params
1455+
assert sorted(expected_params) == sorted(actual_params)
14621456

14631457

14641458
def test_list_ad_breaks_rest_unset_required_fields():
@@ -1715,7 +1709,7 @@ def test_create_ad_break_rest_required_fields(
17151709

17161710
expected_params = [("$alt", "json;enum-encoding=int")]
17171711
actual_params = req.call_args.kwargs["params"]
1718-
assert expected_params == actual_params
1712+
assert sorted(expected_params) == sorted(actual_params)
17191713

17201714

17211715
def test_create_ad_break_rest_unset_required_fields():
@@ -1903,7 +1897,7 @@ def test_update_ad_break_rest_required_fields(
19031897

19041898
expected_params = [("$alt", "json;enum-encoding=int")]
19051899
actual_params = req.call_args.kwargs["params"]
1906-
assert expected_params == actual_params
1900+
assert sorted(expected_params) == sorted(actual_params)
19071901

19081902

19091903
def test_update_ad_break_rest_unset_required_fields():
@@ -2084,7 +2078,7 @@ def test_delete_ad_break_rest_required_fields(
20842078

20852079
expected_params = [("$alt", "json;enum-encoding=int")]
20862080
actual_params = req.call_args.kwargs["params"]
2087-
assert expected_params == actual_params
2081+
assert sorted(expected_params) == sorted(actual_params)
20882082

20892083

20902084
def test_delete_ad_break_rest_unset_required_fields():
Collapse file

‎packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_ad_review_center_ad_service.py‎

Copy file name to clipboardExpand all lines: packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_ad_review_center_ad_service.py
+7-13Lines changed: 7 additions & 13 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
@@ -1337,7 +1331,7 @@ def test_search_ad_review_center_ads_rest_required_fields(
13371331

13381332
expected_params = [("$alt", "json;enum-encoding=int")]
13391333
actual_params = req.call_args.kwargs["params"]
1340-
assert expected_params == actual_params
1334+
assert sorted(expected_params) == sorted(actual_params)
13411335

13421336

13431337
def test_search_ad_review_center_ads_rest_unset_required_fields():
@@ -1609,7 +1603,7 @@ def test_batch_allow_ad_review_center_ads_rest_required_fields(
16091603

16101604
expected_params = [("$alt", "json;enum-encoding=int")]
16111605
actual_params = req.call_args.kwargs["params"]
1612-
assert expected_params == actual_params
1606+
assert sorted(expected_params) == sorted(actual_params)
16131607

16141608

16151609
def test_batch_allow_ad_review_center_ads_rest_unset_required_fields():
@@ -1806,7 +1800,7 @@ def test_batch_block_ad_review_center_ads_rest_required_fields(
18061800

18071801
expected_params = [("$alt", "json;enum-encoding=int")]
18081802
actual_params = req.call_args.kwargs["params"]
1809-
assert expected_params == actual_params
1803+
assert sorted(expected_params) == sorted(actual_params)
18101804

18111805

18121806
def test_batch_block_ad_review_center_ads_rest_unset_required_fields():

0 commit comments

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