mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[PR #655] [MERGED] Added cache handler to SpotifyClientCredentials and fixed a bug in refresh tokens methods that raised the wrong exception #982
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#982
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/655
Author: @Peter-Schorn
Created: 3/12/2021
Status: ✅ Merged
Merged: 3/13/2021
Merged by: @stephanebruckert
Base:
master← Head:master📝 Commits (10+)
6faf49cAdded an exception clause that catchesFileNotFoundErrorand logs a debug message inSpotifyOAuth.get_cached_token,SpotifyPKCE.get_cached_tokenandSpotifyImplicitGrant.get_cached_token.8ae2cddChanged docs forauthparameter ofSpotify.inittoaccess tokeninstead ofauthorization token. In issue #599, a user confused the access token with the authorization code.957a26aUpdated CHANGELOG.md04b2b02RemovedFileNotFoundErrorbecause it does not exist in python 2.7 (sigh) and replaced it with a call toos.path.exists.77a16dcReplacedos.path.existswitherror.errno == errno.ENOENTto supress errors when the cache file does not exist.caaabd5Merge branch 'master' into master1e6107eChanged docs forsearchto mention that you can provide multiple multiple types to search for. The query parameters of requests are now logged. Added log messages for when the access token and refresh tokens are retrieved and when they are refreshed. Other small grammar fixes.5493ec6Removed duplicate word "multiple" from CHANGELOG808946eMerge branch 'master' into masterbc29688Merge branch 'master' into master📊 Changes
2 files changed (+86 additions, -58 deletions)
View changed files
📝
CHANGELOG.md(+13 -1)📝
spotipy/oauth2.py(+73 -57)📄 Description
I see no reason why we shouldn't save the token info for the Client Credentials flow to persistent storage as well.
The methods for refreshing the access token now raise the proper exception . For example, instead of
you get
See #645
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.