Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ branchProtectionRules:
- 'Samples - Python 3.12'
- 'Samples - Python 3.13'
- 'Samples - Python 3.14'
- 'Samples - Python 3.15'
permissionRules:
- team: actools-python
permission: admin
Expand Down
34 changes: 34 additions & 0 deletions .kokoro/samples/python3.15/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "py-3.15"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-python-client/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}

# Download secrets for samples
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-api-python-client/.kokoro/trampoline.sh"
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.15/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
11 changes: 11 additions & 0 deletions .kokoro/samples/python3.15/periodic-head.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-python-client/.kokoro/test-samples-against-head.sh"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.15/periodic.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.15/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
49 changes: 6 additions & 43 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.. Generated by synthtool. DO NOT EDIT!
############
Contributing
############
Expand All @@ -21,8 +20,8 @@ In order to add a feature:
- The feature must be documented in both the API and narrative
documentation.

- The feature must work fully on the following CPython versions:
3.10, 3.11, 3.12, 3.13, and 3.14 on both UNIX and Windows.
- The feature must work fully on all supported CPython versions 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 @@ -72,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.14 -- -k <name of test>
$ nox -s unit-<python_version> -- -k <name of test>


.. note::
Expand Down Expand Up @@ -143,13 +142,7 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system-3.10 -- -k <name of test>


.. note::

System tests are only configured to run under Python 3.10.
For expediency, we do not run them in older versions of Python 3.
$ nox -s system-<python_version> -- -k <name of test>

This alone will not run the tests. You'll need to change some local
auth settings and change some configuration in your project to
Expand Down Expand Up @@ -195,11 +188,11 @@ configure them just like the System Tests.

# Run all tests in a folder
$ cd samples/snippets
$ nox -s py-3.10
$ nox -s py-<python_version>

# Run a single sample test
$ cd samples/snippets
$ nox -s py-3.10 -- -k <name of test>
$ nox -s py-<python_version> -- -k <name of test>

********************************************
Note About ``README`` as it pertains to PyPI
Expand All @@ -219,40 +212,10 @@ may cause problems creating links or rendering the description.
Supported Python Versions
*************************

We support:


- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_
- `Python 3.14`_


.. _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/
.. _Python 3.13: https://docs.python.org/3.13/
.. _Python 3.14: https://docs.python.org/3.14/


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

.. _config: https://github.com/googleapis/google-api-python-client/blob/main/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.10.
Reasons for this include:

- Encouraging use of newest versions of Python 3
- Taking the lead of `prominent`_ open-source `projects`_
- `Unicode literal support`_ which allows for a cleaner codebase that
works in both Python 2 and Python 3

.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
.. _projects: http://flask.pocoo.org/docs/0.10/python3/
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/

**********
Versioning
**********
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ virtualenv <your-env>

## Supported Python Versions

Python 3.10, 3.11, 3.12, 3.13, and 3.14 are fully supported and tested. This library may work on later versions of 3, but we do not currently run tests against those versions.
Python 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15 are fully supported and tested. This library may work on later versions of 3, but we do not currently run tests against those versions.

## Unsupported Python Versions

Expand Down
3 changes: 2 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"unit-3.12",
"unit-3.13",
"unit-3.14",
"unit-3.15",
Comment thread
daniel-sanche marked this conversation as resolved.
"lint",
"format",
"scripts",
Expand Down Expand Up @@ -96,7 +97,7 @@ def format(session):
)


@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"])
@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"])
@nox.parametrize(
"oauth2client",
[
Expand Down
1 change: 1 addition & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"3.12",
"3.13",
"3.14",
"3.15",
],
)

Expand Down
2 changes: 1 addition & 1 deletion samples/compute/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
return ret


ALL_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
ALL_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

# Any default versions that should be ignored.
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
Expand Down
Empty file added testing/constraints-3.15.txt
Empty file.
Loading