FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add more auth samples by theacodes · Pull Request #981 · GoogleCloudPlatform/python-docs-samples · GitHub

Add more auth samples - #981

Merged
theacodes merged 1 commit into
masterfrom
auth-moar-samples
Jun 12, 2017
Merged

Add more auth samples#981
theacodes merged 1 commit into
masterfrom
auth-moar-samples

Conversation

Copy link
Copy Markdown
Contributor

Add samples for explicitly using compute and app engine credentials.

Add samples for explicitly using compute and app engine credentials.
theacodes requested a review from andrewsg June 12, 2017 19:42
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 12, 2017

def test_explicit_compute_engine():
adc, project = google.auth.default()
credentials_patch = mock.patch(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why assign this to a variable and then use it as a context manager instead of inlining it with the "with" as in the test above?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Because splitting context manager syntax over multiple lines is extremely awkward, so we've gotten into the habit of giving the patch manager its own variable.

theacodes merged commit 88700c3 into master Jun 12, 2017
theacodes deleted the auth-moar-samples branch June 12, 2017 20:28
chalmerlowe pushed a commit that referenced this pull request Feb 19, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:8e2c32496077054105bd06c54a59d6a6694287bc053588e24debe6da6920ad91
<details><summary>google-cloud-logging: 3.13.0</summary>

##
[3.13.0](googleapis/python-logging@v3.12.1...v3.13.0)
(2025-12-15)

### Features

* Add support for python 3.14 (#1065)
([6be3df6a](googleapis/python-logging@6be3df6a))

### Bug Fixes

* remove setup.cfg configuration for creating universal wheels (#981)
([70f612c3](googleapis/python-logging@70f612c3))

</details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL