-
Notifications
You must be signed in to change notification settings - Fork 217
feat: Add Python 3.14 support #1506
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
Closed
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
3ffe30e
feat: Add Python 3.14 support
google-labs-jules[bot] 1e89dbc
feat: Add Python 3.14 support
google-labs-jules[bot] ae8e7fb
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 2d915c6
feat: Add Python 3.14 support
google-labs-jules[bot] abc3a7a
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] d8cd0a3
feat: Add Python 3.14 support and drop Python 3.7/3.8
google-labs-jules[bot] 3c2a458
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 81a33c1
Update .kokoro/samples/python3.14/common.cfg
chalmerlowe 23dc8d3
feat: Add Python 3.14 support and drop Python 3.7/3.8
google-labs-jules[bot] 583179c
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 2479c2b
feat: Add Python 3.14 support
google-labs-jules[bot] 49e15a2
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 61b301d
feat: Add Python 3.14 support and remove 3.7/3.8 from nox
google-labs-jules[bot] d710446
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] e83dbf1
feat: Add Python 3.14 support and fix nox session
google-labs-jules[bot] bf41dee
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] c5272c4
feat: Add Python 3.14 support and update CI
google-labs-jules[bot] 69233d1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 43b1b51
feat: Add Python 3.14 support and fix scheduler shutdown
google-labs-jules[bot] ee497e7
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 760c06c
feat: Add Python 3.14 support and fix nox session
google-labs-jules[bot] dbecfe8
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] b90685b
Apply suggestion from @chalmerlowe
chalmerlowe e60937f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 0fa4f69
updates type hint to accound for 3.14 changes and updates tests now t…
chalmerlowe 8880472
edits to correct for failing tests
chalmerlowe 2f3e30a
experimenting with time limits for threading.Barrier
chalmerlowe 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
Some comments aren't visible on the classic Files Changed page.
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
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 |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # 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.14" | ||
| } | ||
|
|
||
| # Declare build specific Cloud project. | ||
| env_vars: { | ||
| key: "BUILD_SPECIFIC_GCLOUD_PROJECT" | ||
| value: "python-docs-samples-tests-314" | ||
| } | ||
|
|
||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/python-pubsub/.kokoro/test-samples.sh" | ||
| } | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | ||
| } | ||
|
|
||
| # Download secrets for samples | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | ||
|
|
||
| # Download trampoline resources. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
|
||
| # Use the trampoline script to run in docker. | ||
| build_file: "python-pubsub/.kokoro/trampoline_v2.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/python-pubsub/.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
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
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| grpcio >= 1.75.1 | ||
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
Oops, something went wrong.
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 in the constraints file? I thought since it's in the setup.py, we'd expect this to be constrained by default.
If I understand correctly, having this as an explicit constraint might actually make us miss bugs, because we're now installing the library with a non-default configuration
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.
To your point:
First, with a broad range of allowable dependencies in
setup.py(which we want as a library others will consume) we have no control over what is a default configuration. The pip resolver could choose any number of combinations of dependencies. There is no such thing as a default unless you pin to exact versions.Second, the requirement that
"grpcio >= 1.75.1is the same lower bound insetup.pyand inconstraints.txtand it is used only for cases where Python runtime 3.14 is installed, because this limitation is in theconstraints-3.14.txt file and because we have conditional logic in thesetup.pyfile to check for runtimes. In this case, the lower bounds are identical. Often constraints pin very specific versions of dependencies, but we have chosen to put a lower bound instead of an exact pin.Thus, I could go either way (keep the constraint OR ditch it).
For context: Pip resolves dependencies per requirements in
setup.py(orpyproject.toml) and as a widely used library we strive to keep that range of available dependencies as wide as possible to ensure we minimize dependency conflicts. Constraints files do NOT impact builds unless the user specifically tells pip to use them in the resolution process by passing in the--constraintsor-cargument (i.e.pip install my_package -c constraints.txt). I acknowledge that we currently capture the need for aversion >= xin thesetup.pyfile so theoretically we don't need to include anything in aconstraints.txt.However: having the value in the
constraints.txtfile does several things:constraints.txt). Now, this would be more precise if we pinned to a specific version in the constraint file, but we aren't doing that here.setup.py.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.
Yeah, I'm not too worried either way. As you say, the bounds in the constraints and the setup are identical, so it feels like having this here is unnecessary, but not a problem either
This situation was the concern I had in mind though. If we accidentally lost the grpc version requirement somehow, the tests would still pass because of this constraint, even though real users would run into issues. It seems safer to have the tests fail in that situation, I don't think we'd want redundancy