Skip to content

Commit 12cf512

Browse files
yoshi-automationsethmaxwl
authored andcommitted
test: use 3.8 for system tests (googleapis#133)
1 parent 3df1599 commit 12cf512

File tree

9 files changed

+90
-72
lines changed

9 files changed

+90
-72
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
intersphinx_mapping = {
338338
"python": ("http://python.readthedocs.org/en/latest/", None),
339339
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
340-
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None),
340+
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
341341
"grpc": ("https://grpc.io/grpc/python/", None),
342342
}
343343

google/cloud/pubsub.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@
2222
from google.cloud.pubsub_v1 import types
2323

2424

25-
__all__ = ("types", "PublisherClient", "SubscriberClient")
25+
__all__ = (
26+
"types",
27+
"PublisherClient",
28+
"SubscriberClient",
29+
)

google/cloud/pubsub_v1/gapic/publisher_client.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
from google.protobuf import field_mask_pb2
4848

4949

50-
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-pubsub").version
50+
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-pubsub",).version
5151

5252

5353
# TODO: remove conditional import after Python 2 support is dropped
@@ -116,7 +116,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
116116
def project_path(cls, project):
117117
"""Return a fully-qualified project string."""
118118
return google.api_core.path_template.expand(
119-
"projects/{project}", project=project
119+
"projects/{project}", project=project,
120120
)
121121

122122
@classmethod
@@ -132,7 +132,7 @@ def subscription_path(cls, project, subscription):
132132
def topic_path(cls, project, topic):
133133
"""Return a fully-qualified topic string."""
134134
return google.api_core.path_template.expand(
135-
"projects/{project}/topics/{topic}", project=project, topic=topic
135+
"projects/{project}/topics/{topic}", project=project, topic=topic,
136136
)
137137

138138
def __init__(
@@ -219,12 +219,12 @@ def __init__(
219219
self.transport = transport
220220
else:
221221
self.transport = publisher_grpc_transport.PublisherGrpcTransport(
222-
address=api_endpoint, channel=channel, credentials=credentials
222+
address=api_endpoint, channel=channel, credentials=credentials,
223223
)
224224

225225
if client_info is None:
226226
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
227-
gapic_version=_GAPIC_LIBRARY_VERSION
227+
gapic_version=_GAPIC_LIBRARY_VERSION,
228228
)
229229
else:
230230
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
@@ -235,7 +235,7 @@ def __init__(
235235
# (Ordinarily, these are the defaults specified in the `*_config.py`
236236
# file next to this one.)
237237
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
238-
client_config["interfaces"][self._INTERFACE_NAME]
238+
client_config["interfaces"][self._INTERFACE_NAME],
239239
)
240240

241241
# Save a dictionary of cached API call functions.
@@ -411,7 +411,7 @@ def update_topic(
411411
client_info=self._client_info,
412412
)
413413

414-
request = pubsub_pb2.UpdateTopicRequest(topic=topic, update_mask=update_mask)
414+
request = pubsub_pb2.UpdateTopicRequest(topic=topic, update_mask=update_mask,)
415415
if metadata is None:
416416
metadata = []
417417
metadata = list(metadata)
@@ -490,7 +490,7 @@ def publish(
490490
client_info=self._client_info,
491491
)
492492

493-
request = pubsub_pb2.PublishRequest(topic=topic, messages=messages)
493+
request = pubsub_pb2.PublishRequest(topic=topic, messages=messages,)
494494
if metadata is None:
495495
metadata = []
496496
metadata = list(metadata)
@@ -560,7 +560,7 @@ def get_topic(
560560
client_info=self._client_info,
561561
)
562562

563-
request = pubsub_pb2.GetTopicRequest(topic=topic)
563+
request = pubsub_pb2.GetTopicRequest(topic=topic,)
564564
if metadata is None:
565565
metadata = []
566566
metadata = list(metadata)
@@ -651,7 +651,7 @@ def list_topics(
651651
client_info=self._client_info,
652652
)
653653

654-
request = pubsub_pb2.ListTopicsRequest(project=project, page_size=page_size)
654+
request = pubsub_pb2.ListTopicsRequest(project=project, page_size=page_size,)
655655
if metadata is None:
656656
metadata = []
657657
metadata = list(metadata)
@@ -754,7 +754,7 @@ def list_topic_subscriptions(
754754
)
755755

756756
request = pubsub_pb2.ListTopicSubscriptionsRequest(
757-
topic=topic, page_size=page_size
757+
topic=topic, page_size=page_size,
758758
)
759759
if metadata is None:
760760
metadata = []
@@ -862,7 +862,9 @@ def list_topic_snapshots(
862862
client_info=self._client_info,
863863
)
864864

865-
request = pubsub_pb2.ListTopicSnapshotsRequest(topic=topic, page_size=page_size)
865+
request = pubsub_pb2.ListTopicSnapshotsRequest(
866+
topic=topic, page_size=page_size,
867+
)
866868
if metadata is None:
867869
metadata = []
868870
metadata = list(metadata)
@@ -945,7 +947,7 @@ def delete_topic(
945947
client_info=self._client_info,
946948
)
947949

948-
request = pubsub_pb2.DeleteTopicRequest(topic=topic)
950+
request = pubsub_pb2.DeleteTopicRequest(topic=topic,)
949951
if metadata is None:
950952
metadata = []
951953
metadata = list(metadata)
@@ -1031,7 +1033,7 @@ def set_iam_policy(
10311033
client_info=self._client_info,
10321034
)
10331035

1034-
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy)
1036+
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy,)
10351037
if metadata is None:
10361038
metadata = []
10371039
metadata = list(metadata)
@@ -1110,7 +1112,7 @@ def get_iam_policy(
11101112
)
11111113

