Skip to content

Commit 9b32164

Browse files
feat: Drop support for Python 3.7 and 3.8
Removes support for Python 3.7 and 3.8, establishing Python 3.9 as the new minimum supported version. This change involves: - Updating `python_requires` and classifiers in `setup.py`. - Modifying Python versions in `noxfile.py` (default, unit tests, system tests) and ensuring constraint file logic remains correct. - Updating the GitHub Actions workflow (`unittest.yml`) matrix, runner, and coverage job version. - Deleting constraint files for Python 3.7 and 3.8 (`testing/constraints-3.7.txt`, `testing/constraints-3.8.txt`). - Removing Kokoro sample configuration directories (`.kokoro/samples/python3.7/`, `.kokoro/samples/python3.8/`). - Updating supported version mentions in `README.rst`. - Removing 3.7 and 3.8 from the `ALL_VERSIONS` list in `samples/snippets/noxfile.py`.
1 parent d8046c0 commit 9b32164

17 files changed

+10
-166
lines changed

.github/workflows/unittest.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ on:
55
name: unittest
66
jobs:
77
unit:
8-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed.
9-
# Use ubuntu-22.04 until Python 3.7 is removed from the test matrix
10-
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
11-
runs-on: ubuntu-22.04
8+
# Use `ubuntu-latest` runner.
9+
runs-on: ubuntu-latest
1210
strategy:
1311
matrix:
14-
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
12+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
1513
steps:
1614
- name: Checkout
1715
uses: actions/checkout@v4
@@ -103,7 +101,7 @@ jobs:
103101
- name: Setup Python
104102
uses: actions/setup-python@v5
105103
with:
106-
python-version: "3.8"
104+
python-version: "3.9"
107105
- name: Install coverage
108106
run: |
109107
python -m pip install --upgrade setuptools pip wheel

.kokoro/samples/python3.7/common.cfg

-40
This file was deleted.

.kokoro/samples/python3.7/continuous.cfg

-6
This file was deleted.

.kokoro/samples/python3.7/periodic-head.cfg

-11
This file was deleted.

.kokoro/samples/python3.7/periodic.cfg

-6
This file was deleted.

.kokoro/samples/python3.7/presubmit.cfg

-6
This file was deleted.

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

-40
This file was deleted.

.kokoro/samples/python3.8/continuous.cfg

-6
This file was deleted.

.kokoro/samples/python3.8/periodic-head.cfg

-11
This file was deleted.

.kokoro/samples/python3.8/periodic.cfg

-6
This file was deleted.

.kokoro/samples/python3.8/presubmit.cfg

-6
This file was deleted.

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ dependencies.
3434

3535
Supported Python Versions
3636
^^^^^^^^^^^^^^^^^^^^^^^^^
37-
Python >= 3.7
37+
Python >= 3.9
3838

3939
Unsupported Python Versions
4040
^^^^^^^^^^^^^^^^^^^^^^^^^^^
41-
Python <= 3.6.
41+
Python <= 3.8.
4242

4343

4444
Mac/Linux

noxfile.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@
3232
ISORT_VERSION = "isort==5.11.0"
3333
LINT_PATHS = ["docs", "db_dtypes", "tests", "noxfile.py", "setup.py"]
3434

35-
DEFAULT_PYTHON_VERSION = "3.8"
35+
DEFAULT_PYTHON_VERSION = "3.9"
3636

3737
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
38-
"3.7",
39-
"3.8",
4038
"3.9",
4139
"3.10",
4240
"3.11",
@@ -56,7 +54,7 @@
5654
UNIT_TEST_EXTRAS: List[str] = []
5755
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
5856

59-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"]
57+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9"]
6058
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
6159
"mock",
6260
"pytest",

samples/snippets/noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8989

9090
# DO NOT EDIT - automatically generated.
9191
# All versions used to test samples.
92-
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
92+
ALL_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
9393

9494
# Any default versions that should be ignored.
9595
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]

setup.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ def readme():
6363
"License :: OSI Approved :: Apache Software License",
6464
"Programming Language :: Python",
6565
"Programming Language :: Python :: 3",
66-
"Programming Language :: Python :: 3.7",
67-
"Programming Language :: Python :: 3.8",
6866
"Programming Language :: Python :: 3.9",
6967
"Programming Language :: Python :: 3.10",
7068
"Programming Language :: Python :: 3.11",
@@ -75,6 +73,6 @@ def readme():
7573
],
7674
platforms="Posix; MacOS X; Windows",
7775
install_requires=dependencies,
78-
python_requires=">=3.7",
76+
python_requires=">=3.9",
7977
tests_require=["pytest"],
8078
)

testing/constraints-3.7.txt

-10
This file was deleted.

testing/constraints-3.8.txt

-2
This file was deleted.

0 commit comments

Comments
 (0)