jpetrucciani / hubspot3

python3.6+ hubspot client based on hapipy, but modified to use the newer endpoints and non-legacy python
MIT License
146 stars 72 forks source link

Disabling auto-retry spams out warnings #132

Closed advance512 closed 1 year ago

advance512 commented 1 year ago

According to the documentation:

# Retrying API Calls

By default, hubspot3 will attempt to retry all API calls up to 2 times
upon failure.

If you'd like to override this behavior, you can add a `number_retries`
keyword argument to any Client constructor, or to individual API calls.

However, setting number_retries=0 causes the library to spam out warnings on the first failure, e.g.

Too many retries for /deals/v1/deal/110248399499?
Too many retries for /deals/v1/deal/102249436582?
Too many retries for /deals/v1/deal/102351008917?

When disabling the auto-retry mechanism it is expected that the library will not auto-retry, and will not output anything in regards to retrying.

Can we disable this warning in case of number_retries==0?

advance512 commented 1 year ago

Added PR: #133

jpetrucciani commented 1 year ago

The fix is included in version 3.2.52 on pip! Thanks for your PR!