Skip to content

Commit

Permalink
Merge pull request #2795 from dhermes/update-gapic-0.14
Browse files Browse the repository at this point in the history
Upgrading GAPIC deps to 0.14 series.
  • Loading branch information
dhermes authored Dec 3, 2016
2 parents 1f147da + cf9ec14 commit 95587a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""GAX/GAPIC module for managing Speech API requests."""


from google.cloud.gapic.speech.v1beta1.speech_api import SpeechApi
from google.cloud.gapic.speech.v1beta1.speech_client import SpeechClient
from google.cloud.grpc.speech.v1beta1.cloud_speech_pb2 import RecognitionAudio
from google.cloud.grpc.speech.v1beta1.cloud_speech_pb2 import RecognitionConfig
from google.cloud.grpc.speech.v1beta1.cloud_speech_pb2 import SpeechContext
Expand All @@ -42,8 +42,8 @@ def __init__(self, client=None):
credentials = self._client._connection.credentials
channel = make_secure_channel(
credentials, DEFAULT_USER_AGENT,
SpeechApi.SERVICE_ADDRESS)
self._gapic_api = SpeechApi(channel=channel)
SpeechClient.SERVICE_ADDRESS)
self._gapic_api = SpeechClient(channel=channel)
self._operations_stub = make_secure_stub(
credentials,
DEFAULT_USER_AGENT,
Expand Down
3 changes: 1 addition & 2 deletions packages/google-cloud-python-speech/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@
],
}


REQUIREMENTS = [
'google-cloud-core >= 0.21.0',
'gapic-google-cloud-speech-v1beta1 >= 0.11.1, < 0.12.0',
'gapic-google-cloud-speech-v1beta1 >= 0.14.0, < 0.15dev',
]

setup(
Expand Down
16 changes: 8 additions & 8 deletions packages/google-cloud-python-speech/unit_tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def speech_api(channel=None):
host = 'foo.apis.invalid'
speech_api.SERVICE_ADDRESS = host

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
client._speech_api = _gax.GAPICSpeechAPI(client)

Expand Down Expand Up @@ -310,7 +310,7 @@ def speech_api(channel=None):
encoding=speech.Encoding.FLAC,
sample_rate=self.SAMPLE_RATE)

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
client._speech_api = _gax.GAPICSpeechAPI(client)

Expand Down Expand Up @@ -398,7 +398,7 @@ def speech_api(channel=None):
host = 'foo.apis.invalid'
speech_api.SERVICE_ADDRESS = host

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
api = client.speech_api

Expand Down Expand Up @@ -460,7 +460,7 @@ def speech_api(channel=None):
encoding=Encoding.LINEAR16,
sample_rate=self.SAMPLE_RATE)

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
client._speech_api = _gax.GAPICSpeechAPI(client)

Expand Down Expand Up @@ -512,7 +512,7 @@ def speech_api(channel=None):
host = 'foo.apis.invalid'
speech_api.SERVICE_ADDRESS = host

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
client._speech_api = _gax.GAPICSpeechAPI(client)

Expand Down Expand Up @@ -585,7 +585,7 @@ def speech_api(channel=None):
host = 'foo.apis.invalid'
speech_api.SERVICE_ADDRESS = host

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
client._speech_api = _gax.GAPICSpeechAPI(client)

Expand Down Expand Up @@ -629,7 +629,7 @@ def speech_api(channel=None):
host = 'foo.apis.invalid'
speech_api.SERVICE_ADDRESS = host

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
client._speech_api = _gax.GAPICSpeechAPI(client)

Expand Down Expand Up @@ -663,7 +663,7 @@ def speech_api(channel=None):
host = 'foo.apis.invalid'
speech_api.SERVICE_ADDRESS = host

with _Monkey(_gax, SpeechApi=speech_api,
with _Monkey(_gax, SpeechClient=speech_api,
make_secure_channel=make_channel):
client._speech_api = _gax.GAPICSpeechAPI(client)

Expand Down

0 comments on commit 95587a9

Please sign in to comment.