googlemaps / googlemaps/google-maps-services-python

Client: client does not close SSL socket after request completes

Ouverte
#386 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
priority: p3 type: bug
Langage dominant
Python
Étoiles
5k
Forks
1.4k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

#### 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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.