Skip to content

Commit

Permalink
feat: Add support for Python 3.12 (#557)
Browse files Browse the repository at this point in the history
* chore(python): Add Python 3.12

Source-Link: googleapis/synthtool@af16e6d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bacc3af03bff793a03add584537b36b5644342931ad989e3ba1171d3bd5399f5

* Update common files to include python 3.12

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Dec 1, 2023
1 parent 9e826d9 commit 091b4f1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ branchProtectionRules:
- 'unit_grpc_gcp-3.9'
- 'unit_grpc_gcp-3.10'
- 'unit_grpc_gcp-3.11'
- 'unit_grpc_gcp-3.12'
- 'unit-3.7'
- 'unit-3.8'
- 'unit-3.9'
- 'unit-3.10'
- 'unit-3.11'
- 'unit-3.12'
- 'unit_wo_grpc-3.10'
- 'unit_wo_grpc-3.11'
- 'unit_wo_grpc-3.12'
- 'cover'
- 'docs'
- 'docfx'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
exclude:
- option: "_wo_grpc"
python: 3.7
Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In order to add a feature:
documentation.

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

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

- To run a single unit test::

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


.. note::
Expand Down Expand Up @@ -202,12 +202,14 @@ We support:
- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_

.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/
.. _Python 3.11: https://docs.python.org/3.11/
.. _Python 3.12: https://docs.python.org/3.12/


Supported versions can be found in our ``noxfile.py`` `config`_.
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def unit(session):
default(session)


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
def unit_grpc_gcp(session):
"""Run the unit test suite with grpcio-gcp installed."""
constraints_path = str(
Expand All @@ -163,7 +163,7 @@ def unit_grpc_gcp(session):
default(session)


@nox.session(python=["3.8", "3.10", "3.11"])
@nox.session(python=["3.8", "3.10", "3.11", "3.12"])
def unit_wo_grpc(session):
"""Run the unit test suite w/o grpcio installed"""
default(session, install_grpc=False)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Topic :: Internet",
],
Expand Down

0 comments on commit 091b4f1

Please sign in to comment.