Skip to content

Commit edb93cc

Browse files
gcf-owl-bot[bot]partheaLinchin
authored
feat: Add support for Python 3.12 (#702)
* chore(python): Add Python 3.12 Source-Link: googleapis/synthtool@af16e6d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bacc3af03bff793a03add584537b36b5644342931ad989e3ba1171d3bd5399f5 * add python 3.12 to owlbot.py and setup.py * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add python 3.12 to noxfile.py * add constraints file for python 3.12 * (test) add module six to fix conda test failure * undo adding six to requirements.txt --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]> Co-authored-by: Lingqing Gan <[email protected]>
1 parent e52e8f8 commit edb93cc

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
11+
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v3

CONTRIBUTING.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.7, 3.8, 3.9, 3.10 and 3.11 on both UNIX and Windows.
25+
3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
7272

7373
- To run a single unit test::
7474

75-
$ nox -s unit-3.11 -- -k <name of test>
75+
$ nox -s unit-3.12 -- -k <name of test>
7676

7777

7878
.. note::
@@ -143,12 +143,12 @@ Running System Tests
143143
$ nox -s system
144144

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

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.7, 3.8, 3.9, 3.10 and 3.11.
151+
System tests are only configured to run under Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12.
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
@@ -226,12 +226,14 @@ We support:
226226
- `Python 3.9`_
227227
- `Python 3.10`_
228228
- `Python 3.11`_
229+
- `Python 3.12`_
229230

230231
.. _Python 3.7: https://docs.python.org/3.7/
231232
.. _Python 3.8: https://docs.python.org/3.8/
232233
.. _Python 3.9: https://docs.python.org/3.9/
233234
.. _Python 3.10: https://docs.python.org/3.10/
234235
.. _Python 3.11: https://docs.python.org/3.11/
236+
.. _Python 3.12: https://docs.python.org/3.12/
235237

236238

237239
Supported versions can be found in our ``noxfile.py`` `config`_.

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
DEFAULT_PYTHON_VERSION = "3.8"
3333

3434

35-
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
35+
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
3636
UNIT_TEST_STANDARD_DEPENDENCIES = [
3737
"mock",
3838
"asyncmock",
@@ -57,7 +57,7 @@
5757
UNIT_TEST_PYTHON_VERSIONS[-1],
5858
]
5959

60-
SYSTEM_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
60+
SYSTEM_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
6161
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
6262
"mock",
6363
"pytest",

owlbot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
}
3636
extras = ["tqdm"]
3737
templated_files = common.py_library(
38-
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11"],
39-
system_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11"],
38+
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
39+
system_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
4040
cov_level=96,
4141
unit_test_external_dependencies=["freezegun"],
4242
unit_test_extras=extras,

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"Programming Language :: Python :: 3.9",
9191
"Programming Language :: Python :: 3.10",
9292
"Programming Language :: Python :: 3.11",
93+
"Programming Language :: Python :: 3.12",
9394
"Operating System :: OS Independent",
9495
"Topic :: Internet",
9596
"Topic :: Scientific/Engineering",

testing/constraints-3.12.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)