diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 894fb6bc..b8edda51 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:f62c53736eccb0c4934a3ea9316e0d57696bb49c1a7c86c726e9bb8a2f87dadf + digest: sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index cbd7e77f..ec867d9f 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -1,10 +1,10 @@ gcp-docuploader -gcp-releasetool +gcp-releasetool>=1.10.5 # required for compatibility with cryptography>=39.x importlib-metadata typing-extensions twine wheel setuptools -nox +nox>=2022.11.21 # required to remove dependency on py charset-normalizer<3 click<8.1.0 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 096e4800..66a2172a 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # # pip-compile --allow-unsafe --generate-hashes requirements.in # @@ -154,9 +154,9 @@ gcp-docuploader==0.6.4 \ --hash=sha256:01486419e24633af78fd0167db74a2763974765ee8078ca6eb6964d0ebd388af \ --hash=sha256:70861190c123d907b3b067da896265ead2eeb9263969d6955c9e0bb091b5ccbf # via -r requirements.in -gcp-releasetool==1.10.0 \ - --hash=sha256:72a38ca91b59c24f7e699e9227c90cbe4dd71b789383cb0164b088abae294c83 \ - --hash=sha256:8c7c99320208383d4bb2b808c6880eb7a81424afe7cdba3c8d84b25f4f0e097d +gcp-releasetool==1.10.5 \ + --hash=sha256:174b7b102d704b254f2a26a3eda2c684fd3543320ec239baf771542a2e58e109 \ + --hash=sha256:e29d29927fe2ca493105a82958c6873bb2b90d503acac56be2c229e74de0eec9 # via -r requirements.in google-api-core==2.10.2 \ --hash=sha256:10c06f7739fe57781f87523375e8e1a3a4674bf6392cd6131a3222182b971320 \ @@ -335,9 +335,9 @@ more-itertools==9.0.0 \ --hash=sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41 \ --hash=sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab # via jaraco-classes -nox==2022.8.7 \ - --hash=sha256:1b894940551dc5c389f9271d197ca5d655d40bdc6ccf93ed6880e4042760a34b \ - --hash=sha256:96cca88779e08282a699d672258ec01eb7c792d35bbbf538c723172bce23212c +nox==2022.11.21 \ + --hash=sha256:0e41a990e290e274cb205a976c4c97ee3c5234441a8132c8c3fd9ea3c22149eb \ + --hash=sha256:e21c31de0711d1274ca585a2c5fde36b1aa962005ba8e9322bf5eeed16dcd684 # via -r requirements.in packaging==21.3 \ --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ @@ -380,10 +380,6 @@ protobuf==3.20.3 \ # gcp-docuploader # gcp-releasetool # google-api-core -py==1.11.0 \ - --hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \ - --hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378 - # via nox pyasn1==0.4.8 \ --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6bb50d96..13a0da6b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.9.0" + ".": "2.9.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d2c09dd8..3244ccc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-language/#history +## [2.9.1](https://github.com/googleapis/python-language/compare/v2.9.0...v2.9.1) (2023-03-23) + + +### Documentation + +* Fix formatting of request arg in docstring ([#429](https://github.com/googleapis/python-language/issues/429)) ([475e787](https://github.com/googleapis/python-language/commit/475e787aa7c2cd6a6268c2656d6d9e3cd3a76735)) + ## [2.9.0](https://github.com/googleapis/python-language/compare/v2.8.1...v2.9.0) (2023-02-16) diff --git a/google/cloud/language/gapic_version.py b/google/cloud/language/gapic_version.py index 60aeb18d..18081a7d 100644 --- a/google/cloud/language/gapic_version.py +++ b/google/cloud/language/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.9.0" # {x-release-please-version} +__version__ = "2.9.1" # {x-release-please-version} diff --git a/google/cloud/language_v1/gapic_version.py b/google/cloud/language_v1/gapic_version.py index 60aeb18d..18081a7d 100644 --- a/google/cloud/language_v1/gapic_version.py +++ b/google/cloud/language_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.9.0" # {x-release-please-version} +__version__ = "2.9.1" # {x-release-please-version} diff --git a/google/cloud/language_v1/services/language_service/async_client.py b/google/cloud/language_v1/services/language_service/async_client.py index 605df5b5..8389f19c 100644 --- a/google/cloud/language_v1/services/language_service/async_client.py +++ b/google/cloud/language_v1/services/language_service/async_client.py @@ -839,8 +839,9 @@ async def sample_annotate_text(): Args: request (Optional[Union[google.cloud.language_v1.types.AnnotateTextRequest, dict]]): The request object. The request message for the text - annotation API, which can perform multiple analysis - types (sentiment, entities, and syntax) in one call. + annotation API, which can perform + multiple analysis types (sentiment, + entities, and syntax) in one call. document (:class:`google.cloud.language_v1.types.Document`): Required. Input document. This corresponds to the ``document`` field diff --git a/google/cloud/language_v1/services/language_service/client.py b/google/cloud/language_v1/services/language_service/client.py index e97f3240..d79cffc5 100644 --- a/google/cloud/language_v1/services/language_service/client.py +++ b/google/cloud/language_v1/services/language_service/client.py @@ -998,8 +998,9 @@ def sample_annotate_text(): Args: request (Union[google.cloud.language_v1.types.AnnotateTextRequest, dict]): The request object. The request message for the text - annotation API, which can perform multiple analysis - types (sentiment, entities, and syntax) in one call. + annotation API, which can perform + multiple analysis types (sentiment, + entities, and syntax) in one call. document (google.cloud.language_v1.types.Document): Required. Input document. This corresponds to the ``document`` field diff --git a/google/cloud/language_v1/services/language_service/transports/rest.py b/google/cloud/language_v1/services/language_service/transports/rest.py index e9b0585f..d92e6672 100644 --- a/google/cloud/language_v1/services/language_service/transports/rest.py +++ b/google/cloud/language_v1/services/language_service/transports/rest.py @@ -17,7 +17,7 @@ import dataclasses import json # type: ignore import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming @@ -359,7 +359,7 @@ class _AnalyzeEntities(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeEntities") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -456,7 +456,7 @@ class _AnalyzeEntitySentiment(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeEntitySentiment") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -480,7 +480,6 @@ def __call__( request (~.language_service.AnalyzeEntitySentimentRequest): The request object. The entity-level sentiment analysis request message. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -557,7 +556,7 @@ class _AnalyzeSentiment(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeSentiment") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -581,7 +580,6 @@ def __call__( request (~.language_service.AnalyzeSentimentRequest): The request object. The sentiment analysis request message. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -658,7 +656,7 @@ class _AnalyzeSyntax(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeSyntax") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -753,7 +751,7 @@ class _AnnotateText(LanguageServiceRestStub): def __hash__(self): return hash("AnnotateText") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -779,7 +777,6 @@ def __call__( annotation API, which can perform multiple analysis types (sentiment, entities, and syntax) in one call. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -854,7 +851,7 @@ class _ClassifyText(LanguageServiceRestStub): def __hash__(self): return hash("ClassifyText") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -878,7 +875,6 @@ def __call__( request (~.language_service.ClassifyTextRequest): The request object. The document classification request message. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/language_v1/types/language_service.py b/google/cloud/language_v1/types/language_service.py index 6eb54e90..bd330ffe 100644 --- a/google/cloud/language_v1/types/language_service.py +++ b/google/cloud/language_v1/types/language_service.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from __future__ import annotations + from typing import MutableMapping, MutableSequence import proto # type: ignore diff --git a/google/cloud/language_v1beta2/gapic_version.py b/google/cloud/language_v1beta2/gapic_version.py index 60aeb18d..18081a7d 100644 --- a/google/cloud/language_v1beta2/gapic_version.py +++ b/google/cloud/language_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.9.0" # {x-release-please-version} +__version__ = "2.9.1" # {x-release-please-version} diff --git a/google/cloud/language_v1beta2/services/language_service/async_client.py b/google/cloud/language_v1beta2/services/language_service/async_client.py index d242f8df..2676da9f 100644 --- a/google/cloud/language_v1beta2/services/language_service/async_client.py +++ b/google/cloud/language_v1beta2/services/language_service/async_client.py @@ -840,8 +840,9 @@ async def sample_annotate_text(): Args: request (Optional[Union[google.cloud.language_v1beta2.types.AnnotateTextRequest, dict]]): The request object. The request message for the text - annotation API, which can perform multiple analysis - types (sentiment, entities, and syntax) in one call. + annotation API, which can perform + multiple analysis types (sentiment, + entities, and syntax) in one call. document (:class:`google.cloud.language_v1beta2.types.Document`): Required. Input document. This corresponds to the ``document`` field diff --git a/google/cloud/language_v1beta2/services/language_service/client.py b/google/cloud/language_v1beta2/services/language_service/client.py index 613c8c88..4c45046d 100644 --- a/google/cloud/language_v1beta2/services/language_service/client.py +++ b/google/cloud/language_v1beta2/services/language_service/client.py @@ -999,8 +999,9 @@ def sample_annotate_text(): Args: request (Union[google.cloud.language_v1beta2.types.AnnotateTextRequest, dict]): The request object. The request message for the text - annotation API, which can perform multiple analysis - types (sentiment, entities, and syntax) in one call. + annotation API, which can perform + multiple analysis types (sentiment, + entities, and syntax) in one call. document (google.cloud.language_v1beta2.types.Document): Required. Input document. This corresponds to the ``document`` field diff --git a/google/cloud/language_v1beta2/services/language_service/transports/rest.py b/google/cloud/language_v1beta2/services/language_service/transports/rest.py index 6ab75ba5..e0821a77 100644 --- a/google/cloud/language_v1beta2/services/language_service/transports/rest.py +++ b/google/cloud/language_v1beta2/services/language_service/transports/rest.py @@ -17,7 +17,7 @@ import dataclasses import json # type: ignore import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming @@ -359,7 +359,7 @@ class _AnalyzeEntities(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeEntities") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -456,7 +456,7 @@ class _AnalyzeEntitySentiment(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeEntitySentiment") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -480,7 +480,6 @@ def __call__( request (~.language_service.AnalyzeEntitySentimentRequest): The request object. The entity-level sentiment analysis request message. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -557,7 +556,7 @@ class _AnalyzeSentiment(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeSentiment") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -581,7 +580,6 @@ def __call__( request (~.language_service.AnalyzeSentimentRequest): The request object. The sentiment analysis request message. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -658,7 +656,7 @@ class _AnalyzeSyntax(LanguageServiceRestStub): def __hash__(self): return hash("AnalyzeSyntax") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -753,7 +751,7 @@ class _AnnotateText(LanguageServiceRestStub): def __hash__(self): return hash("AnnotateText") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -779,7 +777,6 @@ def __call__( annotation API, which can perform multiple analysis types (sentiment, entities, and syntax) in one call. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -854,7 +851,7 @@ class _ClassifyText(LanguageServiceRestStub): def __hash__(self): return hash("ClassifyText") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -878,7 +875,6 @@ def __call__( request (~.language_service.ClassifyTextRequest): The request object. The document classification request message. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/language_v1beta2/types/language_service.py b/google/cloud/language_v1beta2/types/language_service.py index cd661423..884a1512 100644 --- a/google/cloud/language_v1beta2/types/language_service.py +++ b/google/cloud/language_v1beta2/types/language_service.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from __future__ import annotations + from typing import MutableMapping, MutableSequence import proto # type: ignore diff --git a/samples/generated_samples/snippet_metadata_google.cloud.language.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.language.v1.json index 49ffe084..9651e696 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.language.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.language.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-language", - "version": "2.9.0" + "version": "2.9.1" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.language.v1beta2.json b/samples/generated_samples/snippet_metadata_google.cloud.language.v1beta2.json index f84b1cfc..6ef547cc 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.language.v1beta2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.language.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-language", - "version": "2.9.0" + "version": "2.9.1" }, "snippets": [ {