googleapis / googleapis/google-cloud-python

async AuthorizedSession refresh should support async credential refresh method

オープン
#15,211 コメント 4 件 リアクション 2 件 担当者 1 名 @arithmetic1728 が担当を希望しています GitHub で見る
priority: p3 type: bug
主要言語
Python
スター
5.4k
フォーク
1.8k
平均マージ
3日 4時間
マージ済み PR(30日)
122

説明

Recently I migrated from my custom async implementation to the beta implementation however I noticed two issues:

1) _CombinedResponse is missing the reason property and occasionally errors out, my fix:
```python
class _CombinedResponse(_GoogleCombinedResponse):
@property
def reason(self):
return self._response.reason
```
2) the credentials refresh does not support an async call (which should be the default if you're using the credentials_async class

fix is making this call async: https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/transport/_aiohttp_requests.py#L371

if sync needs to be supported it should do a check if the method is awaitable/a coroutine or not.

#### Environment details

- OS: OSX
- Python version: 3.8
- pip version:
- `google-auth` version: 2.2.1

#### Steps to reproduce

1. auth error during googleapiclient call

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。