Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 0 additions & 2 deletions librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,6 @@ libraries:
version: 2.39.0
apis:
- path: google/pubsub/v1
skip_generate: true
python:
library_type: GAPIC_COMBO
opt_args_by_api:
Expand Down Expand Up @@ -1933,7 +1932,6 @@ libraries:
- docs/spanner_v1/table.rst
- docs/spanner_v1/transaction.rst
- tests/unit/gapic/conftest.py
skip_generate: true
python:
library_type: GAPIC_COMBO
opt_args_by_api:
Expand Down
15 changes: 0 additions & 15 deletions packages/google-cloud-pubsub/mypy.ini

This file was deleted.

18 changes: 13 additions & 5 deletions packages/google-cloud-pubsub/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,24 @@
"3.12",
"3.13",
"3.14",
"3.15",
]

DEFAULT_PYTHON_VERSION = "3.14"

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
# Switch this to Python 3.15 alpha1
# https://peps.python.org/pep-0790/
PREVIEW_PYTHON_VERSION = "3.14"
PREVIEW_PYTHON_VERSION = "3.15"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
# Search upwards to support running nox from both monorepo packages and integration test goldens.
MYPY_CONFIG_FILE = next(
(
str(p / "mypy.ini")
for p in CURRENT_DIRECTORY.parents
if (p / "mypy.ini").exists()
),
str(CURRENT_DIRECTORY.parent.parent / "mypy.ini"),
)

if (CURRENT_DIRECTORY / "testing").exists():
LOWER_BOUND_CONSTRAINTS_FILE = (
Expand Down Expand Up @@ -615,7 +623,7 @@ def prerelease_deps(session, protobuf_implementation):
)


@nox.session(python=DEFAULT_PYTHON_VERSION)
@nox.session(python=PREVIEW_PYTHON_VERSION)
@nox.parametrize(
"protobuf_implementation",
["python", "upb"],
Expand Down
13 changes: 13 additions & 0 deletions packages/google-cloud-pubsub/testing/constraints-3.15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# We use the constraints file for the latest Python version
# (currently this file) to check that the latest
# major versions of dependencies are supported in setup.py.
# List all library dependencies and extras in this file.
# Require the latest major version be installed for each dependency.
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
# Then this file should have google-cloud-foo>=1
google-api-core>=2
google-auth>=2
grpcio>=1
proto-plus>=1
protobuf>=7
grpc-google-iam-v1>=0
Original file line number Diff line number Diff line change
Expand Up @@ -3000,6 +3000,9 @@ def test_list_topics_pager(transport_name: str = "grpc"):
assert pager._retry == retry
assert pager._timeout == timeout

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, pubsub.Topic) for i in results)
Expand Down Expand Up @@ -3088,6 +3091,8 @@ async def test_list_topics_async_pager():
request={},
)
assert async_pager.next_page_token == "abc"
assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<")

responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
Expand Down Expand Up @@ -3545,6 +3550,9 @@ def test_list_topic_subscriptions_pager(transport_name: str = "grpc"):
assert pager._retry == retry
assert pager._timeout == timeout

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, str) for i in results)
Expand Down Expand Up @@ -3637,6 +3645,8 @@ async def test_list_topic_subscriptions_async_pager():
request={},
)
assert async_pager.next_page_token == "abc"
assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<")

responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
Expand Down Expand Up @@ -4093,6 +4103,9 @@ def test_list_topic_snapshots_pager(transport_name: str = "grpc"):
assert pager._retry == retry
assert pager._timeout == timeout

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, str) for i in results)
Expand Down Expand Up @@ -4185,6 +4198,8 @@ async def test_list_topic_snapshots_async_pager():
request={},
)
assert async_pager.next_page_token == "abc"
assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<")

responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
Expand Down Expand Up @@ -5758,6 +5773,9 @@ def test_list_topics_rest_pager(transport: str = "rest"):

pager = client.list_topics(request=sample_request)

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, pubsub.Topic) for i in results)
Expand Down Expand Up @@ -6018,6 +6036,9 @@ def test_list_topic_subscriptions_rest_pager(transport: str = "rest"):

pager = client.list_topic_subscriptions(request=sample_request)

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, str) for i in results)
Expand Down Expand Up @@ -6275,6 +6296,9 @@ def test_list_topic_snapshots_rest_pager(transport: str = "rest"):

