Skip to content

build: Add presubmits for Python 3.14 pre-release #786

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

Merged
merged 4 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,37 @@ branchProtectionRules:
- 'unit_grpc_gcp-3.10'
- 'unit_grpc_gcp-3.11'
- 'unit_grpc_gcp-3.12'
- 'unit_grpc_gcp-3.13'
- 'unit_grpc_gcp-3.14'
- 'unit-3.7'
- 'unit-3.8'
- 'unit-3.9'
- 'unit-3.10'
- 'unit-3.11'
- 'unit-3.12'
- 'unit-3.13'
- 'unit-3.14'
- 'unit_wo_grpc-3.10'
- 'unit_wo_grpc-3.11'
- 'unit_wo_grpc-3.12'
- 'unit_wo_grpc-3.13'
- 'unit_wo_grpc-3.14'
- 'unit_w_prerelease_deps-3.7'
- 'unit_w_prerelease_deps-3.8'
- 'unit_w_prerelease_deps-3.9'
- 'unit_w_prerelease_deps-3.10'
- 'unit_w_prerelease_deps-3.11'
- 'unit_w_prerelease_deps-3.12'
- 'unit_w_prerelease_deps-3.13'
- 'unit_w_prerelease_deps-3.14'
- 'unit_w_async_rest_extra-3.7'
- 'unit_w_async_rest_extra-3.8'
- 'unit_w_async_rest_extra-3.9'
- 'unit_w_async_rest_extra-3.10'
- 'unit_w_async_rest_extra-3.11'
- 'unit_w_async_rest_extra-3.12'
- 'unit_w_async_rest_extra-3.13'
- 'unit_w_async_rest_extra-3.14'
- 'cover'
- 'docs'
- 'docfx'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
exclude:
- option: "_wo_grpc"
python: 3.7
Expand All @@ -37,6 +38,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
5 changes: 2 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Black and flake8 clash on the syntax for ignoring flake8's F401 in this file.
BLACK_EXCLUDES = ["--exclude", "^/google/api_core/operations_v1/__init__.py"]

PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

DEFAULT_PYTHON_VERSION = "3.10"
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
Expand Down Expand Up @@ -95,8 +95,7 @@ def install_prerelease_dependencies(session, constraints_path):
prerel_deps = [
"google-auth",
"googleapis-common-protos",
# Exclude grpcio!=1.67.0rc1 which does not support python 3.13
"grpcio!=1.67.0rc1",
"grpcio",
"grpcio-status",
"proto-plus",
"protobuf",
Expand Down
Empty file added testing/constraints-3.14.txt
Empty file.
2 changes: 2 additions & 0 deletions tests/asyncio/test_operation_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ async def test_constructor():
assert await future.running()


@pytest.mark.asyncio
def test_metadata():
expected_metadata = struct_pb2.Struct()
future, _, _ = make_operation_future(
Expand Down Expand Up @@ -176,6 +177,7 @@ async def test_unexpected_result(unused_sleep):
assert "Unexpected state" in "{!r}".format(exception)


@pytest.mark.asyncio
def test_from_gapic():
operation_proto = make_operation_proto(done=True)
operations_client = mock.create_autospec(
Expand Down