Skip to content

Commit

Permalink
docs(texttospeech): add 2.7 deprecation warning (via synth) (#10051)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and busunkim96 committed Jan 8, 2020
1 parent b10c2e2 commit 0d48116
Show file tree
Hide file tree
Showing 3 changed files with 3,485 additions and 5 deletions.
11 changes: 11 additions & 0 deletions texttospeech/google/cloud/texttospeech_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,23 @@


from __future__ import absolute_import
import sys
import warnings

from google.cloud.texttospeech_v1 import types
from google.cloud.texttospeech_v1.gapic import enums
from google.cloud.texttospeech_v1.gapic import text_to_speech_client


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class TextToSpeechClient(text_to_speech_client.TextToSpeechClient):
__doc__ = text_to_speech_client.TextToSpeechClient.__doc__
enums = enums
Expand Down
11 changes: 11 additions & 0 deletions texttospeech/google/cloud/texttospeech_v1beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,23 @@


from __future__ import absolute_import
import sys
import warnings

from google.cloud.texttospeech_v1beta1 import types
from google.cloud.texttospeech_v1beta1.gapic import enums
from google.cloud.texttospeech_v1beta1.gapic import text_to_speech_client


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class TextToSpeechClient(text_to_speech_client.TextToSpeechClient):
__doc__ = text_to_speech_client.TextToSpeechClient.__doc__
enums = enums
Expand Down
Loading

0 comments on commit 0d48116

Please sign in to comment.