Skip to content

Commit fd96a82

Browse files
committed
chore(gapic-generator): update goldens for redis_selective
1 parent 6dc61c2 commit fd96a82

5 files changed

Lines changed: 7 additions & 40 deletions

File tree

packages/gapic-generator/tests/integration/goldens/redis_selective/google/cloud/redis_v1/__init__.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@
2020

2121
__version__ = package_version.__version__
2222

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

3025

3126
from .services.cloud_redis import CloudRedisClient
@@ -58,20 +53,12 @@
5853

5954
_py_version_str = sys.version.split()[0]
6055
_package_label = "google.cloud.redis_v1"
61-
if sys.version_info < (3, 9):
56+
if sys.version_info < (3, 10):
6257
warnings.warn("You are using a non-supported Python version " +
6358
f"({_py_version_str}). Google will not post any further " +
6459
f"updates to {_package_label} supporting this Python version. " +
6560
"Please upgrade to the latest Python version, or at " +
66-
f"least to Python 3.9, and then update {_package_label}.",
67-
FutureWarning)
68-
if sys.version_info[:2] == (3, 9):
69-
warnings.warn(f"You are using a Python version ({_py_version_str}) " +
70-
f"which Google will stop supporting in {_package_label} in " +
71-
"January 2026. Please " +
72-
"upgrade to the latest Python version, or at " +
73-
"least to Python 3.10, before then, and " +
74-
f"then update {_package_label}.",
61+
f"least to Python 3.10, and then update {_package_label}.",
7562
FutureWarning)
7663

7764
def parse_version_to_tuple(version_string: str):

packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
LINT_PATHS.append("samples")
3333

3434
ALL_PYTHON = [
35-
"3.9",
3635
"3.10",
3736
"3.11",
3837
"3.12",

packages/gapic-generator/tests/integration/goldens/redis_selective/setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"License :: OSI Approved :: Apache Software License",
8585
"Programming Language :: Python",
8686
"Programming Language :: Python :: 3",
87-
"Programming Language :: Python :: 3.9",
8887
"Programming Language :: Python :: 3.10",
8988
"Programming Language :: Python :: 3.11",
9089
"Programming Language :: Python :: 3.12",
@@ -95,7 +94,7 @@
9594
],
9695
platforms="Posix; MacOS X; Windows",
9796
packages=packages,
98-
python_requires=">=3.9",
97+
python_requires=">=3.10",
9998
install_requires=dependencies,
10099
extras_require=extras,
101100
include_package_data=True,

packages/gapic-generator/tests/integration/goldens/redis_selective/testing/constraints-3.9.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/gapic-generator/tests/integration/goldens/redis_selective/tests/unit/gapic/redis_v1/test_cloud_redis.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
# try/except added for compatibility with python < 3.8
18-
try:
19-
from unittest import mock
20-
from unittest.mock import AsyncMock # pragma: NO COVER
21-
except ImportError: # pragma: NO COVER
22-
import mock
17+
from unittest import mock
18+
from unittest.mock import AsyncMock
2319

2420
import grpc
2521
from grpc.experimental import aio
@@ -1478,9 +1474,7 @@ async def test_list_instances_async_pages():
14781474
RuntimeError,
14791475
)
14801476
pages = []
1481-
# Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch`
1482-
# See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372
1483-
async for page_ in ( # pragma: no branch
1477+
async for page_ in (
14841478
await client.list_instances(request={})
14851479
).pages:
14861480
pages.append(page_)

0 commit comments

Comments
 (0)