GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — Adding optional switch to capture project ID in from_service_account_json(). by dhermes · Pull Request #3436 · googleapis/google-cloud-python Conversation
Contributor
Fixes #1883. @lukesneeringer This is a long-standing bug but should really make it into a
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
It would be great to solve this by just consolidating |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jonparrott See the table I made about usage. The only issue with that is some APIs don't use a project (and we don't want to fail their constructors over a missing project). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Does it help that google auth doesn't error if it can't determine a project?
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jonparrott Mostly it doesn't help because it isn't true? Or do you mean something else? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
That's if it doesn't find credentials, not if it doesn't find the project.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
But there is no |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Right. This is part of the constraint. You should never get a project ID that didn't come from the same source as the credentials.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Makes sense. @lukesneeringer WDYT of us just using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
FTR, $ for f in $(ls */google/cloud/*/client.py); do if ! grep -q ClientWithProject $f; then echo $f fi done bigtable/google/cloud/bigtable/client.py language/google/cloud/language/client.py resource_manager/google/cloud/resource_manager/client.py spanner/google/cloud/spanner/client.py speech/google/cloud/speech/client.py translate/google/cloud/translate/client.py Of those, the following have $ for f in $(ls */google/cloud/*/client.py); do if ! grep -q ClientWithProject $f; then echo $f fi done | xargs grep -l _ClientProjectMixin bigtable/google/cloud/bigtable/client.py spanner/google/cloud/spanner/client.py |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Check that mocks were called as expected. | ||
| file_open.assert_called_once_with( | ||
| mock.sentinel.filename, 'r', encoding='utf-8') | ||
| constructor.assert_called_once_with(info) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tseaver Sorry I missed your LGTM 18 days ago. It's good I got this in, in case we have a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…rm/python-docs-samples#3436) * [container_registry] fix: fix broken test fixes #3435 * Use Pub/Sub message receiver that can notify main thread when it has received expected number of messages. * Only test one single occurence. * Use uuid4 wherever makes sense. * test if Pub/Sub client receives at least one message
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.