Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit d3e7791

Browse files
committed
remove remaining py3.8 references
1 parent 10fa1eb commit d3e7791

23 files changed

+25
-110
lines changed

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
14-
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
14+
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4

.kokoro/samples/python3.8/common.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ action {
1010
# Specify which tests to run
1111
env_vars: {
1212
key: "RUN_TESTS_SESSION"
13-
value: "py-3.8"
13+
value: "py-3.14"
1414
}
1515

1616
# Declare build specific Cloud project.
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
3737
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3838

3939
# Use the trampoline script to run in docker.
40-
build_file: "python-pubsub/.kokoro/trampoline_v2.sh"
40+
build_file: "python-pubsub/.kokoro/trampoline_v2.sh"

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ configure them just like the System Tests.
195195

196196
# Run all tests in a folder
197197
$ cd samples/snippets
198-
$ nox -s py-3.8
198+
$ nox -s py-3.14
199199

200200
# Run a single sample test
201201
$ cd samples/snippets
202-
$ nox -s py-3.8 -- -k <name of test>
202+
$ nox -s py-3.14 -- -k <name of test>
203203

204204
********************************************
205205
Note About ``README`` as it pertains to PyPI

pytest.ini

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ filterwarnings =
66
ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning
77
# Remove once https://github.com/grpc/grpc/issues/35086 is fixed
88
ignore:There is no current event loop:DeprecationWarning:grpc.aio._channel
9-
# Remove after support for Python 3.7 is dropped
10-
ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning
119
# Remove warning once https://github.com/googleapis/gapic-generator-python/issues/1938 is fixed
1210
ignore:The return_immediately flag is deprecated and should be set to False.:DeprecationWarning
1311
# Remove warning once https://github.com/googleapis/gapic-generator-python/issues/1939 is fixed
@@ -27,11 +25,6 @@ filterwarnings =
2725
ignore:You are using a Python version.*which Google will stop supporting in new releases of google\.api_core.*:FutureWarning
2826
ignore:You are using a non-supported Python version \(([\d\.]+)\)\. Google will not post any further updates to google\.api_core.*:FutureWarning
2927
ignore:You are using a Python version \(([\d\.]+)\) past its end of life\. Google will update google\.api_core.*:FutureWarning
30-
# Remove after support for Python 3.7 is dropped
31-
ignore:You are using a non-supported Python version \(3\.7:FutureWarning
32-
# Remove after support for Python 3.8 is dropped
33-
ignore:You are using a non-supported Python version \(3\.8:DeprecationWarning
34-
ignore:You are using a non-supported Python version \(3\.8:FutureWarning
3528
# Remove after support for Python 3.9 is dropped
3629
ignore:You are using a Python version \(3\.9:FutureWarning
3730
# Remove after support for Python 3.10 is dropped

tests/system.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@
2525
import time
2626
from typing import Any, Callable, cast, TypeVar
2727

28-
# special case python < 3.8
29-
if sys.version_info.major == 3 and sys.version_info.minor < 8:
30-
import mock
31-
else:
32-
from unittest import mock
28+
from unittest import mock
3329

3430
from flaky import flaky
3531
import pytest

tests/unit/gapic/pubsub_v1/test_publisher.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@
1515
#
1616
import os
1717

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
18+
19+
import mock
2420

2521
import grpc
2622
from grpc.experimental import aio

tests/unit/gapic/pubsub_v1/test_schema_service.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
#
1616
import os
1717

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
18+
import mock
2419

2520
import grpc
2621
from grpc.experimental import aio

tests/unit/gapic/pubsub_v1/test_subscriber.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
import os
1717
import warnings
1818

19-
# try/except added for compatibility with python < 3.8
20-
try:
21-
from unittest import mock
22-
from unittest.mock import AsyncMock # pragma: NO COVER
23-
except ImportError: # pragma: NO COVER
24-
import mock
19+
import mock
2520

2621
import grpc
2722
from grpc.experimental import aio

tests/unit/pubsub_v1/publisher/batch/test_thread.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
import threading
1818
import time
1919

20-
# special case python < 3.8
21-
if sys.version_info.major == 3 and sys.version_info.minor < 8:
22-
import mock
23-
else:
24-
from unittest import mock
20+
from unittest import mock
2521

2622
import pytest
2723

tests/unit/pubsub_v1/publisher/sequencer/test_ordered_sequencer.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
import concurrent.futures as futures
1616
import sys
1717

18-
# special case python < 3.8
19-
if sys.version_info.major == 3 and sys.version_info.minor < 8:
20-
import mock
21-
else:
22-
from unittest import mock
18+
from unittest import mock
2319

2420
import pytest
2521

0 commit comments

Comments
 (0)