-
Notifications
You must be signed in to change notification settings - Fork 345
feat: support Python 3.14 #1822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Linchin
wants to merge
15
commits into
googleapis:main
Choose a base branch
from
Linchin:py314
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4029b8f
feat: support Python 3.14
Linchin b67156f
add 3.14 unit test
Linchin 87de80b
add samples test for 3.14
Linchin e290be3
add samples test config
Linchin ac347ac
add constraints file for 3.14
Linchin 1a24e69
use higher pytest version for python 3.14
Linchin 6fa1fe3
update pytest dependency
Linchin 06efb03
make unit test test_unsupported_session async
Linchin 5128e3c
make 2 unit tests async
Linchin 9ef18cc
remove await
Linchin 5cd841d
update requirements
Linchin f5add77
add value for env var AUTHORIZED_USER_FILE
Linchin 7aa77db
Merge branch 'main' into py314
Linchin 1aeb625
remove AUTHORIZED_USER_FILE
Linchin f46a849
Merge branch 'main' into py314
Linchin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.14" | ||
| } | ||
|
|
||
| # 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" | ||
| } |
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" | ||
| } |
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" | ||
| } |
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" | ||
| } |
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" | ||
| } |
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
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
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,5 @@ | ||
| google-cloud-compute==1.5.1 | ||
| google-cloud-storage==3.1.0 | ||
| google-auth==2.38.0 | ||
| pytest==7.1.2 | ||
| pytest===7.1.2; python_version <= '3.13' | ||
| pytest==8.4.2; python_version == '3.14' | ||
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
Empty file.
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 |
|---|---|---|
|
|
@@ -115,10 +115,11 @@ def make_with_parameter_request(self): | |
| http = aiohttp.ClientSession(auto_decompress=False) | ||
| return aiohttp_requests.Request(http) | ||
|
|
||
| def test_unsupported_session(self): | ||
| @pytest.mark.asyncio | ||
| async def test_unsupported_session(self): | ||
| http = aiohttp.ClientSession(auto_decompress=True) | ||
| with pytest.raises(ValueError): | ||
| aiohttp_requests.Request(http) | ||
| await aiohttp_requests.Request(http) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why were these tests changed to async? |
||
|
|
||
| def test_timeout(self): | ||
| http = mock.create_autospec( | ||
|
|
@@ -144,11 +145,13 @@ class TestAuthorizedSession(object): | |
| TEST_URL = "http://example.com/" | ||
| method = "GET" | ||
|
|
||
| def test_constructor(self): | ||
| @pytest.mark.asyncio | ||
| async def test_constructor(self): | ||
| authed_session = aiohttp_requests.AuthorizedSession(mock.sentinel.credentials) | ||
| assert authed_session.credentials == mock.sentinel.credentials | ||
|
|
||
| def test_constructor_with_auth_request(self): | ||
| @pytest.mark.asyncio | ||
| async def test_constructor_with_auth_request(self): | ||
| http = mock.create_autospec( | ||
| aiohttp.ClientSession, instance=True, _auto_decompress=False | ||
| ) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed? Can we use 8.4.2 for all?