Skip to content

Commit ccbec02

Browse files
docs(cloudbuild): edit docstrings; add py2 deprecation warning; add 3.8 tests (via synth) (#10092)
1 parent f478b36 commit ccbec02

File tree

7 files changed

+29
-11
lines changed

7 files changed

+29
-11
lines changed

cloudbuild/docs/_static/custom.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
div#python2-eol {
22
border-color: red;
33
border-width: medium;
4-
}
4+
}

cloudbuild/docs/_templates/layout.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
{% extends "!layout.html" %}
23
{%- block content %}
34
{%- if theme_fixed_sidebar|lower == 'true' %}

cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py

+11
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,23 @@
1616

1717

1818
from __future__ import absolute_import
19+
import sys
20+
import warnings
1921

2022
from google.cloud.devtools.cloudbuild_v1 import types
2123
from google.cloud.devtools.cloudbuild_v1.gapic import cloud_build_client
2224
from google.cloud.devtools.cloudbuild_v1.gapic import enums
2325

2426

27+
if sys.version_info[:2] == (2, 7):
28+
message = (
29+
"A future version of this library will drop support for Python 2.7."
30+
"More details about Python 2 support for Google Cloud Client Libraries"
31+
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
32+
)
33+
warnings.warn(message, DeprecationWarning)
34+
35+
2536
class CloudBuildClient(cloud_build_client.CloudBuildClient):
2637
__doc__ = cloud_build_client.CloudBuildClient.__doc__
2738
enums = enums

cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ class Status(enum.IntEnum):
174174
STATUS_UNSPECIFIED (int): Status of the ``WorkerPool`` is unknown.
175175
CREATING (int): ``WorkerPool`` is being created.
176176
RUNNING (int): ``WorkerPool`` is running.
177-
DELETING (int): ``WorkerPool`` is being deleting: cancelling builds and draining
178-
workers.
177+
DELETING (int): ``WorkerPool`` is being deleted: cancelling builds and draining workers.
179178
DELETED (int): ``WorkerPool`` is deleted.
180179
"""
181180

cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ message WorkerPool {
11591159
// `WorkerPool` is running.
11601160
RUNNING = 2;
11611161

1162-
// `WorkerPool` is being deleting: cancelling builds and draining workers.
1162+
// `WorkerPool` is being deleted: cancelling builds and draining workers.
11631163
DELETING = 3;
11641164

11651165
// `WorkerPool` is deleted.

cloudbuild/noxfile.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def lint(session):
4343
session.run("flake8", "google", "tests")
4444

4545

46-
@nox.session(python="3.7")
46+
@nox.session(python="3.6")
4747
def blacken(session):
4848
"""Run black.
4949
@@ -86,7 +86,7 @@ def default(session):
8686
)
8787

8888

89-
@nox.session(python=["2.7", "3.5", "3.6", "3.7"])
89+
@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
9090
def unit(session):
9191
"""Run the unit test suite."""
9292
default(session)

cloudbuild/synth.metadata

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
{
2-
"updateTime": "2019-11-07T22:07:36.473613Z",
2+
"updateTime": "2020-01-10T13:14:53.210754Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.41.0",
8-
"dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9"
7+
"version": "0.43.0",
8+
"dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "0ed34e9fdf601dfc37eb24c40e17495b86771ff4",
16-
"internalRef": "279147036"
15+
"sha": "360a8792ed62f944109d7e22d613a04a010665b4",
16+
"internalRef": "289011995"
17+
}
18+
},
19+
{
20+
"template": {
21+
"name": "python_library",
22+
"origin": "synthtool.gcp",
23+
"version": "2019.10.17"
1724
}
1825
}
1926
],

0 commit comments

Comments
 (0)