FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: explicitly declare support for Python 3.13 by parthea · Pull Request #1741 · googleapis/google-auth-library-python · GitHub

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cfg  (5) .py  (4) .rst  (1) .txt  (2) All 4 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
37 changes: 37 additions & 0 deletions .kokoro/samples/python3.13/common.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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: "unit-3.13"
}

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

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-auth-library-python"

# Use the trampoline script to run in docker.
build_file: "google-auth-library-python/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-auth-library-python/.kokoro/build.sh"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-auth-library-python/.kokoro/samples-test-setup.sh"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.13/continuous.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.13/periodic-head.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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-auth-library-python/.kokoro/test-samples-against-head.sh"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.13/periodic.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.13/presubmit.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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"
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A few notes on making changes to ``google-auth-library-python``.
using ``nox -s docs``.

- The change must work fully on the following CPython versions:
3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 across macOS, Linux, and Windows.
3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 across macOS, Linux, and Windows.

- The codebase *must* have 100% test statement coverage after each commit.
You can test coverage via ``nox -e cover``.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def mypy(session):
session.run("mypy", "-p", "google", "-p", "tests", "-p", "tests_async")


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
def unit(session):
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
Expand Down
2 changes: 1 addition & 1 deletion samples/cloud-client/snippets/noxfile.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
]


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
def unit(session):
# constraints_path = str(
# CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
Expand Down
6 changes: 3 additions & 3 deletions samples/cloud-client/snippets/requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
google-cloud-compute==1.5.1
google-cloud-storage==2.5.0
google-auth==2.11.0
pytest==7.1.2
google-cloud-storage==3.1.0
google-auth==2.38.0
pytest==7.1.2
1 change: 1 addition & 0 deletions setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
Expand Down
Empty file.
16 changes: 16 additions & 0 deletions tests/test__oauth2client.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ def test__convert_appengine_app_assertion_credentials(
app_identity, mock_oauth2client_gae_imports
):

# `oauth2client` requires `cgi` which was removed in Python 3.13
# See https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/appengine.py#L20
# oauth2client is no longer being updated so this test must be skipped on newer Python Runtimes
if sys.version_info >= (3, 13): # pragma: NO COVER
pytest.skip(
"Skipping test for Python 3.13+ due to oauth2client incompatibility."
)

import oauth2client.contrib.appengine # type: ignore

service_account_id = "service_account_id"
Expand Down Expand Up @@ -165,6 +173,14 @@ def reset__oauth2client_module():
def test_import_has_app_engine(
mock_oauth2client_gae_imports, reset__oauth2client_module
):
# `oauth2client` requires `cgi` which was removed in Python 3.13
# See https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/appengine.py#L20
# oauth2client is no longer being updated so this test must be skipped on newer Python Runtimes
if sys.version_info >= (3, 13): # pragma: NO COVER
pytest.skip(
"Skipping test for Python 3.13+ due to oauth2client incompatibility."
)

importlib.reload(_oauth2client)
assert _oauth2client._HAS_APPENGINE

Expand Down

Back | FazBrowse Home | New Git URL