Skip to content

Commit 2d915c6

Browse files
feat: Add Python 3.14 support
This commit adds support for Python 3.14 to the library. The following changes were made: - Added a 3.14 trove classifier in `setup.py`. - Added a `grpcio` version constraint for Python 3.14 in `setup.py`. - Added a 3.14 presubmit configuration file in `.kokoro/samples`. - Added a `constraints-3.14.txt` file. - Updated the `CONTRIBUTING.rst` file to include 3.14. - Updated the `README.rst` file to include 3.14. - Updated `owlbot.py` to include "3.14" in `unit_test_python_versions`. - Updated `noxfile.py` to include "3.14" in `UNIT_TEST_PYTHON_VERSIONS` and the `prerelease_deps` session. - Fixed a flaky test in `tests/unit/pubsub_v1/publisher/test_publisher_client.py`. - Added missing configuration files to `.kokoro/samples/python3.14`. - Fixed an `AttributeError` in `google/cloud/pubsub_v1/subscriber/scheduler.py` that occurred in Python 3.14.
1 parent ae8e7fb commit 2d915c6

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

google/cloud/pubsub_v1/subscriber/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Scheduler(metaclass=abc.ABCMeta):
3737

3838
@property
3939
@abc.abstractmethod
40-
def queue(self) -> queue.Queue: # pragma: NO COVER
40+
def queue(self) -> "queue.Queue": # pragma: NO COVER
4141
"""Queue: A concurrency-safe queue specific to the underlying
4242
concurrency implementation.
4343

noxfile.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,7 @@ def install_unittest_dependencies(session, *constraints):
235235
def unit(session, protobuf_implementation):
236236
# Install all test dependencies, then install this package in-place.
237237

238-
if protobuf_implementation == "cpp" and session.python in (
239-
"3.11",
240-
"3.12",
241-
"3.13",
242-
"3.14",
243-
):
238+
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
244239
session.skip("cpp implementation is not supported in python 3.11+")
245240

246241
constraints_path = str(
@@ -450,12 +445,7 @@ def docfx(session):
450445
def prerelease_deps(session, protobuf_implementation):
451446
"""Run all tests with prerelease versions of dependencies installed."""
452447

453-
if protobuf_implementation == "cpp" and session.python in (
454-
"3.11",
455-
"3.12",
456-
"3.13",
457-
"3.14",
458-
):
448+
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"):
459449
session.skip("cpp implementation is not supported in python 3.11+")
460450

461451
# Install all dependencies

0 commit comments

Comments
 (0)