Skip to content

Commit 4e2092b

Browse files
feat: Adds Python 3.13 support (#319)
* feat: Adds Python 3.13 support * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix(kokoro): Preserve NOX_SESSION in presubmit.cfg * Apply suggestion from @chalmerlowe * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix(kokoro): Update path to presubmit.cfg in owlbot.py * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Apply suggestion from @chalmerlowe * Apply suggestion from @chalmerlowe * Update owlbot.py * Update .kokoro/presubmit/presubmit.cfg * updates owlbot.py and noxfile.py to use 3.10 for system and linting. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * updates owlbot.py to try to account for system test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Apply suggestion from @chalmerlowe * Apply suggestion from @chalmerlowe * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Apply suggestion from @chalmerlowe * Apply suggestion from @chalmerlowe * Apply suggestion from @chalmerlowe * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Apply suggestion from @chalmerlowe * Apply suggestion from @chalmerlowe * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Apply suggestion from @chalmerlowe * updates lint version to match default of 3.10 * updates system test version to match default of 3.10 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * updates lint version to match default of 3.10 redux * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * modified the owlbot to take advantage of a capability in common.py_library * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 9cb4f60 commit 4e2092b

File tree

7 files changed

+33
-7
lines changed

7 files changed

+33
-7
lines changed

packages/google-cloud-dns/.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.8"
15+
python-version: "3.10"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

packages/google-cloud-dns/.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Setup Python
4646
uses: actions/setup-python@v5
4747
with:
48-
python-version: "3.8"
48+
python-version: "3.10"
4949
- name: Install coverage
5050
run: |
5151
python -m pip install --upgrade setuptools pip wheel
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
# Format: //devtools/kokoro/config/proto/build.proto
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "NOX_SESSION"
5+
value: "system blacken format"
6+
}

packages/google-cloud-dns/CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ Running System Tests
143143
$ nox -s system
144144

145145
# Run a single system test
146-
$ nox -s system-3.8 -- -k <name of test>
146+
$ nox -s system-3.10 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.8.
151+
System tests are only configured to run under Python 3.10.
152152
For expediency, we do not run them in older versions of Python 3.
153153

154154
This alone will not run the tests. You'll need to change some local

packages/google-cloud-dns/noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
ISORT_VERSION = "isort==5.11.0"
3333
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3434

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

3737
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
3838
"3.7",
@@ -56,7 +56,7 @@
5656
UNIT_TEST_EXTRAS: List[str] = []
5757
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
5858

59-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"]
59+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.10"]
6060
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
6161
"mock",
6262
"pytest",

packages/google-cloud-dns/owlbot.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,28 @@
2727
# ----------------------------------------------------------------------------
2828
templated_files = common.py_library(
2929
microgenerator=True,
30+
default_python_version="3.10",
31+
system_test_python_versions=["3.10"],
3032
)
3133
s.move(templated_files, excludes=["docs/multiprocessing.rst", "README.rst"])
3234

35+
s.replace(
36+
".github/workflows/lint.yml",
37+
'python-version: "3.8"',
38+
'python-version: "3.10"'
39+
)
40+
41+
s.replace(
42+
".kokoro/presubmit/presubmit.cfg",
43+
"""# Format: //devtools/kokoro/config/proto/build.proto""",
44+
"""# Format: //devtools/kokoro/config/proto/build.proto
45+
46+
env_vars: {
47+
key: "NOX_SESSION"
48+
value: "system blacken format"
49+
}""",
50+
)
51+
3352
python.py_samples(skip_readmes=True)
3453

3554
s.replace(
@@ -40,5 +59,6 @@
4059
session.install\("--pre", "grpcio!=1.52.0rc1"\)""",
4160
""
4261
)
62+
4363
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
4464

packages/google-cloud-dns/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"Programming Language :: Python :: 3.10",
8484
"Programming Language :: Python :: 3.11",
8585
"Programming Language :: Python :: 3.12",
86+
"Programming Language :: Python :: 3.13",
8687
"Operating System :: OS Independent",
8788
"Topic :: Internet",
8889
],

0 commit comments

Comments
 (0)