From 0d8292871c59fdfa602c5e97251716613817cc67 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 22 May 2019 16:05:10 -0400 Subject: [PATCH] Fix dist name used to compute 'gapic_version'. (#8100) Closes #8098. --- packages/google-cloud-phishing-protection/docs/conf.py | 7 +++++++ .../google/cloud/phishingprotection.py | 2 ++ .../cloud/phishingprotection_v1beta1/__init__.py | 1 + .../gapic/phishing_protection_service_client.py | 4 +++- .../gapic/phishing_protection_service_client_config.py | 5 ++++- .../phishing_protection_service_grpc_transport.py | 1 + .../google/cloud/phishingprotection_v1beta1/types.py | 5 ++++- .../google-cloud-phishing-protection/synth.metadata | 10 +++++----- packages/google-cloud-phishing-protection/synth.py | 6 ++++++ .../test_phishing_protection_service_client_v1beta1.py | 1 + 10 files changed, 34 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-phishing-protection/docs/conf.py b/packages/google-cloud-phishing-protection/docs/conf.py index 9de3c9726a76..b93c684c4214 100644 --- a/packages/google-cloud-phishing-protection/docs/conf.py +++ b/packages/google-cloud-phishing-protection/docs/conf.py @@ -45,6 +45,7 @@ autodoc_default_flags = ["members"] autosummary_generate = True + # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -121,6 +122,7 @@ # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True + # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -229,6 +231,7 @@ # -- Options for warnings ------------------------------------------------------ + suppress_warnings = [ # Temporarily suppress this to avoid "more than one target found for # cross-reference" warning, which are intractable for us to avoid while in @@ -284,6 +287,7 @@ # If false, no module index is generated. # latex_domain_indices = True + # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples @@ -301,6 +305,7 @@ # If true, show URL addresses after external links. # man_show_urls = False + # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples @@ -330,6 +335,7 @@ # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False + # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), @@ -346,6 +352,7 @@ "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), } + # Napoleon settings napoleon_google_docstring = True napoleon_numpy_docstring = True diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection.py index 497b3151e38a..6ecd979bcb45 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection.py @@ -14,9 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import from google.cloud.phishingprotection_v1beta1 import PhishingProtectionServiceClient from google.cloud.phishingprotection_v1beta1 import types + __all__ = ("types", "PhishingProtectionServiceClient") diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/__init__.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/__init__.py index e593c009dcd5..e43500ba5b5f 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/__init__.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/__init__.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import from google.cloud.phishingprotection_v1beta1 import types diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client.py index 10a31913ca01..86f656d1051f 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """Accesses the google.cloud.phishingprotection.v1beta1 PhishingProtectionServiceV1Beta1 API.""" import pkg_resources @@ -36,8 +37,9 @@ from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2 from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2_grpc + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-phishingprotection" + "google-cloud-phishing-protection" ).version diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client_config.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client_config.py index 61ebf9d9c3c7..a765476f6f6a 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client_config.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/phishing_protection_service_client_config.py @@ -1,7 +1,10 @@ config = { "interfaces": { "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1": { - "retry_codes": {"idempotent": ["UNAVAILABLE"], "non_idempotent": []}, + "retry_codes": { + "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "non_idempotent": [], + }, "retry_params": { "default": { "initial_retry_delay_millis": 100, diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/transports/phishing_protection_service_grpc_transport.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/transports/phishing_protection_service_grpc_transport.py index 0c69fbfaff0e..e67368526c27 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/transports/phishing_protection_service_grpc_transport.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/gapic/transports/phishing_protection_service_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2_grpc diff --git a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/types.py b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/types.py index 725c7369de87..be7eb674eb46 100644 --- a/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/types.py +++ b/packages/google-cloud-phishing-protection/google/cloud/phishingprotection_v1beta1/types.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import import sys @@ -21,13 +22,14 @@ from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2 + _shared_modules = [] _local_modules = [phishingprotection_pb2] names = [] -for module in _shared_modules: +for module in _shared_modules: # pragma: NO COVER for name, message in get_messages(module).items(): setattr(sys.modules[__name__], name, message) names.append(name) @@ -37,4 +39,5 @@ setattr(sys.modules[__name__], name, message) names.append(name) + __all__ = tuple(sorted(names)) diff --git a/packages/google-cloud-phishing-protection/synth.metadata b/packages/google-cloud-phishing-protection/synth.metadata index 1d7cee026133..936bb64f26f8 100644 --- a/packages/google-cloud-phishing-protection/synth.metadata +++ b/packages/google-cloud-phishing-protection/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-08T12:24:28.560729Z", + "updateTime": "2019-05-22T17:24:42.783033Z", "sources": [ { "generator": { "name": "artman", - "version": "0.19.0", - "dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e" + "version": "0.20.0", + "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2", - "internalRef": "247143125" + "sha": "9fd48dcb59a5fba8464e6dbe6f4c6ca90c7efbaf", + "internalRef": "249470705" } }, { diff --git a/packages/google-cloud-phishing-protection/synth.py b/packages/google-cloud-phishing-protection/synth.py index 9942321cd1e2..4aa342460a80 100644 --- a/packages/google-cloud-phishing-protection/synth.py +++ b/packages/google-cloud-phishing-protection/synth.py @@ -53,6 +53,12 @@ "tests/unit/gapic/v1beta1/test_phishing_protection_service_v1_beta1_client_v1beta1.py" ) + s.replace( + client, + "google-cloud-phishingprotection", + "google-cloud-phishing-protection", + ) + files = [client, client_config, transport, unit_test] for file_ in files: new_name = str(file_).replace("v1_beta1_", "") diff --git a/packages/google-cloud-phishing-protection/tests/unit/gapic/v1beta1/test_phishing_protection_service_client_v1beta1.py b/packages/google-cloud-phishing-protection/tests/unit/gapic/v1beta1/test_phishing_protection_service_client_v1beta1.py index 8501501117dd..0a7d300491a9 100644 --- a/packages/google-cloud-phishing-protection/tests/unit/gapic/v1beta1/test_phishing_protection_service_client_v1beta1.py +++ b/packages/google-cloud-phishing-protection/tests/unit/gapic/v1beta1/test_phishing_protection_service_client_v1beta1.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + """Unit tests.""" import mock