GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GAPIC Header Consistency: Vision by lukesneeringer · Pull Request #3050 · googleapis/google-cloud-python

Conversation

@lukesneeringer

@lukesneeringer lukesneeringer commented Feb 22, 2017

Copy link
Copy Markdown
Contributor

@daspecster Would you please take a longer look at this one? I found the "two clients" thing really confusing and am not sure I did this correctly.

In particular, I am pretty sure the existing code threw away the credentials argument when being used with GAX. (Not sure how anyone would successfully set any of the other arguments, either.) I updated this and added a test for it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Luke Sneeringer
Annotator lib_name and lib_version
0fddd53
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 22, 2017
@lukesneeringer lukesneeringer mentioned this pull request Feb 22, 2017
GAX headers #3049
Closed
6 of 7 tasks
Luke Sneeringer
Add a test for credential passthrough.
1b23078
@lukesneeringer lukesneeringer assigned lukesneeringer and bjwatson Feb 22, 2017
@lukesneeringer
lukesneeringer requested review from daspecster and dhermes February 22, 2017 18:22
@daspecster

daspecster commented Feb 22, 2017

Copy link
Copy Markdown
Contributor

Taking a look now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes reviewed Feb 22, 2017
View reviewed changes
Comment thread vision/google/cloud/vision/_gax.py Outdated
:param client: Instance of ``Client`` object.

:type kwargs: dict
:param kwargs: Additional keyword arguments are sent to the GAPIC client.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread vision/google/cloud/vision/client.py Outdated
if self._use_gax:
self._vision_api_internal = _GAPICVisionAPI(self)
self._vision_api_internal = _GAPICVisionAPI(self,
credentials=None)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread vision/unit_tests/test__gax.py Outdated
from google.cloud.gapic.vision.v1.image_annotator_client import (
ImageAnnotatorClient)

from .test_client import _make_credentials

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread vision/unit_tests/test__gax.py Outdated

# Create the GAX client.
credentials = _make_credentials()
self._make_one(client=object(), credentials=credentials)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread vision/unit_tests/test__gax.py Outdated
# Assert that the GAPIC constructor was called once, and
# that the credentials were sent.
iac.assert_called_once()
self.assertIs(iac.mock_calls[0][2]['credentials'], credentials)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread vision/unit_tests/test__gax.py Outdated
# that lib_name and lib_version were sent.
iac.assert_called_once()
self.assertEqual(iac.mock_calls[0][2]['lib_name'], 'gccl')
self.assertEqual(iac.mock_calls[0][2]['lib_version'], __version__)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daspecster
daspecster suggested changes Feb 22, 2017
View reviewed changes
Comment thread vision/google/cloud/vision/_gax.py Outdated
self._client = client
self._annotator_client = image_annotator_client.ImageAnnotatorClient()
self._annotator_client = image_annotator_client.ImageAnnotatorClient(
credentials=credentials, lib_name='gccl', lib_version=__version__)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Luke Sneeringer added 2 commits February 22, 2017 10:46
Luke Sneeringer
Style tweaks and using client._credentials.
dafb0db
Luke Sneeringer
Change .grpc. to .proto.
128d1c5
@lukesneeringer

lukesneeringer commented Feb 22, 2017

Copy link
Copy Markdown
Contributor Author

