DataDog / datadog-api-client-python

Python client for the Datadog API
https://pypi.org/project/datadog-api-client/
Apache License 2.0
111 stars 40 forks source link

Can't close AsyncApiClient #2139

Open pranjalv123 opened 2 weeks ago

pranjalv123 commented 2 weeks ago

Describe the bug

Closing AsyncApiClient.close() calls ApiClient.close(), which calls self.rest_client.pool_manager.clear(), but the async REST client doesn't have a pool_manager.

To Reproduce

import datadog_api_client

client = datadog_api_client.AsyncApiClient(datadog_api_client.Configuration())

client.close()

Expected behavior The client should close open connections, but we get an AttributeError instead.