mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[PR #457] [MERGED] Retries For All Endpoints #904
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#904
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/spotipy-dev/spotipy/pull/457
Author: @Beahmer89
Created: 3/24/2020
Status: ✅ Merged
Merged: 3/29/2020
Merged by: @stephanebruckert
Base:
master← Head:improvements📝 Commits (5)
eb4b4d6test_improvements - Add init.py files to tests dirs so you can run all tests6469e9dtest_improvements - added helpers file, restructured tests to work without previous data and to be grouped with api type5080763http_retries - Implement Retry for all requestsd23883fReadme - Update README with contributing infoa4fdea7PR Feedback - Added CONTRIBUTING.md, fixed README, fixed test📊 Changes
9 files changed (+388 additions, -334 deletions)
View changed files
➕
CONTRIBUTING.md(+18 -0)📝
requirements.txt(+1 -1)📝
spotipy/client.py(+69 -48)➕
tests/__init__.py(+0 -0)➕
tests/helpers.py(+19 -0)➕
tests/integration/__init__.py(+0 -0)📝
tests/integration/test_non_user_endpoints.py(+6 -11)📝
tests/integration/test_user_endpoints.py(+275 -274)➕
tests/unit/__init__.py(+0 -0)📄 Description
Purpose of PR
I was looking through open issues when I noticed issue 347. I noticed that there was a pull request up for this here. The solution works with adding it to each method function, but it would be cleaner if moved into
_internal_call. Also the logic could be cleaned up as well, so I decided to make a PR.This PR is to allow Retries for all method calls by utilizing
urllib3.Retry()to allow the following:{backoff factor} * (2 ** ({number of total retries} - 1))found in urllib3 docsBy doing this is, it cleans up the retry logic a lot that is already implemented in the code
What Was Done
_internal_callOther Things to Note
Falselike they do by default in the requests library here🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.