Print warnings when a rate/request limit is reached (#1134)

* create custom urllib3.Retry class for printing warnings on rate/request limits

* move import urllib3 from client.py to util.py

* Using Retry.increment instead of Retry.is_retry. Shows the Retry-After value in the warning as well

* Making sure that max column <= 99

* add types.TracebackType

* Change warning in request/rate limit warning

* adding all parameters, just to make sure

* fixing length of line

* making sure that response is not None
This commit is contained in:
Niko authored and GitHub committed 2024-06-25 09:26:19 +02:00
1 parent 5e09c78ccf
commit 66ad716595
3 files changed
+34 -2

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ Add your changes below.
- Updated TUTORIAL.md instructions to match current layout of Spotify Developer Dashboard
- Added test_artist_id, test_artist_url, and test_artists_mixed_ids to non_user_endpoints test.py
- Added rate/request limit to FAQ
- Added custom `urllib3.Retry` class for printing a warning when a rate/request limit is reached.
### Fixed
- Audiobook integration tests