This repository was archived by the owner on Mar 6, 2026. It is now read-only.
feat: support for configurable token lifetime#1079
Merged
clundin25 merged 12 commits intogoogleapis:mainfrom Aug 1, 2022
Merged
feat: support for configurable token lifetime#1079clundin25 merged 12 commits intogoogleapis:mainfrom
clundin25 merged 12 commits intogoogleapis:mainfrom
Conversation
lsirac
reviewed
Jul 13, 2022
lsirac
reviewed
Jul 13, 2022
Contributor
|
Add an integration test where the requested lifetime < 3600s (so no exemption needed). |
lsirac
approved these changes
Jul 18, 2022
sai-sunder-s
approved these changes
Jul 19, 2022
Contributor
|
clundin25
reviewed
Aug 1, 2022
clundin25
reviewed
Aug 1, 2022
clundin25
reviewed
Aug 1, 2022
| token_url, | ||
| credential_source=None, | ||
| service_account_impersonation_url=None, | ||
| service_account_impersonation_options={}, |
Contributor
There was a problem hiding this comment.
Sorry I missed this earlier, it seems you have hit a weird edge case. This will create a shared dictionary in all calls, this is not your intent correct?
https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments
Contributor
There was a problem hiding this comment.
Here is an example in a Python3 shell:
❯ python
Python 3.10.4 (main, Jul 19 2022, 20:41:22) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo(x, y, d={}):
... d[x] = y
... return d
...
>>> foo('x', 'y')
{'x': 'y'}
>>> foo('z', 'g')
{'x': 'y', 'z': 'g'}
>>>
Contributor
There was a problem hiding this comment.
Agreed to follow up with a fix for this
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.