11121114
request = iam_policy_pb2.GetIamPolicyRequest(
1113-
resource=resource, options=options_
1115+
resource=resource, options=options_,
11141116
)
11151117
if metadata is None:
11161118
metadata = []
@@ -1197,7 +1199,7 @@ def test_iam_permissions(
11971199
)
11981200

11991201
request = iam_policy_pb2.TestIamPermissionsRequest(
1200-
resource=resource, permissions=permissions
1202+
resource=resource, permissions=permissions,
12011203
)
12021204
if metadata is None:
12031205
metadata = []
@@ -1271,7 +1273,7 @@ def detach_subscription(
12711273
client_info=self._client_info,
12721274
)
12731275

1274-
request = pubsub_pb2.DetachSubscriptionRequest(subscription=subscription)
1276+
request = pubsub_pb2.DetachSubscriptionRequest(subscription=subscription,)
12751277
if metadata is None:
12761278
metadata = []
12771279
metadata = list(metadata)

google/cloud/pubsub_v1/gapic/subscriber_client.py

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from google.protobuf import timestamp_pb2
4747

4848

49-
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-pubsub").version
49+
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-pubsub",).version
5050

5151

5252
class SubscriberClient(object):
@@ -94,7 +94,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
9494
def project_path(cls, project):
9595
"""Return a fully-qualified project string."""
9696
return google.api_core.path_template.expand(
97-
"projects/{project}", project=project
97+
"projects/{project}", project=project,
9898
)
9999

100100
@classmethod
@@ -119,7 +119,7 @@ def subscription_path(cls, project, subscription):
119119
def topic_path(cls, project, topic):
120120
"""Return a fully-qualified topic string."""
121121
return google.api_core.path_template.expand(
122-
"projects/{project}/topics/{topic}", project=project, topic=topic
122+
"projects/{project}/topics/{topic}", project=project, topic=topic,
123123
)
124124

