diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 39ad3cec..44c78f7c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:d22cd2ddce65fdac6986f115563faf2fc81482b09dfbea83ac2808c92ecfdff0 + digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f7b8344c..b46d7305 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,9 +8,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: "3.10" - name: Install nox @@ -24,9 +24,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: "3.10" - name: Install nox diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1e8b05c3..f512a496 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,9 +8,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: "3.10" - name: Install nox diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 074ee250..e5be6edb 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -11,9 +11,9 @@ jobs: python: ['3.6', '3.7', '3.8', '3.9', '3.10'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python }} - name: Install nox @@ -26,7 +26,7 @@ jobs: run: | nox -s unit-${{ matrix.python }} - name: Upload coverage results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: coverage-artifacts path: .coverage-${{ matrix.python }} @@ -37,9 +37,9 @@ jobs: - unit steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: "3.10" - name: Install coverage @@ -47,7 +47,7 @@ jobs: python -m pip install --upgrade setuptools pip wheel python -m pip install coverage - name: Download coverage results - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: coverage-artifacts path: .coverage-results/ diff --git a/CHANGELOG.md b/CHANGELOG.md index ba7a0854..716770d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://pypi.org/project/google-cloud-trace/#history +### [1.6.1](https://github.com/googleapis/python-trace/compare/v1.6.0...v1.6.1) (2022-03-05) + + +### Bug Fixes + +* **deps:** require google-api-core>=1.31.5, >=2.3.2 ([#193](https://github.com/googleapis/python-trace/issues/193)) ([cef4d52](https://github.com/googleapis/python-trace/commit/cef4d524dcc06216e8d32d738f698b21082ae50f)) +* **deps:** require proto-plus>=1.15.0 ([cef4d52](https://github.com/googleapis/python-trace/commit/cef4d524dcc06216e8d32d738f698b21082ae50f)) + ## [1.6.0](https://github.com/googleapis/python-trace/compare/v1.5.1...v1.6.0) (2022-02-11) diff --git a/google/cloud/trace/__init__.py b/google/cloud/trace/__init__.py index 67332818..f69641fb 100644 --- a/google/cloud/trace/__init__.py +++ b/google/cloud/trace/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/__init__.py b/google/cloud/trace_v1/__init__.py index a42adf14..300eedd0 100644 --- a/google/cloud/trace_v1/__init__.py +++ b/google/cloud/trace_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/services/__init__.py b/google/cloud/trace_v1/services/__init__.py index 4de65971..e8e1c384 100644 --- a/google/cloud/trace_v1/services/__init__.py +++ b/google/cloud/trace_v1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/services/trace_service/__init__.py b/google/cloud/trace_v1/services/trace_service/__init__.py index e3ea53d0..9205dfea 100644 --- a/google/cloud/trace_v1/services/trace_service/__init__.py +++ b/google/cloud/trace_v1/services/trace_service/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/services/trace_service/async_client.py b/google/cloud/trace_v1/services/trace_service/async_client.py index 4bfc469c..0fc21251 100644 --- a/google/cloud/trace_v1/services/trace_service/async_client.py +++ b/google/cloud/trace_v1/services/trace_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -215,7 +215,7 @@ async def list_traces( filter conditions. - .. code-block:: + .. code-block:: python from google.cloud import trace_v1 @@ -320,7 +320,7 @@ async def get_trace( ) -> trace.Trace: r"""Gets a single trace by its ID. - .. code-block:: + .. code-block:: python from google.cloud import trace_v1 @@ -433,7 +433,7 @@ async def patch_traces( a new trace is created. - .. code-block:: + .. code-block:: python from google.cloud import trace_v1 diff --git a/google/cloud/trace_v1/services/trace_service/client.py b/google/cloud/trace_v1/services/trace_service/client.py index 1b83fe2b..46a9370e 100644 --- a/google/cloud/trace_v1/services/trace_service/client.py +++ b/google/cloud/trace_v1/services/trace_service/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -400,8 +400,7 @@ def list_traces( filter conditions. - - .. code-block:: + .. code-block:: python from google.cloud import trace_v1 @@ -496,8 +495,7 @@ def get_trace( ) -> trace.Trace: r"""Gets a single trace by its ID. - - .. code-block:: + .. code-block:: python from google.cloud import trace_v1 @@ -600,8 +598,7 @@ def patch_traces( a new trace is created. - - .. code-block:: + .. code-block:: python from google.cloud import trace_v1 diff --git a/google/cloud/trace_v1/services/trace_service/pagers.py b/google/cloud/trace_v1/services/trace_service/pagers.py index f62a0ccd..7e296197 100644 --- a/google/cloud/trace_v1/services/trace_service/pagers.py +++ b/google/cloud/trace_v1/services/trace_service/pagers.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/services/trace_service/transports/__init__.py b/google/cloud/trace_v1/services/trace_service/transports/__init__.py index 952e4b26..556989a1 100644 --- a/google/cloud/trace_v1/services/trace_service/transports/__init__.py +++ b/google/cloud/trace_v1/services/trace_service/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/services/trace_service/transports/base.py b/google/cloud/trace_v1/services/trace_service/transports/base.py index ed8d7f54..c7a9799f 100644 --- a/google/cloud/trace_v1/services/trace_service/transports/base.py +++ b/google/cloud/trace_v1/services/trace_service/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/services/trace_service/transports/grpc.py b/google/cloud/trace_v1/services/trace_service/transports/grpc.py index 4a9b6073..e8afeb42 100644 --- a/google/cloud/trace_v1/services/trace_service/transports/grpc.py +++ b/google/cloud/trace_v1/services/trace_service/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/services/trace_service/transports/grpc_asyncio.py b/google/cloud/trace_v1/services/trace_service/transports/grpc_asyncio.py index 35ab81e6..e241c154 100644 --- a/google/cloud/trace_v1/services/trace_service/transports/grpc_asyncio.py +++ b/google/cloud/trace_v1/services/trace_service/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/types/__init__.py b/google/cloud/trace_v1/types/__init__.py index 9bba2883..ea386532 100644 --- a/google/cloud/trace_v1/types/__init__.py +++ b/google/cloud/trace_v1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v1/types/trace.py b/google/cloud/trace_v1/types/trace.py index 3640f2eb..cff0a93d 100644 --- a/google/cloud/trace_v1/types/trace.py +++ b/google/cloud/trace_v1/types/trace.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/__init__.py b/google/cloud/trace_v2/__init__.py index 126e6b56..a3290028 100644 --- a/google/cloud/trace_v2/__init__.py +++ b/google/cloud/trace_v2/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/services/__init__.py b/google/cloud/trace_v2/services/__init__.py index 4de65971..e8e1c384 100644 --- a/google/cloud/trace_v2/services/__init__.py +++ b/google/cloud/trace_v2/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/services/trace_service/__init__.py b/google/cloud/trace_v2/services/trace_service/__init__.py index e3ea53d0..9205dfea 100644 --- a/google/cloud/trace_v2/services/trace_service/__init__.py +++ b/google/cloud/trace_v2/services/trace_service/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/services/trace_service/async_client.py b/google/cloud/trace_v2/services/trace_service/async_client.py index 046d8834..6fc2aa93 100644 --- a/google/cloud/trace_v2/services/trace_service/async_client.py +++ b/google/cloud/trace_v2/services/trace_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -221,7 +221,7 @@ async def batch_write_spans( update existing spans. - .. code-block:: + .. code-block:: python from google.cloud import trace_v2 @@ -315,7 +315,7 @@ async def create_span( ) -> trace.Span: r"""Creates a new span. - .. code-block:: + .. code-block:: python from google.cloud import trace_v2 diff --git a/google/cloud/trace_v2/services/trace_service/client.py b/google/cloud/trace_v2/services/trace_service/client.py index d74f296f..1f057c7f 100644 --- a/google/cloud/trace_v2/services/trace_service/client.py +++ b/google/cloud/trace_v2/services/trace_service/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -420,8 +420,7 @@ def batch_write_spans( update existing spans. - - .. code-block:: + .. code-block:: python from google.cloud import trace_v2 @@ -515,8 +514,7 @@ def create_span( ) -> trace.Span: r"""Creates a new span. - - .. code-block:: + .. code-block:: python from google.cloud import trace_v2 diff --git a/google/cloud/trace_v2/services/trace_service/transports/__init__.py b/google/cloud/trace_v2/services/trace_service/transports/__init__.py index 952e4b26..556989a1 100644 --- a/google/cloud/trace_v2/services/trace_service/transports/__init__.py +++ b/google/cloud/trace_v2/services/trace_service/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/services/trace_service/transports/base.py b/google/cloud/trace_v2/services/trace_service/transports/base.py index 698a5aa0..d3a9b410 100644 --- a/google/cloud/trace_v2/services/trace_service/transports/base.py +++ b/google/cloud/trace_v2/services/trace_service/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/services/trace_service/transports/grpc.py b/google/cloud/trace_v2/services/trace_service/transports/grpc.py index fe3db80b..914be71a 100644 --- a/google/cloud/trace_v2/services/trace_service/transports/grpc.py +++ b/google/cloud/trace_v2/services/trace_service/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/services/trace_service/transports/grpc_asyncio.py b/google/cloud/trace_v2/services/trace_service/transports/grpc_asyncio.py index 3594da7d..993b9159 100644 --- a/google/cloud/trace_v2/services/trace_service/transports/grpc_asyncio.py +++ b/google/cloud/trace_v2/services/trace_service/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/types/__init__.py b/google/cloud/trace_v2/types/__init__.py index 0f28e15e..e907e981 100644 --- a/google/cloud/trace_v2/types/__init__.py +++ b/google/cloud/trace_v2/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/types/trace.py b/google/cloud/trace_v2/types/trace.py index 99061b09..0bc816b8 100644 --- a/google/cloud/trace_v2/types/trace.py +++ b/google/cloud/trace_v2/types/trace.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/trace_v2/types/tracing.py b/google/cloud/trace_v2/types/tracing.py index 98fbff3f..8cbfa56d 100644 --- a/google/cloud/trace_v2/types/tracing.py +++ b/google/cloud/trace_v2/types/tracing.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_get_trace_async.py b/samples/generated_samples/cloudtrace_v1_generated_trace_service_get_trace_async.py similarity index 89% rename from samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_get_trace_async.py rename to samples/generated_samples/cloudtrace_v1_generated_trace_service_get_trace_async.py index c458d4f4..58c3ce91 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_get_trace_async.py +++ b/samples/generated_samples/cloudtrace_v1_generated_trace_service_get_trace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v1_TraceService_GetTrace_async] +# [START cloudtrace_v1_generated_TraceService_GetTrace_async] from google.cloud import trace_v1 @@ -43,4 +43,4 @@ async def sample_get_trace(): # Handle the response print(response) -# [END cloudtrace_generated_trace_v1_TraceService_GetTrace_async] +# [END cloudtrace_v1_generated_TraceService_GetTrace_async] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_get_trace_sync.py b/samples/generated_samples/cloudtrace_v1_generated_trace_service_get_trace_sync.py similarity index 89% rename from samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_get_trace_sync.py rename to samples/generated_samples/cloudtrace_v1_generated_trace_service_get_trace_sync.py index 2439ca6f..d2da8e80 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_get_trace_sync.py +++ b/samples/generated_samples/cloudtrace_v1_generated_trace_service_get_trace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v1_TraceService_GetTrace_sync] +# [START cloudtrace_v1_generated_TraceService_GetTrace_sync] from google.cloud import trace_v1 @@ -43,4 +43,4 @@ def sample_get_trace(): # Handle the response print(response) -# [END cloudtrace_generated_trace_v1_TraceService_GetTrace_sync] +# [END cloudtrace_v1_generated_TraceService_GetTrace_sync] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_list_traces_async.py b/samples/generated_samples/cloudtrace_v1_generated_trace_service_list_traces_async.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_list_traces_async.py rename to samples/generated_samples/cloudtrace_v1_generated_trace_service_list_traces_async.py index 6c754972..9d2cc81a 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_list_traces_async.py +++ b/samples/generated_samples/cloudtrace_v1_generated_trace_service_list_traces_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v1_TraceService_ListTraces_async] +# [START cloudtrace_v1_generated_TraceService_ListTraces_async] from google.cloud import trace_v1 @@ -43,4 +43,4 @@ async def sample_list_traces(): async for response in page_result: print(response) -# [END cloudtrace_generated_trace_v1_TraceService_ListTraces_async] +# [END cloudtrace_v1_generated_TraceService_ListTraces_async] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_list_traces_sync.py b/samples/generated_samples/cloudtrace_v1_generated_trace_service_list_traces_sync.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_list_traces_sync.py rename to samples/generated_samples/cloudtrace_v1_generated_trace_service_list_traces_sync.py index 5a4ab7f1..f08e9278 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_list_traces_sync.py +++ b/samples/generated_samples/cloudtrace_v1_generated_trace_service_list_traces_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v1_TraceService_ListTraces_sync] +# [START cloudtrace_v1_generated_TraceService_ListTraces_sync] from google.cloud import trace_v1 @@ -43,4 +43,4 @@ def sample_list_traces(): for response in page_result: print(response) -# [END cloudtrace_generated_trace_v1_TraceService_ListTraces_sync] +# [END cloudtrace_v1_generated_TraceService_ListTraces_sync] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_patch_traces_async.py b/samples/generated_samples/cloudtrace_v1_generated_trace_service_patch_traces_async.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_patch_traces_async.py rename to samples/generated_samples/cloudtrace_v1_generated_trace_service_patch_traces_async.py index f98d84dc..409990e7 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_patch_traces_async.py +++ b/samples/generated_samples/cloudtrace_v1_generated_trace_service_patch_traces_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v1_TraceService_PatchTraces_async] +# [START cloudtrace_v1_generated_TraceService_PatchTraces_async] from google.cloud import trace_v1 @@ -40,4 +40,4 @@ async def sample_patch_traces(): await client.patch_traces(request=request) -# [END cloudtrace_generated_trace_v1_TraceService_PatchTraces_async] +# [END cloudtrace_v1_generated_TraceService_PatchTraces_async] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_patch_traces_sync.py b/samples/generated_samples/cloudtrace_v1_generated_trace_service_patch_traces_sync.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_patch_traces_sync.py rename to samples/generated_samples/cloudtrace_v1_generated_trace_service_patch_traces_sync.py index 22a3d77b..a5e5866d 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v1_trace_service_patch_traces_sync.py +++ b/samples/generated_samples/cloudtrace_v1_generated_trace_service_patch_traces_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v1_TraceService_PatchTraces_sync] +# [START cloudtrace_v1_generated_TraceService_PatchTraces_sync] from google.cloud import trace_v1 @@ -40,4 +40,4 @@ def sample_patch_traces(): client.patch_traces(request=request) -# [END cloudtrace_generated_trace_v1_TraceService_PatchTraces_sync] +# [END cloudtrace_v1_generated_TraceService_PatchTraces_sync] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_batch_write_spans_async.py b/samples/generated_samples/cloudtrace_v2_generated_trace_service_batch_write_spans_async.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_batch_write_spans_async.py rename to samples/generated_samples/cloudtrace_v2_generated_trace_service_batch_write_spans_async.py index e5e9e5ab..e16cd648 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_batch_write_spans_async.py +++ b/samples/generated_samples/cloudtrace_v2_generated_trace_service_batch_write_spans_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v2_TraceService_BatchWriteSpans_async] +# [START cloudtrace_v2_generated_TraceService_BatchWriteSpans_async] from google.cloud import trace_v2 @@ -45,4 +45,4 @@ async def sample_batch_write_spans(): await client.batch_write_spans(request=request) -# [END cloudtrace_generated_trace_v2_TraceService_BatchWriteSpans_async] +# [END cloudtrace_v2_generated_TraceService_BatchWriteSpans_async] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_batch_write_spans_sync.py b/samples/generated_samples/cloudtrace_v2_generated_trace_service_batch_write_spans_sync.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_batch_write_spans_sync.py rename to samples/generated_samples/cloudtrace_v2_generated_trace_service_batch_write_spans_sync.py index 2cca7e84..ea21854d 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_batch_write_spans_sync.py +++ b/samples/generated_samples/cloudtrace_v2_generated_trace_service_batch_write_spans_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v2_TraceService_BatchWriteSpans_sync] +# [START cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] from google.cloud import trace_v2 @@ -45,4 +45,4 @@ def sample_batch_write_spans(): client.batch_write_spans(request=request) -# [END cloudtrace_generated_trace_v2_TraceService_BatchWriteSpans_sync] +# [END cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_create_span_async.py b/samples/generated_samples/cloudtrace_v2_generated_trace_service_create_span_async.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_create_span_async.py rename to samples/generated_samples/cloudtrace_v2_generated_trace_service_create_span_async.py index 483deac0..f4a25604 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_create_span_async.py +++ b/samples/generated_samples/cloudtrace_v2_generated_trace_service_create_span_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v2_TraceService_CreateSpan_async] +# [START cloudtrace_v2_generated_TraceService_CreateSpan_async] from google.cloud import trace_v2 @@ -43,4 +43,4 @@ async def sample_create_span(): # Handle the response print(response) -# [END cloudtrace_generated_trace_v2_TraceService_CreateSpan_async] +# [END cloudtrace_v2_generated_TraceService_CreateSpan_async] diff --git a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_create_span_sync.py b/samples/generated_samples/cloudtrace_v2_generated_trace_service_create_span_sync.py similarity index 88% rename from samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_create_span_sync.py rename to samples/generated_samples/cloudtrace_v2_generated_trace_service_create_span_sync.py index 338261b8..a2ad4a63 100644 --- a/samples/generated_samples/cloudtrace_generated_trace_v2_trace_service_create_span_sync.py +++ b/samples/generated_samples/cloudtrace_v2_generated_trace_service_create_span_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-trace -# [START cloudtrace_generated_trace_v2_TraceService_CreateSpan_sync] +# [START cloudtrace_v2_generated_TraceService_CreateSpan_sync] from google.cloud import trace_v2 @@ -43,4 +43,4 @@ def sample_create_span(): # Handle the response print(response) -# [END cloudtrace_generated_trace_v2_TraceService_CreateSpan_sync] +# [END cloudtrace_v2_generated_TraceService_CreateSpan_sync] diff --git a/samples/generated_samples/snippet_metadata_trace_v1.json b/samples/generated_samples/snippet_metadata_trace_v1.json index 8e55b812..67cb53d3 100644 --- a/samples/generated_samples/snippet_metadata_trace_v1.json +++ b/samples/generated_samples/snippet_metadata_trace_v1.json @@ -10,8 +10,8 @@ "shortName": "GetTrace" } }, - "file": "cloudtrace_generated_trace_v1_trace_service_get_trace_async.py", - "regionTag": "cloudtrace_generated_trace_v1_TraceService_GetTrace_async", + "file": "cloudtrace_v1_generated_trace_service_get_trace_async.py", + "regionTag": "cloudtrace_v1_generated_TraceService_GetTrace_async", "segments": [ { "end": 45, @@ -54,8 +54,8 @@ "shortName": "GetTrace" } }, - "file": "cloudtrace_generated_trace_v1_trace_service_get_trace_sync.py", - "regionTag": "cloudtrace_generated_trace_v1_TraceService_GetTrace_sync", + "file": "cloudtrace_v1_generated_trace_service_get_trace_sync.py", + "regionTag": "cloudtrace_v1_generated_TraceService_GetTrace_sync", "segments": [ { "end": 45, @@ -99,8 +99,8 @@ "shortName": "ListTraces" } }, - "file": "cloudtrace_generated_trace_v1_trace_service_list_traces_async.py", - "regionTag": "cloudtrace_generated_trace_v1_TraceService_ListTraces_async", + "file": "cloudtrace_v1_generated_trace_service_list_traces_async.py", + "regionTag": "cloudtrace_v1_generated_TraceService_ListTraces_async", "segments": [ { "end": 45, @@ -143,8 +143,8 @@ "shortName": "ListTraces" } }, - "file": "cloudtrace_generated_trace_v1_trace_service_list_traces_sync.py", - "regionTag": "cloudtrace_generated_trace_v1_TraceService_ListTraces_sync", + "file": "cloudtrace_v1_generated_trace_service_list_traces_sync.py", + "regionTag": "cloudtrace_v1_generated_TraceService_ListTraces_sync", "segments": [ { "end": 45, @@ -188,8 +188,8 @@ "shortName": "PatchTraces" } }, - "file": "cloudtrace_generated_trace_v1_trace_service_patch_traces_async.py", - "regionTag": "cloudtrace_generated_trace_v1_TraceService_PatchTraces_async", + "file": "cloudtrace_v1_generated_trace_service_patch_traces_async.py", + "regionTag": "cloudtrace_v1_generated_TraceService_PatchTraces_async", "segments": [ { "end": 42, @@ -230,8 +230,8 @@ "shortName": "PatchTraces" } }, - "file": "cloudtrace_generated_trace_v1_trace_service_patch_traces_sync.py", - "regionTag": "cloudtrace_generated_trace_v1_TraceService_PatchTraces_sync", + "file": "cloudtrace_v1_generated_trace_service_patch_traces_sync.py", + "regionTag": "cloudtrace_v1_generated_TraceService_PatchTraces_sync", "segments": [ { "end": 42, diff --git a/samples/generated_samples/snippet_metadata_trace_v2.json b/samples/generated_samples/snippet_metadata_trace_v2.json index 6445bdc6..1822311f 100644 --- a/samples/generated_samples/snippet_metadata_trace_v2.json +++ b/samples/generated_samples/snippet_metadata_trace_v2.json @@ -10,8 +10,8 @@ "shortName": "BatchWriteSpans" } }, - "file": "cloudtrace_generated_trace_v2_trace_service_batch_write_spans_async.py", - "regionTag": "cloudtrace_generated_trace_v2_TraceService_BatchWriteSpans_async", + "file": "cloudtrace_v2_generated_trace_service_batch_write_spans_async.py", + "regionTag": "cloudtrace_v2_generated_TraceService_BatchWriteSpans_async", "segments": [ { "end": 47, @@ -52,8 +52,8 @@ "shortName": "BatchWriteSpans" } }, - "file": "cloudtrace_generated_trace_v2_trace_service_batch_write_spans_sync.py", - "regionTag": "cloudtrace_generated_trace_v2_TraceService_BatchWriteSpans_sync", + "file": "cloudtrace_v2_generated_trace_service_batch_write_spans_sync.py", + "regionTag": "cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync", "segments": [ { "end": 47, @@ -95,8 +95,8 @@ "shortName": "CreateSpan" } }, - "file": "cloudtrace_generated_trace_v2_trace_service_create_span_async.py", - "regionTag": "cloudtrace_generated_trace_v2_TraceService_CreateSpan_async", + "file": "cloudtrace_v2_generated_trace_service_create_span_async.py", + "regionTag": "cloudtrace_v2_generated_TraceService_CreateSpan_async", "segments": [ { "end": 45, @@ -139,8 +139,8 @@ "shortName": "CreateSpan" } }, - "file": "cloudtrace_generated_trace_v2_trace_service_create_span_sync.py", - "regionTag": "cloudtrace_generated_trace_v2_TraceService_CreateSpan_sync", + "file": "cloudtrace_v2_generated_trace_service_create_span_sync.py", + "regionTag": "cloudtrace_v2_generated_TraceService_CreateSpan_sync", "segments": [ { "end": 45, diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index 20cdfc62..4c808af7 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -188,42 +188,54 @@ def _session_tests( # check for presence of tests test_list = glob.glob("*_test.py") + glob.glob("test_*.py") test_list.extend(glob.glob("tests")) + if len(test_list) == 0: print("No tests found, skipping directory.") - else: - if TEST_CONFIG["pip_version_override"]: - pip_version = TEST_CONFIG["pip_version_override"] - session.install(f"pip=={pip_version}") - """Runs py.test for a particular project.""" - if os.path.exists("requirements.txt"): - if os.path.exists("constraints.txt"): - session.install("-r", "requirements.txt", "-c", "constraints.txt") - else: - session.install("-r", "requirements.txt") - - if os.path.exists("requirements-test.txt"): - if os.path.exists("constraints-test.txt"): - session.install( - "-r", "requirements-test.txt", "-c", "constraints-test.txt" - ) - else: - session.install("-r", "requirements-test.txt") - - if INSTALL_LIBRARY_FROM_SOURCE: - session.install("-e", _get_repo_root()) - - if post_install: - post_install(session) - - session.run( - "pytest", - *(PYTEST_COMMON_ARGS + session.posargs), - # Pytest will return 5 when no tests are collected. This can happen - # on travis where slow and flaky tests are excluded. - # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html - success_codes=[0, 5], - env=get_pytest_env_vars(), - ) + return + + if TEST_CONFIG["pip_version_override"]: + pip_version = TEST_CONFIG["pip_version_override"] + session.install(f"pip=={pip_version}") + """Runs py.test for a particular project.""" + concurrent_args = [] + if os.path.exists("requirements.txt"): + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") + with open("requirements.txt") as rfile: + packages = rfile.read() + + if os.path.exists("requirements-test.txt"): + if os.path.exists("constraints-test.txt"): + session.install( + "-r", "requirements-test.txt", "-c", "constraints-test.txt" + ) + else: + session.install("-r", "requirements-test.txt") + with open("requirements-test.txt") as rtfile: + packages += rtfile.read() + + if INSTALL_LIBRARY_FROM_SOURCE: + session.install("-e", _get_repo_root()) + + if post_install: + post_install(session) + + if "pytest-parallel" in packages: + concurrent_args.extend(['--workers', 'auto', '--tests-per-worker', 'auto']) + elif "pytest-xdist" in packages: + concurrent_args.extend(['-n', 'auto']) + + session.run( + "pytest", + *(PYTEST_COMMON_ARGS + session.posargs + concurrent_args), + # Pytest will return 5 when no tests are collected. This can happen + # on travis where slow and flaky tests are excluded. + # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html + success_codes=[0, 5], + env=get_pytest_env_vars(), + ) @nox.session(python=ALL_VERSIONS) diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index 618cbcc9..76593bb6 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1 +1 @@ -pytest==7.0.0 \ No newline at end of file +pytest==7.0.1 \ No newline at end of file diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index aaaa0b27..2f911a9e 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-trace==1.5.1 \ No newline at end of file +google-cloud-trace==1.6.0 \ No newline at end of file diff --git a/scripts/fixup_trace_v1_keywords.py b/scripts/fixup_trace_v1_keywords.py index 6d48d47c..0b682caf 100644 --- a/scripts/fixup_trace_v1_keywords.py +++ b/scripts/fixup_trace_v1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/fixup_trace_v2_keywords.py b/scripts/fixup_trace_v2_keywords.py index f27a9b76..e9f668e1 100644 --- a/scripts/fixup_trace_v2_keywords.py +++ b/scripts/fixup_trace_v2_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index 3360b956..6a5bd884 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-trace" description = "Cloud Trace API client library" -version = "1.6.0" +version = "1.6.1" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' @@ -32,8 +32,8 @@ # NOTE: Maintainers, please do not require google-api-core>=2.x.x # Until this issue is closed # https://github.com/googleapis/google-cloud-python/issues/10566 - "google-api-core[grpc] >= 1.28.0, <3.0.0dev", - "proto-plus >= 1.4.0", + "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", + "proto-plus >= 1.15.0", ] extras = {} diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 6b451bc3..b666ca6c 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -5,5 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -google-api-core==1.28.0 -proto-plus==1.4.0 +google-api-core==1.31.5 +proto-plus==1.15.0 diff --git a/tests/__init__.py b/tests/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/__init__.py b/tests/unit/gapic/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/gapic/__init__.py +++ b/tests/unit/gapic/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/trace_v1/__init__.py b/tests/unit/gapic/trace_v1/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/gapic/trace_v1/__init__.py +++ b/tests/unit/gapic/trace_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/trace_v1/test_trace_service.py b/tests/unit/gapic/trace_v1/test_trace_service.py index 4ba61be8..6e5c0cea 100644 --- a/tests/unit/gapic/trace_v1/test_trace_service.py +++ b/tests/unit/gapic/trace_v1/test_trace_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/trace_v2/__init__.py b/tests/unit/gapic/trace_v2/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/gapic/trace_v2/__init__.py +++ b/tests/unit/gapic/trace_v2/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/trace_v2/test_trace_service.py b/tests/unit/gapic/trace_v2/test_trace_service.py index 22238433..50f125b8 100644 --- a/tests/unit/gapic/trace_v2/test_trace_service.py +++ b/tests/unit/gapic/trace_v2/test_trace_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.