From deccece7795e719bbd9bebef68c8b88ab001ca32 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 4 Mar 2022 00:39:52 +0000 Subject: [PATCH 1/6] fix: epoxse all names in longrunning _pb2's --- google/longrunning/operations_grpc_pb2.py | 9 ++++++++ google/longrunning/operations_pb2.py | 23 +++++++++++++++---- noxfile.py | 28 ++++++++++++++++++----- tests/unit/test_google_longrunning.py | 19 +++++++++++++++ 4 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 tests/unit/test_google_longrunning.py diff --git a/google/longrunning/operations_grpc_pb2.py b/google/longrunning/operations_grpc_pb2.py index e2dbf60..e03cbeb 100644 --- a/google/longrunning/operations_grpc_pb2.py +++ b/google/longrunning/operations_grpc_pb2.py @@ -3,4 +3,13 @@ # all of the message and gRPC definitions. from google.longrunning.operations_proto_pb2 import * +from google.longrunning.operations_proto_pb2 import _OPERATION +from google.longrunning.operations_proto_pb2 import _OPERATION +from google.longrunning.operations_proto_pb2 import _GETOPERATIONREQUEST +from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSREQUEST +from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSRESPONSE +from google.longrunning.operations_proto_pb2 import _CANCELOPERATIONREQUEST +from google.longrunning.operations_proto_pb2 import _DELETEOPERATIONREQUEST +from google.longrunning.operations_proto_pb2 import _OPERATIONINFO +from google.longrunning.operations_proto_pb2 import _OPERATIONS from google.longrunning.operations_pb2_grpc import * diff --git a/google/longrunning/operations_pb2.py b/google/longrunning/operations_pb2.py index ee8f458..d344a81 100644 --- a/google/longrunning/operations_pb2.py +++ b/google/longrunning/operations_pb2.py @@ -20,8 +20,23 @@ """ try: - from google.longrunning.operations_grpc_pb2 import * - from google.longrunning.operations_grpc_pb2 import _OPERATION + from google.longrunning.operations_grpc_pb2 import * + from google.longrunning.operations_grpc_pb2 import _OPERATION + from google.longrunning.operations_grpc_pb2 import _GETOPERATIONREQUEST + from google.longrunning.operations_grpc_pb2 import _LISTOPERATIONSREQUEST + from google.longrunning.operations_grpc_pb2 import _LISTOPERATIONSRESPONSE + from google.longrunning.operations_grpc_pb2 import _CANCELOPERATIONREQUEST + from google.longrunning.operations_grpc_pb2 import _DELETEOPERATIONREQUEST + from google.longrunning.operations_grpc_pb2 import _OPERATIONINFO + from google.longrunning.operations_grpc_pb2 import _OPERATIONS except ImportError: - from google.longrunning.operations_proto_pb2 import * - from google.longrunning.operations_proto_pb2 import _OPERATION + from google.longrunning.operations_proto_pb2 import * + from google.longrunning.operations_proto_pb2 import _OPERATION + from google.longrunning.operations_proto_pb2 import _OPERATION + from google.longrunning.operations_proto_pb2 import _GETOPERATIONREQUEST + from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSREQUEST + from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSRESPONSE + from google.longrunning.operations_proto_pb2 import _CANCELOPERATIONREQUEST + from google.longrunning.operations_proto_pb2 import _DELETEOPERATIONREQUEST + from google.longrunning.operations_proto_pb2 import _OPERATIONINFO + from google.longrunning.operations_proto_pb2 import _OPERATIONS diff --git a/noxfile.py b/noxfile.py index d8221e0..088ff1f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,11 +47,11 @@ def default(session): session.install("asyncmock", "pytest-asyncio") session.install("mock", "pytest", "pytest-cov") - session.install("-e", ".") constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) + session.install("-e", ".", "-c", constraints_path) # Install googleapis-api-common-protos # This *must* be the last install command to get the package from source. @@ -71,11 +71,27 @@ def default(session): *session.posargs, ) - +@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"]) def unit(session): """Run the unit test suite.""" - default(session) - + session.install("mock", "pytest", "pytest-cov") + constraints_path = str( + CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" + ) + session.install("-e", ".", "-c", constraints_path) + # Run py.test against the unit tests. + session.run( + "py.test", + "--quiet", + "--cov=google", + "--cov=tests/unit", + "--cov-append", + "--cov-config=.coveragerc", + "--cov-report=", + "--cov-fail-under=0", + os.path.join("tests", "unit"), + *session.posargs, + ) def system(session): """Run the system test suite.""" @@ -115,7 +131,7 @@ def system(session): session.run("py.test", "--verbose", system_test_folder_path, *session.posargs) -@nox.session(python=["3.6", "3.7", "3.8", "3.9"]) +@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"]) @nox.parametrize( "library", ["python-pubsub", "python-texttospeech", "python-speech"], @@ -160,7 +176,7 @@ def test(session, library): def generate_protos(session): """Generates the protos using protoc. - This session but be last to avoid overwriting the protos used in CI runs. + This session must be last to avoid overwriting the protos used in CI runs. Some notes on the `google` directory: 1. The `_pb2.py` files are produced by protoc. diff --git a/tests/unit/test_google_longrunning.py b/tests/unit/test_google_longrunning.py new file mode 100644 index 0000000..05e8794 --- /dev/null +++ b/tests/unit/test_google_longrunning.py @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +import pytest + + +def test_longrunning(): + pytest.fail() \ No newline at end of file From f185b507867c0c79c1baf12181ff1c3a87476bff Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 4 Mar 2022 00:42:21 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- google/longrunning/operations_pb2.py | 38 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/google/longrunning/operations_pb2.py b/google/longrunning/operations_pb2.py index d344a81..bcd9ed5 100644 --- a/google/longrunning/operations_pb2.py +++ b/google/longrunning/operations_pb2.py @@ -20,23 +20,23 @@ """ try: - from google.longrunning.operations_grpc_pb2 import * - from google.longrunning.operations_grpc_pb2 import _OPERATION - from google.longrunning.operations_grpc_pb2 import _GETOPERATIONREQUEST - from google.longrunning.operations_grpc_pb2 import _LISTOPERATIONSREQUEST - from google.longrunning.operations_grpc_pb2 import _LISTOPERATIONSRESPONSE - from google.longrunning.operations_grpc_pb2 import _CANCELOPERATIONREQUEST - from google.longrunning.operations_grpc_pb2 import _DELETEOPERATIONREQUEST - from google.longrunning.operations_grpc_pb2 import _OPERATIONINFO - from google.longrunning.operations_grpc_pb2 import _OPERATIONS + from google.longrunning.operations_grpc_pb2 import * + from google.longrunning.operations_grpc_pb2 import _OPERATION + from google.longrunning.operations_grpc_pb2 import _GETOPERATIONREQUEST + from google.longrunning.operations_grpc_pb2 import _LISTOPERATIONSREQUEST + from google.longrunning.operations_grpc_pb2 import _LISTOPERATIONSRESPONSE + from google.longrunning.operations_grpc_pb2 import _CANCELOPERATIONREQUEST + from google.longrunning.operations_grpc_pb2 import _DELETEOPERATIONREQUEST + from google.longrunning.operations_grpc_pb2 import _OPERATIONINFO + from google.longrunning.operations_grpc_pb2 import _OPERATIONS except ImportError: - from google.longrunning.operations_proto_pb2 import * - from google.longrunning.operations_proto_pb2 import _OPERATION - from google.longrunning.operations_proto_pb2 import _OPERATION - from google.longrunning.operations_proto_pb2 import _GETOPERATIONREQUEST - from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSREQUEST - from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSRESPONSE - from google.longrunning.operations_proto_pb2 import _CANCELOPERATIONREQUEST - from google.longrunning.operations_proto_pb2 import _DELETEOPERATIONREQUEST - from google.longrunning.operations_proto_pb2 import _OPERATIONINFO - from google.longrunning.operations_proto_pb2 import _OPERATIONS + from google.longrunning.operations_proto_pb2 import * + from google.longrunning.operations_proto_pb2 import _OPERATION + from google.longrunning.operations_proto_pb2 import _OPERATION + from google.longrunning.operations_proto_pb2 import _GETOPERATIONREQUEST + from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSREQUEST + from google.longrunning.operations_proto_pb2 import _LISTOPERATIONSRESPONSE + from google.longrunning.operations_proto_pb2 import _CANCELOPERATIONREQUEST + from google.longrunning.operations_proto_pb2 import _DELETEOPERATIONREQUEST + from google.longrunning.operations_proto_pb2 import _OPERATIONINFO + from google.longrunning.operations_proto_pb2 import _OPERATIONS From 5b8f24c9907427a7c5e155f5b5b7ebb1f27b95cf Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 8 Mar 2022 17:28:17 +0000 Subject: [PATCH 3/6] chore: set version to 1.55.1b1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index efeae2b..4de44f8 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ name = "googleapis-common-protos" description = "Common protobufs used in Google APIs" -version = "1.55.0" +version = "1.55.1b1" release_status = "Development Status :: 5 - Production/Stable" dependencies = ["protobuf >= 3.12.0"] From 438be9f3251ad49f0848903e2a4ca4d3925f0874 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 17 Mar 2022 16:28:22 +0000 Subject: [PATCH 4/6] chore: revert changes to noxfile --- noxfile.py | 24 +++--------------------- tests/unit/test_google_longrunning.py | 19 ------------------- 2 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 tests/unit/test_google_longrunning.py diff --git a/noxfile.py b/noxfile.py index 088ff1f..b41b027 100644 --- a/noxfile.py +++ b/noxfile.py @@ -51,11 +51,11 @@ def default(session): constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install("-e", ".", "-c", constraints_path) + session.install("-e", ".") # Install googleapis-api-common-protos # This *must* be the last install command to get the package from source. - session.install("e", "..", "-c", constraints_path) + session.install("e", "..") # Run py.test against the unit tests. session.run( @@ -71,27 +71,9 @@ def default(session): *session.posargs, ) -@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"]) def unit(session): """Run the unit test suite.""" - session.install("mock", "pytest", "pytest-cov") - constraints_path = str( - CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" - ) - session.install("-e", ".", "-c", constraints_path) - # Run py.test against the unit tests. - session.run( - "py.test", - "--quiet", - "--cov=google", - "--cov=tests/unit", - "--cov-append", - "--cov-config=.coveragerc", - "--cov-report=", - "--cov-fail-under=0", - os.path.join("tests", "unit"), - *session.posargs, - ) + default(session) def system(session): """Run the system test suite.""" diff --git a/tests/unit/test_google_longrunning.py b/tests/unit/test_google_longrunning.py deleted file mode 100644 index 05e8794..0000000 --- a/tests/unit/test_google_longrunning.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2022 Google LLC All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# 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. - -import pytest - - -def test_longrunning(): - pytest.fail() \ No newline at end of file From 3b95fa3f6fb2f188f3719cf151a7232742f81874 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 17 Mar 2022 16:29:31 +0000 Subject: [PATCH 5/6] chore: try again --- noxfile.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/noxfile.py b/noxfile.py index b41b027..d8221e0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,15 +47,15 @@ def default(session): session.install("asyncmock", "pytest-asyncio") session.install("mock", "pytest", "pytest-cov") + session.install("-e", ".") constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install("-e", ".") # Install googleapis-api-common-protos # This *must* be the last install command to get the package from source. - session.install("e", "..") + session.install("e", "..", "-c", constraints_path) # Run py.test against the unit tests. session.run( @@ -71,10 +71,12 @@ def default(session): *session.posargs, ) + def unit(session): """Run the unit test suite.""" default(session) + def system(session): """Run the system test suite.""" system_test_path = os.path.join("tests", "system.py") @@ -113,7 +115,7 @@ def system(session): session.run("py.test", "--verbose", system_test_folder_path, *session.posargs) -@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"]) +@nox.session(python=["3.6", "3.7", "3.8", "3.9"]) @nox.parametrize( "library", ["python-pubsub", "python-texttospeech", "python-speech"], @@ -158,7 +160,7 @@ def test(session, library): def generate_protos(session): """Generates the protos using protoc. - This session must be last to avoid overwriting the protos used in CI runs. + This session but be last to avoid overwriting the protos used in CI runs. Some notes on the `google` directory: 1. The `_pb2.py` files are produced by protoc. From 71daf5b9c5e23304a061943afd304ee9762e8ce7 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 17 Mar 2022 16:29:52 +0000 Subject: [PATCH 6/6] chore: revert version # --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4de44f8..efeae2b 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ name = "googleapis-common-protos" description = "Common protobufs used in Google APIs" -version = "1.55.1b1" +version = "1.55.0" release_status = "Development Status :: 5 - Production/Stable" dependencies = ["protobuf >= 3.12.0"]