Skip to content

Commit 95a2690

Browse files
feat: Adds Python 3.14 support (#1512)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent e6294a1 commit 95a2690

File tree

16 files changed

+162
-34
lines changed

16 files changed

+162
-34
lines changed

.github/sync-repo-settings.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ branchProtectionRules:
2727
- 'unit (3.10)'
2828
- 'unit (3.11)'
2929
- 'unit (3.12)'
30+
- 'unit (3.13)'
31+
- 'unit (3.14)'
3032
- 'cover'

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
14-
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
14+
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4

.kokoro/presubmit/presubmit.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
# Format: //devtools/kokoro/config/proto/build.proto
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "NOX_SESSION"
5+
value: "system-3.12 blacken mypy format"
6+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "py-3.14"
14+
}
15+
16+
# Declare build specific Cloud project.
17+
env_vars: {
18+
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19+
value: "python-docs-samples-tests-314"
20+
}
21+
22+
env_vars: {
23+
key: "TRAMPOLINE_BUILD_FILE"
24+
value: "github/python-pubsub/.kokoro/test-samples.sh"
25+
}
26+
27+
# Configure the docker image for kokoro-trampoline.
28+
env_vars: {
29+
key: "TRAMPOLINE_IMAGE"
30+
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
31+
}
32+
33+
# Download secrets for samples
34+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
35+
36+
# Download trampoline resources.
37+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
38+
39+
# Use the trampoline script to run in docker.
40+
build_file: "python-pubsub/.kokoro/trampoline_v2.sh"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
7+
8+
env_vars: {
9+
key: "TRAMPOLINE_BUILD_FILE"
10+
value: "github/python-pubsub/.kokoro/test-samples-against-head.sh"
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "False"
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}

CONTRIBUTING.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

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

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -228,6 +228,7 @@ We support:
228228
- `Python 3.11`_
229229
- `Python 3.12`_
230230
- `Python 3.13`_
231+
- `Python 3.14`_
231232

232233
.. _Python 3.7: https://docs.python.org/3.7/
233234
.. _Python 3.8: https://docs.python.org/3.8/
@@ -236,6 +237,7 @@ We support:
236237
.. _Python 3.11: https://docs.python.org/3.11/
237238
.. _Python 3.12: https://docs.python.org/3.12/
238239
.. _Python 3.13: https://docs.python.org/3.13/
240+
.. _Python 3.14: https://docs.python.org/3.14/
239241

240242

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

google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def dispatcher(self) -> Optional[dispatcher.Dispatcher]:
458458
return self._dispatcher
459459

460460
@property
461-
def leaser(self) -> Optional[leaser.Leaser]:
461+
def leaser(self) -> Optional["leaser.Leaser"]:
462462
"""The leaser helper."""
463463
return self._leaser
464464

0 commit comments

Comments
 (0)