[PR #1134] [MERGED] Print warnings when a rate/request limit is reached #1176

Closed
opened 2026-02-28 00:03:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/1134
Author: @dieser-niko
Created: 6/11/2024
Status: Merged
Merged: 6/25/2024
Merged by: @dieser-niko

Base: masterHead: retry-warning


📝 Commits (10+)

  • ab42a2f create custom urllib3.Retry class for printing warnings on rate/request limits
  • 2e939c8 move import urllib3 from client.py to util.py
  • 8ef97e1 Using Retry.increment instead of Retry.is_retry. Shows the Retry-After value in the warning as well
  • 1d6c6c1 Making sure that max column <= 99
  • d83999b add types.TracebackType
  • f5eaf57 Change warning in request/rate limit warning
  • 1d43ac0 Merge branch 'master' into retry-warning
  • 24fc45b adding all parameters, just to make sure
  • 76cd440 fixing length of line
  • ed3ba19 making sure that response is not None

📊 Changes

3 files changed (+34 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 spotipy/client.py (+2 -2)
📝 spotipy/util.py (+31 -0)

📄 Description

I'm writing this sentence a fifth time. Does what the title says.

This is still a draft because I'm researching how to implement this so we can get the retry-after value right away.
Currently it only prints a warning (whose text could be improved as well)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/1134 **Author:** [@dieser-niko](https://github.com/dieser-niko) **Created:** 6/11/2024 **Status:** ✅ Merged **Merged:** 6/25/2024 **Merged by:** [@dieser-niko](https://github.com/dieser-niko) **Base:** `master` ← **Head:** `retry-warning` --- ### 📝 Commits (10+) - [`ab42a2f`](https://github.com/spotipy-dev/spotipy/commit/ab42a2f146da72d5673f0b03b3eafece2d2852fe) create custom urllib3.Retry class for printing warnings on rate/request limits - [`2e939c8`](https://github.com/spotipy-dev/spotipy/commit/2e939c8210d7939573a573e754688d8c5db9ba3f) move import urllib3 from client.py to util.py - [`8ef97e1`](https://github.com/spotipy-dev/spotipy/commit/8ef97e1b8e2959450cbfb4aaf00950f3b1dbe896) Using Retry.increment instead of Retry.is_retry. Shows the Retry-After value in the warning as well - [`1d6c6c1`](https://github.com/spotipy-dev/spotipy/commit/1d6c6c16d689c5a1772d474a9569adefd2667338) Making sure that max column <= 99 - [`d83999b`](https://github.com/spotipy-dev/spotipy/commit/d83999bf2e1ab19b7e250d652eb361cf3b463690) add types.TracebackType - [`f5eaf57`](https://github.com/spotipy-dev/spotipy/commit/f5eaf57ec01a12db0a43c50888119cb59fda5204) Change warning in request/rate limit warning - [`1d43ac0`](https://github.com/spotipy-dev/spotipy/commit/1d43ac011ceaab0489d17ea079d5a2ce22554b6b) Merge branch 'master' into retry-warning - [`24fc45b`](https://github.com/spotipy-dev/spotipy/commit/24fc45bed167dd1fffccdd79d0bc7abcd23c903a) adding all parameters, just to make sure - [`76cd440`](https://github.com/spotipy-dev/spotipy/commit/76cd4403e0043d10f8120a9813f5989041f826a0) fixing length of line - [`ed3ba19`](https://github.com/spotipy-dev/spotipy/commit/ed3ba19ccae6c2083c33b9b609ad24dd6666171a) making sure that response is not None ### 📊 Changes **3 files changed** (+34 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `spotipy/client.py` (+2 -2) 📝 `spotipy/util.py` (+31 -0) </details> ### 📄 Description I'm writing this sentence a fifth time. Does what the title says. This is still a draft because I'm researching how to implement this so we can get the retry-after value right away. Currently it only prints a warning (whose text could be improved as well) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#1176
No description provided.