| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 01d3127 commit ac594a0
18 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,47 @@ | |||
| 1 | + # Copyright 2023 Google LLC | ||
| 2 | + # | ||
| 3 | + # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 4 | + # you may not use this file except in compliance with the License. | ||
| 5 | + # You may obtain a copy of the License at | ||
| 6 | + # | ||
| 7 | + # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 8 | + # | ||
| 9 | + # Unless required by applicable law or agreed to in writing, software | ||
| 10 | + # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 11 | + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 12 | + # See the License for the specific language governing permissions and | ||
| 13 | + # limitations under the License. | ||
| 14 | + description: Resolves asset dependency issue by adding google-cloud-org-policy | ||
| 15 | + url: https://github.com/googleapis/google-cloud-python/issues/17152 | ||
| 16 | + replacements: | ||
| 17 | + - paths: [ | ||
| 18 | + packages/google-cloud-asset/setup.py | ||
| 19 | + ] | ||
| 20 | + before: | | ||
| 21 | + dependencies = \[ | ||
| 22 | + "google-api-core\[grpc\] >= 2.17.1, <3.0.0", | ||
| 23 | + # Exclude incompatible versions of `google-auth` | ||
| 24 | + # See https://github.com/googleapis/google-cloud-python/issues/12364 | ||
| 25 | + "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", | ||
| 26 | + "grpcio >= 1.44.0, < 2.0.0", | ||
| 27 | + after: | | ||
| 28 | + dependencies = [ | ||
| 29 | + "google-api-core[grpc] >= 2.17.1, <3.0.0", | ||
| 30 | + # Exclude incompatible versions of `google-auth` | ||
| 31 | + # See https://github.com/googleapis/google-cloud-python/issues/12364 | ||
| 32 | + "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", | ||
| 33 | + "google-cloud-org-policy >= 1.11.1, <2.0.0", | ||
| 34 | + "grpcio >= 1.44.0, < 2.0.0", | ||
| 35 | + | ||
| 36 | + count: 1 | ||
| 37 | + - paths: [ | ||
| 38 | + packages/google-cloud-asset/testing/constraints-3.10.txt | ||
| 39 | + ] | ||
| 40 | + before: | | ||
| 41 | + google-api-core==2.17.1 | ||
| 42 | + google-auth==2.14.1 | ||
| 43 | + after: | | ||
| 44 | + google-api-core==2.17.1 | ||
| 45 | + google-cloud-org-policy==1.11.1 | ||
| 46 | + google-auth==2.14.1 | ||
| 47 | + count: 1 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -391,7 +391,6 @@ libraries: | |||
| 391 | 391 | - path: google/cloud/asset/v1p5beta1 | |
| 392 | 392 | - path: google/cloud/asset/v1p2beta1 | |
| 393 | 393 | - path: google/cloud/asset/v1p1beta1 | |
| 394 | - skip_generate: true | ||
| 395 | 394 | python: | |
| 396 | 395 | opt_args_by_api: | |
| 397 | 396 | google/cloud/asset/v1: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -83,7 +83,7 @@ | |||
| 83 | 83 | ||
| 84 | 84 | # General information about the project. | |
| 85 | 85 | project = "google-cloud-asset" | |
| 86 | - copyright = "2025, Google, LLC" | ||
| 86 | + copyright = "2026, Google, LLC" | ||
| 87 | 87 | author = "Google APIs" | |
| 88 | 88 | ||
| 89 | 89 | # The version info for the project you're documenting, acts as replacement for | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -21,13 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 22 | __version__ = package_version.__version__ | |
| 23 | 23 | ||
| 24 | - if sys.version_info >= (3, 8): # pragma: NO COVER | ||
| 25 | - from importlib import metadata | ||
| 26 | - else: # pragma: NO COVER | ||
| 27 | - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove | ||
| 28 | - # this code path once we drop support for Python 3.7 | ||
| 29 | - import importlib_metadata as metadata | ||
| 30 | - | ||
| 24 | + from importlib import metadata | ||
| 31 | 25 | ||
| 32 | 26 | from .services.asset_service import AssetServiceAsyncClient, AssetServiceClient | |
| 33 | 27 | from .types.asset_enrichment_resourceowners import ResourceOwners | |
@@ -125,28 +119,17 @@ | |||
| 125 | 119 | # An older version of api_core is installed which does not define the | |
| 126 | 120 | # functions above. We do equivalent checks manually. | |
| 127 | 121 | try: | |
| 128 | - import sys | ||
| 129 | 122 | import warnings | |
| 130 | 123 | ||
| 131 | 124 | _py_version_str = sys.version.split()[0] | |
| 132 | 125 | _package_label = "google.cloud.asset_v1" | |
| 133 | - if sys.version_info < (3, 9): | ||
| 126 | + if sys.version_info < (3, 10): | ||
| 134 | 127 | warnings.warn( | |
| 135 | 128 | "You are using a non-supported Python version " | |
| 136 | 129 | + f"({_py_version_str}). Google will not post any further " | |
| 137 | 130 | + f"updates to {_package_label} supporting this Python version. " | |
| 138 | 131 | + "Please upgrade to the latest Python version, or at " | |
| 139 | - + f"least to Python 3.9, and then update {_package_label}.", | ||
| 140 | - FutureWarning, | ||
| 141 | - ) | ||
| 142 | - if sys.version_info[:2] == (3, 9): | ||
| 143 | - warnings.warn( | ||
| 144 | - f"You are using a Python version ({_py_version_str}) " | ||
| 145 | - + f"which Google will stop supporting in {_package_label} in " | ||
| 146 | - + "January 2026. Please " | ||
| 147 | - + "upgrade to the latest Python version, or at " | ||
| 148 | - + "least to Python 3.10, before then, and " | ||
| 149 | - + f"then update {_package_label}.", | ||
| 132 | + + f"least to Python 3.10, and then update {_package_label}.", | ||
| 150 | 133 | FutureWarning, | |
| 151 | 134 | ) | |
| 152 | 135 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -358,11 +358,11 @@ async def sample_export_assets(): | |||
| 358 | 358 | ) | |
| 359 | 359 | ||
| 360 | 360 | # Make the request | |
| 361 | - operation = client.export_assets(request=request) | ||
| 361 | + operation = await client.export_assets(request=request) | ||
| 362 | 362 | ||
| 363 | 363 | print("Waiting for operation to complete...") | |
| 364 | 364 | ||
| 365 | - response = (await operation).result() | ||
| 365 | + response = await operation.result() | ||
| 366 | 366 | ||
| 367 | 367 | # Handle the response | |
| 368 | 368 | print(response) | |
@@ -1849,11 +1849,11 @@ async def sample_analyze_iam_policy_longrunning(): | |||
| 1849 | 1849 | ) | |
| 1850 | 1850 | ||
| 1851 | 1851 | # Make the request | |
| 1852 | - operation = client.analyze_iam_policy_longrunning(request=request) | ||
| 1852 | + operation = await client.analyze_iam_policy_longrunning(request=request) | ||
| 1853 | 1853 | ||
| 1854 | 1854 | print("Waiting for operation to complete...") | |
| 1855 | 1855 | ||
| 1856 | - response = (await operation).result() | ||
| 1856 | + response = await operation.result() | ||
| 1857 | 1857 | ||
| 1858 | 1858 | # Handle the response | |
| 1859 | 1859 | print(response) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -21,13 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 22 | __version__ = package_version.__version__ | |
| 23 | 23 | ||
| 24 | - if sys.version_info >= (3, 8): # pragma: NO COVER | ||
| 25 | - from importlib import metadata | ||
| 26 | - else: # pragma: NO COVER | ||
| 27 | - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove | ||
| 28 | - # this code path once we drop support for Python 3.7 | ||
| 29 | - import importlib_metadata as metadata | ||
| 30 | - | ||
| 24 | + from importlib import metadata | ||
| 31 | 25 | ||
| 32 | 26 | from .services.asset_service import AssetServiceAsyncClient, AssetServiceClient | |
| 33 | 27 | from .types.asset_service import ( | |
@@ -47,28 +41,17 @@ | |||
| 47 | 41 | # An older version of api_core is installed which does not define the | |
| 48 | 42 | # functions above. We do equivalent checks manually. | |
| 49 | 43 | try: | |
| 50 | - import sys | ||
| 51 | 44 | import warnings | |
| 52 | 45 | ||
| 53 | 46 | _py_version_str = sys.version.split()[0] | |
| 54 | 47 | _package_label = "google.cloud.asset_v1p1beta1" | |
| 55 | - if sys.version_info < (3, 9): | ||
| 48 | + if sys.version_info < (3, 10): | ||
| 56 | 49 | warnings.warn( | |
| 57 | 50 | "You are using a non-supported Python version " | |
| 58 | 51 | + f"({_py_version_str}). Google will not post any further " | |
| 59 | 52 | + f"updates to {_package_label} supporting this Python version. " | |
| 60 | 53 | + "Please upgrade to the latest Python version, or at " | |
| 61 | - + f"least to Python 3.9, and then update {_package_label}.", | ||
| 62 | - FutureWarning, | ||
| 63 | - ) | ||
| 64 | - if sys.version_info[:2] == (3, 9): | ||
| 65 | - warnings.warn( | ||
| 66 | - f"You are using a Python version ({_py_version_str}) " | ||
| 67 | - + f"which Google will stop supporting in {_package_label} in " | ||
| 68 | - + "January 2026. Please " | ||
| 69 | - + "upgrade to the latest Python version, or at " | ||
| 70 | - + "least to Python 3.10, before then, and " | ||
| 71 | - + f"then update {_package_label}.", | ||
| 54 | + + f"least to Python 3.10, and then update {_package_label}.", | ||
| 72 | 55 | FutureWarning, | |
| 73 | 56 | ) | |
| 74 | 57 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -21,13 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 22 | __version__ = package_version.__version__ | |
| 23 | 23 | ||
| 24 | - if sys.version_info >= (3, 8): # pragma: NO COVER | ||
| 25 | - from importlib import metadata | ||
| 26 | - else: # pragma: NO COVER | ||
| 27 | - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove | ||
| 28 | - # this code path once we drop support for Python 3.7 | ||
| 29 | - import importlib_metadata as metadata | ||
| 30 | - | ||
| 24 | + from importlib import metadata | ||
| 31 | 25 | ||
| 32 | 26 | from .services.asset_service import AssetServiceAsyncClient, AssetServiceClient | |
| 33 | 27 | from .types.asset_service import ( | |
@@ -57,28 +51,17 @@ | |||
| 57 | 51 | # An older version of api_core is installed which does not define the | |
| 58 | 52 | # functions above. We do equivalent checks manually. | |
| 59 | 53 | try: | |
| 60 | - import sys | ||
| 61 | 54 | import warnings | |
| 62 | 55 | ||
| 63 | 56 | _py_version_str = sys.version.split()[0] | |
| 64 | 57 | _package_label = "google.cloud.asset_v1p2beta1" | |
| 65 | - if sys.version_info < (3, 9): | ||
| 58 | + if sys.version_info < (3, 10): | ||
| 66 | 59 | warnings.warn( | |
| 67 | 60 | "You are using a non-supported Python version " | |
| 68 | 61 | + f"({_py_version_str}). Google will not post any further " | |
| 69 | 62 | + f"updates to {_package_label} supporting this Python version. " | |
| 70 | 63 | + "Please upgrade to the latest Python version, or at " | |
| 71 | - + f"least to Python 3.9, and then update {_package_label}.", | ||
| 72 | - FutureWarning, | ||
| 73 | - ) | ||
| 74 | - if sys.version_info[:2] == (3, 9): | ||
| 75 | - warnings.warn( | ||
| 76 | - f"You are using a Python version ({_py_version_str}) " | ||
| 77 | - + f"which Google will stop supporting in {_package_label} in " | ||
| 78 | - + "January 2026. Please " | ||
| 79 | - + "upgrade to the latest Python version, or at " | ||
| 80 | - + "least to Python 3.10, before then, and " | ||
| 81 | - + f"then update {_package_label}.", | ||
| 64 | + + f"least to Python 3.10, and then update {_package_label}.", | ||
| 82 | 65 | FutureWarning, | |
| 83 | 66 | ) | |
| 84 | 67 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -21,13 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 22 | __version__ = package_version.__version__ | |
| 23 | 23 | ||
| 24 | - if sys.version_info >= (3, 8): # pragma: NO COVER | ||
| 25 | - from importlib import metadata | ||
| 26 | - else: # pragma: NO COVER | ||
| 27 | - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove | ||
| 28 | - # this code path once we drop support for Python 3.7 | ||
| 29 | - import importlib_metadata as metadata | ||
| 30 | - | ||
| 24 | + from importlib import metadata | ||
| 31 | 25 | ||
| 32 | 26 | from .services.asset_service import AssetServiceAsyncClient, AssetServiceClient | |
| 33 | 27 | from .types.asset_service import ContentType, ListAssetsRequest, ListAssetsResponse | |
@@ -42,28 +36,17 @@ | |||
| 42 | 36 | # An older version of api_core is installed which does not define the | |
| 43 | 37 | # functions above. We do equivalent checks manually. | |
| 44 | 38 | try: | |
| 45 | - import sys | ||
| 46 | 39 | import warnings | |
| 47 | 40 | ||
| 48 | 41 | _py_version_str = sys.version.split()[0] | |
| 49 | 42 | _package_label = "google.cloud.asset_v1p5beta1" | |
| 50 | - if sys.version_info < (3, 9): | ||
| 43 | + if sys.version_info < (3, 10): | ||
| 51 | 44 | warnings.warn( | |
| 52 | 45 | "You are using a non-supported Python version " | |
| 53 | 46 | + f"({_py_version_str}). Google will not post any further " | |
| 54 | 47 | + f"updates to {_package_label} supporting this Python version. " | |
| 55 | 48 | + "Please upgrade to the latest Python version, or at " | |
| 56 | - + f"least to Python 3.9, and then update {_package_label}.", | ||
| 57 | - FutureWarning, | ||
| 58 | - ) | ||
| 59 | - if sys.version_info[:2] == (3, 9): | ||
| 60 | - warnings.warn( | ||
| 61 | - f"You are using a Python version ({_py_version_str}) " | ||
| 62 | - + f"which Google will stop supporting in {_package_label} in " | ||
| 63 | - + "January 2026. Please " | ||
| 64 | - + "upgrade to the latest Python version, or at " | ||
| 65 | - + "least to Python 3.10, before then, and " | ||
| 66 | - + f"then update {_package_label}.", | ||
| 49 | + + f"least to Python 3.10, and then update {_package_label}.", | ||
| 67 | 50 | FutureWarning, | |
| 68 | 51 | ) | |
| 69 | 52 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -31,7 +31,6 @@ | |||
| 31 | 31 | LINT_PATHS.append("samples") | |
| 32 | 32 | ||
| 33 | 33 | ALL_PYTHON = [ | |
| 34 | - "3.9", | ||
| 35 | 34 | "3.10", | |
| 36 | 35 | "3.11", | |
| 37 | 36 | "3.12", | |
@@ -390,7 +389,6 @@ def docs(session): | |||
| 390 | 389 | shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) | |
| 391 | 390 | session.run( | |
| 392 | 391 | "sphinx-build", | |
| 393 | - "-W", # warnings as errors | ||
| 394 | 392 | "-T", # show full traceback on exception | |
| 395 | 393 | "-N", # no colors | |
| 396 | 394 | "-b", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -51,11 +51,11 @@ async def sample_analyze_iam_policy_longrunning(): | |||
| 51 | 51 | ) | |
| 52 | 52 | ||
| 53 | 53 | # Make the request | |
| 54 | - operation = client.analyze_iam_policy_longrunning(request=request) | ||
| 54 | + operation = await client.analyze_iam_policy_longrunning(request=request) | ||
| 55 | 55 | ||
| 56 | 56 | print("Waiting for operation to complete...") | |
| 57 | 57 | ||
| 58 | - response = (await operation).result() | ||
| 58 | + response = await operation.result() | ||
| 59 | 59 | ||
| 60 | 60 | # Handle the response | |
| 61 | 61 | print(response) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments