From ccbec02aaab24c8a237dd4e79d17f894392b2e29 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jan 2020 14:51:54 -0800 Subject: [PATCH] docs(cloudbuild): edit docstrings; add py2 deprecation warning; add 3.8 tests (via synth) (#10092) --- cloudbuild/docs/_static/custom.css | 2 +- cloudbuild/docs/_templates/layout.html | 1 + .../cloud/devtools/cloudbuild_v1/__init__.py | 11 +++++++++++ .../cloud/devtools/cloudbuild_v1/gapic/enums.py | 3 +-- .../cloudbuild_v1/proto/cloudbuild.proto | 2 +- cloudbuild/noxfile.py | 4 ++-- cloudbuild/synth.metadata | 17 ++++++++++++----- 7 files changed, 29 insertions(+), 11 deletions(-) diff --git a/cloudbuild/docs/_static/custom.css b/cloudbuild/docs/_static/custom.css index 9a6f9f8ddc3a..0abaf229fce3 100644 --- a/cloudbuild/docs/_static/custom.css +++ b/cloudbuild/docs/_static/custom.css @@ -1,4 +1,4 @@ div#python2-eol { border-color: red; border-width: medium; -} \ No newline at end of file +} \ No newline at end of file diff --git a/cloudbuild/docs/_templates/layout.html b/cloudbuild/docs/_templates/layout.html index de457b2c2767..228529efe2d2 100644 --- a/cloudbuild/docs/_templates/layout.html +++ b/cloudbuild/docs/_templates/layout.html @@ -1,3 +1,4 @@ + {% extends "!layout.html" %} {%- block content %} {%- if theme_fixed_sidebar|lower == 'true' %} diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py index 4e82e772fa0d..fa5ae1f11d55 100644 --- a/cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py @@ -16,12 +16,23 @@ from __future__ import absolute_import +import sys +import warnings from google.cloud.devtools.cloudbuild_v1 import types from google.cloud.devtools.cloudbuild_v1.gapic import cloud_build_client from google.cloud.devtools.cloudbuild_v1.gapic import enums +if sys.version_info[:2] == (2, 7): + message = ( + "A future version of this library will drop support for Python 2.7." + "More details about Python 2 support for Google Cloud Client Libraries" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class CloudBuildClient(cloud_build_client.CloudBuildClient): __doc__ = cloud_build_client.CloudBuildClient.__doc__ enums = enums diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py index 91f5ea5af7d4..01b76b61fef8 100644 --- a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py @@ -174,8 +174,7 @@ class Status(enum.IntEnum): STATUS_UNSPECIFIED (int): Status of the ``WorkerPool`` is unknown. CREATING (int): ``WorkerPool`` is being created. RUNNING (int): ``WorkerPool`` is running. - DELETING (int): ``WorkerPool`` is being deleting: cancelling builds and draining - workers. + DELETING (int): ``WorkerPool`` is being deleted: cancelling builds and draining workers. DELETED (int): ``WorkerPool`` is deleted. """ diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto index a50ec126796b..1cf045394e33 100644 --- a/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto @@ -1159,7 +1159,7 @@ message WorkerPool { // `WorkerPool` is running. RUNNING = 2; - // `WorkerPool` is being deleting: cancelling builds and draining workers. + // `WorkerPool` is being deleted: cancelling builds and draining workers. DELETING = 3; // `WorkerPool` is deleted. diff --git a/cloudbuild/noxfile.py b/cloudbuild/noxfile.py index 7c40b781775f..595d6dd40596 100644 --- a/cloudbuild/noxfile.py +++ b/cloudbuild/noxfile.py @@ -43,7 +43,7 @@ def lint(session): session.run("flake8", "google", "tests") -@nox.session(python="3.7") +@nox.session(python="3.6") def blacken(session): """Run black. @@ -86,7 +86,7 @@ def default(session): ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) +@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"]) def unit(session): """Run the unit test suite.""" default(session) diff --git a/cloudbuild/synth.metadata b/cloudbuild/synth.metadata index 0649e37e7cce..367a1a578bb6 100644 --- a/cloudbuild/synth.metadata +++ b/cloudbuild/synth.metadata @@ -1,19 +1,26 @@ { - "updateTime": "2019-11-07T22:07:36.473613Z", + "updateTime": "2020-01-10T13:14:53.210754Z", "sources": [ { "generator": { "name": "artman", - "version": "0.41.0", - "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" + "version": "0.43.0", + "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0ed34e9fdf601dfc37eb24c40e17495b86771ff4", - "internalRef": "279147036" + "sha": "360a8792ed62f944109d7e22d613a04a010665b4", + "internalRef": "289011995" + } + }, + { + "template": { + "name": "python_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" } } ],