@daspecster Please verify now. (Also, obviously, waiting on tests.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daspecster
daspecster reviewed Feb 22, 2017
View reviewed changes
Comment thread vision/google/cloud/vision/_gax.py Outdated
instance.

:rtype: :class:`~google.cloud.grpc.vision.v1.image_annotator_pb2.Feature`
:rtype: :class:`~google.cloudvision.v1.image_annotator_pb2.Feature`

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daspecster
daspecster reviewed Feb 22, 2017
View reviewed changes
Comment thread vision/google/cloud/vision/client.py Outdated
if self._use_gax:
self._vision_api_internal = _GAPICVisionAPI(self)
self._vision_api_internal = _GAPICVisionAPI(
self, credentials=None)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Luke Sneeringer
Additional fixes.
410887e
daspecster
daspecster reviewed Feb 22, 2017
View reviewed changes
Comment thread vision/google/cloud/vision/annotations.py Outdated
"""Factory: construct an instance of ``Annotations`` from protobuf.

:type response: :class:`~google.cloud.grpc.vision.v1.\
:type response: :class:`~google.cloudvision.v1.\

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Luke Sneeringer
Fix find/replace error.
ee2bd3c
daspecster
daspecster approved these changes Feb 22, 2017
View reviewed changes
@daspecster

daspecster commented Feb 22, 2017

Copy link
Copy Markdown
Contributor

Pending travis/circle this LGTM. I would recommend running the system tests as well if you haven't yet.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukesneeringer

lukesneeringer commented Feb 22, 2017

Copy link
Copy Markdown
Contributor Author

The Travis errors suggest the credentials are not being passed correctly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daspecster
daspecster reviewed Feb 22, 2017
View reviewed changes
Comment thread vision/unit_tests/test__gax.py Outdated

# Create the GAX client.
credentials = _make_credentials()
client = Client(credentials=credentials)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Luke Sneeringer
Explicitly set project.
5290d6b
@daspecster

daspecster commented Feb 22, 2017

Copy link
Copy Markdown
Contributor

@lukesneeringer cool looks like that worked. Just a lint issue now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Luke Sneeringer added 2 commits February 22, 2017 14:51
Luke Sneeringer
Fix doc/lint issue.
241f761
Luke Sneeringer
Remove errant **kwargs documentation.
73b3b49
@lukesneeringer
lukesneeringer merged commit c525b44 into googleapis:master Feb 23, 2017
@lukesneeringer
lukesneeringer deleted the gccl-vision branch February 23, 2017 01:46
@daspecster daspecster mentioned this pull request Feb 24, 2017
Upgrading all versions for umbrella release. #3068
Merged
19 tasks done
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
@lukesneeringer
GAPIC Header Consistency: Vision (googleapis#3050)
a9c29e5
@theacodes theacodes unassigned bjwatson Sep 28, 2018
parthea pushed a commit that referenced this pull request Oct 21, 2023
@lukesneeringer
GAPIC Header Consistency: Vision (#3050)
bfcd036
parthea pushed a commit that referenced this pull request Aug 21, 2025
@renovate-bot @crwilcox
@leahecole @plamut
chore(deps): update dependency google-cloud-bigquery-storage to v0.8.…
9f98392
…0 [(#3050)](GoogleCloudPlatform/python-docs-samples#3050)

* chore(deps): update dependency google-cloud-bigquery-storage to v0.8.0

* chore(deps): update pandas-gbq

* chore(deps): update ipython

* chore: update requirements.txt

* chore: it is spelled version.

* chore(deps): split pandas version

* chore(deps): split pandas version

Co-authored-by: Christopher Wilcox <[email protected]>
Co-authored-by: Leah Cole <[email protected]>
parthea pushed a commit that referenced this pull request Sep 16, 2025
@renovate-bot @crwilcox
@leahecole @parthea
chore(deps): update dependency google-cloud-bigquery-storage to v0.8.…
f15edd8
…0 [(#3050)](GoogleCloudPlatform/python-docs-samples#3050)

* chore(deps): update dependency google-cloud-bigquery-storage to v0.8.0

* chore(deps): update pandas-gbq

* chore(deps): update ipython

* chore: update requirements.txt

* chore: it is spelled version.

* chore(deps): split pandas version

* chore(deps): split pandas version

Co-authored-by: Christopher Wilcox <[email protected]>
Co-authored-by: Leah Cole <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@daspecster daspecster daspecster approved these changes
@dhermes dhermes dhermes left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@lukesneeringer lukesneeringer

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@lukesneeringer @daspecster @dhermes @bjwatson @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.