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 cdc5dd5

Browse filesBrowse files
authored
fix(testutils): Drop support for Python 3.9 (#16948)
This PR updates \`google-cloud-testutils\` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated \`setup.py\` and \`noxfile.py\` to require Python 3.10+ and remove references to Python 3.9. * Constraints: Transferred lower bounds to \`constraints-3.10.txt\` and dropped \`constraints-3.9.txt\`. * Cleanup: Removed obsolete \`tests/test_version_warnings.py\`. * Expert Improvements: Modernized \`mypy.ini\` to 3.10 and added \`# version-scanner: ignore\` pragmas to test fixtures. Verified successfully with 35 passing unit tests under Python 3.10! Fixes internal issue: http://b/482126936 🦕
1 parent ef9945a commit cdc5dd5
Copy full SHA for cdc5dd5

7 files changed

+18-19Lines changed: 18 additions & 19 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[mypy]
2-
python_version = 3.9
2+
python_version = 3.10
33
exclude = tests/unit/resources/
Collapse file

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

Copy file name to clipboardExpand all lines: packages/google-cloud-testutils/noxfile.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# Error if a python version is missing
3434
nox.options.error_on_missing_interpreters = True
3535

36-
ALL_PYTHON = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
36+
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14"]
3737
DEFAULT_PYTHON_VERSION = "3.14"
3838
BLACK_VERSION = "black==23.7.0"
3939
RUFF_VERSION = "ruff==0.14.14"
@@ -157,7 +157,7 @@ def system(session):
157157
"--package-name",
158158
"google-cloud-testutils",
159159
"--constraints-file",
160-
"testing/constraints-3.9.txt",
160+
"testing/constraints-3.10.txt",
161161
)
162162

163163

@@ -171,7 +171,7 @@ def update_lower_bounds(session):
171171
"--package-name",
172172
"google-cloud-testutils",
173173
"--constraints-file",
174-
"testing/constraints-3.9.txt",
174+
"testing/constraints-3.10.txt",
175175
)
176176

177177

Collapse file

‎packages/google-cloud-testutils/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-testutils/setup.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,16 @@
5555
platforms="Posix; MacOS X; Windows",
5656
include_package_data=True,
5757
install_requires=(
58-
"google-auth >= 0.4.0",
58+
"google-auth >= 2.1.0",
5959
"click>=7.0.0",
6060
"packaging>=22.0",
6161
),
62-
python_requires=">=3.9",
62+
python_requires=">=3.10",
6363
classifiers=[
6464
"Development Status :: 4 - Beta",
6565
"Intended Audience :: Developers",
6666
"Operating System :: OS Independent",
6767
"Programming Language :: Python :: 3",
68-
"Programming Language :: Python :: 3.9",
6968
"Programming Language :: Python :: 3.10",
7069
"Programming Language :: Python :: 3.11",
7170
"Programming Language :: Python :: 3.12",
Collapse file
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
# Pin the version to the lower bound.
5+
#
6+
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
7+
# Then this file should have foo==1.14.0
8+
click==7.0.0
9+
google-auth==2.1.0
10+
packaging==22.0
Collapse file

‎packages/google-cloud-testutils/testing/constraints-3.9.txt‎

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

‎packages/google-cloud-testutils/tests/unit/resources/bad_package/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-testutils/tests/unit/resources/bad_package/setup.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
],
3737
install_requires=requirements,
3838
packages=setuptools.find_packages(),
39-
python_requires=">=3.9",
39+
python_requires=">=3.9", # version-scanner: ignore
4040
)
Collapse file

‎packages/google-cloud-testutils/tests/unit/resources/good_package/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-cloud-testutils/tests/unit/resources/good_package/setup.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
install_requires=requirements,
4343
extras_require=extras,
4444
packages=setuptools.find_packages(),
45-
python_requires=">=3.9",
45+
python_requires=">=3.9", # version-scanner: ignore
4646
)

0 commit comments

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