pager = client.list_topic_snapshots(request=sample_request)

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, str) for i in results)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2390,6 +2390,9 @@ def test_list_schemas_pager(transport_name: str = "grpc"):
assert pager._retry == retry
assert pager._timeout == timeout

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, schema.Schema) for i in results)
Expand Down Expand Up @@ -2478,6 +2481,8 @@ async def test_list_schemas_async_pager():
request={},
)
assert async_pager.next_page_token == "abc"
assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<")

responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
Expand Down Expand Up @@ -2929,6 +2934,9 @@ def test_list_schema_revisions_pager(transport_name: str = "grpc"):
assert pager._retry == retry
assert pager._timeout == timeout

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, schema.Schema) for i in results)
Expand Down Expand Up @@ -3021,6 +3029,8 @@ async def test_list_schema_revisions_async_pager():
request={},
)
assert async_pager.next_page_token == "abc"
assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<")

responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
Expand Down Expand Up @@ -5615,6 +5625,9 @@ def test_list_schemas_rest_pager(transport: str = "rest"):

pager = client.list_schemas(request=sample_request)

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, schema.Schema) for i in results)
Expand Down Expand Up @@ -5877,6 +5890,9 @@ def test_list_schema_revisions_rest_pager(transport: str = "rest"):

pager = client.list_schema_revisions(request=sample_request)

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, schema.Schema) for i in results)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2824,6 +2824,9 @@ def test_list_subscriptions_pager(transport_name: str = "grpc"):
assert pager._retry == retry
assert pager._timeout == timeout

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, pubsub.Subscription) for i in results)
Expand Down Expand Up @@ -2916,6 +2919,8 @@ async def test_list_subscriptions_async_pager():
request={},
)
assert async_pager.next_page_token == "abc"
assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<")

responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
Expand Down Expand Up @@ -5490,6 +5495,9 @@ def test_list_snapshots_pager(transport_name: str = "grpc"):
assert pager._retry == retry
assert pager._timeout == timeout

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, pubsub.Snapshot) for i in results)
Expand Down Expand Up @@ -5578,6 +5586,8 @@ async def test_list_snapshots_async_pager():
request={},
)
assert async_pager.next_page_token == "abc"
assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<")

responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
Expand Down Expand Up @@ -7653,6 +7663,9 @@ def test_list_subscriptions_rest_pager(transport: str = "rest"):

pager = client.list_subscriptions(request=sample_request)

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, pubsub.Subscription) for i in results)
Expand Down Expand Up @@ -9030,6 +9043,9 @@ def test_list_snapshots_rest_pager(transport: str = "rest"):

pager = client.list_snapshots(request=sample_request)

assert pager.next_page_token == "abc"
assert str(pager).startswith(f"{pager.__class__.__name__}<")

results = list(pager)
assert len(results) == 6
assert all(isinstance(i, pubsub.Snapshot) for i in results)
Expand Down
15 changes: 0 additions & 15 deletions packages/google-cloud-spanner/mypy.ini

This file was deleted.

12 changes: 12 additions & 0 deletions packages/google-cloud-spanner/testing/constraints-3.15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# We use the constraints file for the latest Python version
# (currently this file) to check that the latest
# major versions of dependencies are supported in setup.py.
# List all library dependencies and extras in this file.
# Require the latest major version be installed for each dependency.
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
# Then this file should have google-cloud-foo>=1
google-api-core>=2
google-auth>=2
grpcio>=1
proto-plus>=1
protobuf>=7
2 changes: 1 addition & 1 deletion packages/google-cloud-spanner/tests/system/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import uuid

from google.api_core import datetime_helpers, exceptions
from google.cloud.spanner_v1 import instance as instance_mod
from test_utils import retry

from google.cloud.spanner_v1 import instance as instance_mod
from tests import _fixtures

CREATE_INSTANCE_ENVVAR = "GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE"
Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-spanner/tests/system/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import time

import pytest

from google.cloud import spanner_v1
from google.cloud.spanner_admin_database_v1 import DatabaseDialect
from google.cloud.spanner_admin_database_v1.types.backup import (
Expand Down
Loading
Loading