googlemaps / googlemaps/google-maps-services-python
Client: client does not close SSL socket after request completes
- 主要語言
- Python
- 星號
- 5k
- 分支
- 1.4k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
#### Environment details
1. Occurs with any request using googlemaps.Client
2. macOS Mojave
3. Library version: 4.4.2
#### Steps to reproduce
1. Instantiate a googlemaps Client
2. Make a request
3. Observe warning of unclosed SSL socket in console
#### Code example
```python
import googlemaps
def get_lat_lng(self, address: str):
gmaps = googlemaps.Client(key="api_key")
geocode_result = gmaps.geocode(address)
return geocode_result
```
#### Stack trace
```
ResourceWarning: unclosed
```
### Impact:
Services using the googlemaps client could easily run out of sockets because of this bug.
### Potential resolution:
This bug appears to be the same as https://github.com/googleapis/google-api-python-client/issues/618
If it is indeed the same there was a fix in google-api-python-client here: https://github.com/googleapis/google-api-python-client/pull/1038
貢獻指南
研究方向
從 googlemaps.Client 開始,沿著 geocode 請求路徑進行追蹤,然後使用程式碼範例重現 ResourceWarning。將請求清理行為與所參照的 google-api-python-client issue 和 pull request 進行比較;完成的標準是請求不再留下未關閉的 SSL socket。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- api, backend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100