125125
def __init__(
@@ -209,12 +209,12 @@ def __init__(
209209
self.transport = transport
210210
else:
211211
self.transport = subscriber_grpc_transport.SubscriberGrpcTransport(
212-
address=api_endpoint, channel=channel, credentials=credentials
212+
address=api_endpoint, channel=channel, credentials=credentials,
213213
)
214214

215215
if client_info is None:
216216
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
217-
gapic_version=_GAPIC_LIBRARY_VERSION
217+
gapic_version=_GAPIC_LIBRARY_VERSION,
218218
)
219219
else:
220220
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
@@ -225,7 +225,7 @@ def __init__(
225225
# (Ordinarily, these are the defaults specified in the `*_config.py`
226226
# file next to this one.)
227227
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
228-
client_config["interfaces"][self._INTERFACE_NAME]
228+
client_config["interfaces"][self._INTERFACE_NAME],
229229
)
230230

231231
# Save a dictionary of cached API call functions.
@@ -490,7 +490,7 @@ def get_subscription(
490490
client_info=self._client_info,
491491
)
492492

493-
request = pubsub_pb2.GetSubscriptionRequest(subscription=subscription)
493+
request = pubsub_pb2.GetSubscriptionRequest(subscription=subscription,)
494494
if metadata is None:
495495
metadata = []
496496
metadata = list(metadata)
@@ -578,7 +578,7 @@ def update_subscription(
578578
)
579579

580580
request = pubsub_pb2.UpdateSubscriptionRequest(
581-
subscription=subscription, update_mask=update_mask
581+
subscription=subscription, update_mask=update_mask,
582582
)
583583
if metadata is None:
584584
metadata = []
@@ -671,7 +671,7 @@ def list_subscriptions(
671671
)
672672

673673
request = pubsub_pb2.ListSubscriptionsRequest(
674-
project=project, page_size=page_size
674+
project=project, page_size=page_size,
675675
)
676676
if metadata is None:
677677
metadata = []
@@ -755,7 +755,7 @@ def delete_subscription(
755755
client_info=self._client_info,
756756
)
757757

758-
request = pubsub_pb2.DeleteSubscriptionRequest(subscription=subscription)
758+
request = pubsub_pb2.DeleteSubscriptionRequest(subscription=subscription,)
759759
if metadata is None:
760760
metadata = []
761761
metadata = list(metadata)
@@ -829,7 +829,7 @@ def get_snapshot(
829829
client_info=self._client_info,
830830
)
831831

832-
request = pubsub_pb2.GetSnapshotRequest(snapshot=snapshot)
832+
request = pubsub_pb2.GetSnapshotRequest(snapshot=snapshot,)
833833
if metadata is None:
834834
metadata = []
835835
metadata = list(metadata)
@@ -1002,7 +1002,7 @@ def acknowledge(
10021002
)
10031003

10041004
request = pubsub_pb2.AcknowledgeRequest(
1005-
subscription=subscription, ack_ids=ack_ids
1005+
subscription=subscription, ack_ids=ack_ids,
10061006
)
10071007
if metadata is None:
10081008
metadata = []
@@ -1253,7 +1253,7 @@ def modify_push_config(
12531253
)
12541254

12551255
request = pubsub_pb2.ModifyPushConfigRequest(
1256-
subscription=subscription, push_config=push_config
1256+
subscription=subscription, push_config=push_config,
12571257
)
12581258
if metadata is None:
12591259
metadata = []
@@ -1350,7 +1350,7 @@ def list_snapshots(
13501350
client_info=self._client_info,
13511351
)
13521352

1353-
request = pubsub_pb2.ListSnapshotsRequest(project=project, page_size=page_size)
1353+
request = pubsub_pb2.ListSnapshotsRequest(project=project, page_size=page_size,)
13541354
if metadata is None:
13551355
metadata = []
13561356
metadata = list(metadata)
@@ -1462,7 +1462,7 @@ def create_snapshot(
14621462
)
14631463

14641464
request = pubsub_pb2.CreateSnapshotRequest(
1465-
name=name, subscription=subscription, labels=labels
1465+
name=name, subscription=subscription, labels=labels,
14661466
)
14671467
if metadata is None:
14681468
metadata = []
@@ -1556,7 +1556,7 @@ def update_snapshot(
15561556
)
15571557

15581558
request = pubsub_pb2.UpdateSnapshotRequest(
1559-
snapshot=snapshot, update_mask=update_mask
1559+
snapshot=snapshot, update_mask=update_mask,
15601560
)
15611561
if metadata is None:
15621562
metadata = []
@@ -1633,7 +1633,7 @@ def delete_snapshot(
16331633
client_info=self._client_info,
16341634
)
16351635

1636-
request = pubsub_pb2.DeleteSnapshotRequest(snapshot=snapshot)
1636+
request = pubsub_pb2.DeleteSnapshotRequest(snapshot=snapshot,)
16371637
if metadata is None:
16381638
metadata = []
16391639
metadata = list(metadata)
@@ -1727,10 +1727,12 @@ def seek(
17271727

17281728
# Sanity check: We have some fields which are mutually exclusive;
17291729
# raise ValueError if more than one is sent.
1730-
google.api_core.protobuf_helpers.check_oneof(time=time, snapshot=snapshot)
1730+
google.api_core.protobuf_helpers.check_oneof(
1731+
time=time, snapshot=snapshot,
1732+
)
17311733

17321734
request = pubsub_pb2.SeekRequest(
1733-
subscription=subscription, time=time, snapshot=snapshot
1735+
subscription=subscription, time=time, snapshot=snapshot,
17341736
)
17351737
if metadata is None:
17361738
metadata = []
@@ -1817,7 +1819,7 @@ def set_iam_policy(
18171819
client_info=self._client_info,
18181820
)
18191821

1820-
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy)
1822+
request = iam_policy_pb2.SetIamPolicyRequest(resource=resource, policy=policy,)
18211823
if metadata is None:
18221824
metadata = []
18231825
metadata = list(metadata)
@@ -1896,7 +1898,7 @@ def get_iam_policy(
18961898
)
18971899

18981900
request = iam_policy_pb2.GetIamPolicyRequest(
1899-
resource=resource, options=options_
1901+
resource=resource, options=options_,
19001902
)
19011903
if metadata is None:
19021904
metadata = []
@@ -1983,7 +1985,7 @@ def test_iam_permissions(
19831985
)
19841986

19851987
request = iam_policy_pb2.TestIamPermissionsRequest(
1986-
resource=resource, permissions=permissions
1988+
resource=resource, permissions=permissions,
19871989
)
19881990
if metadata is None:
19891991
metadata = []

google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
# exception (channels come with credentials baked in already).
5858
if channel is not None and credentials is not None:
5959
raise ValueError(
60-
"The `channel` and `credentials` arguments are mutually " "exclusive."
60+
"The `channel` and `credentials` arguments are mutually " "exclusive.",
6161
)
6262

6363
# Create the channel.

google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
# exception (channels come with credentials baked in already).
5858
if channel is not None and credentials is not None:
5959
raise ValueError(
60-
"The `channel` and `credentials` arguments are mutually " "exclusive."
60+
"The `channel` and `credentials` arguments are mutually " "exclusive.",
6161
)
6262

6363
# Create the channel.

0 commit comments

Comments
 (0)