[PR #665] [MERGED] V3 #984

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

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/665
Author: @Peter-Schorn
Created: 4/6/2021
Status: Merged
Merged: 4/10/2021
Merged by: @stephanebruckert

Base: v3Head: v3


📝 Commits (10+)

  • 6faf49c Added an exception clause that catches FileNotFoundError and logs a debug message in SpotifyOAuth.get_cached_token, SpotifyPKCE.get_cached_token and SpotifyImplicitGrant.get_cached_token.
  • 8ae2cdd Changed docs for auth parameter of Spotify.init to access token instead of authorization token. In issue #599, a user confused the access token with the authorization code.
  • 957a26a Updated CHANGELOG.md
  • 04b2b02 Removed FileNotFoundError because it does not exist in python 2.7 (sigh) and replaced it with a call to os.path.exists.
  • 77a16dc Replaced os.path.exists with error.errno == errno.ENOENT to supress errors when the cache file does not exist.
  • caaabd5 Merge branch 'master' into master
  • 1e6107e Changed docs for search to 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.
  • 5493ec6 Removed duplicate word "multiple" from CHANGELOG
  • 808946e Merge branch 'master' into master
  • bc29688 Merge branch 'master' into master

📊 Changes

11 files changed (+543 additions, -214 deletions)

View changed files

📝 .github/workflows/pythonapp.yml (+1 -1)
📝 CHANGELOG.md (+31 -6)
📝 spotipy/__init__.py (+1 -0)
📝 spotipy/cache_handler.py (+9 -8)
📝 spotipy/client.py (+178 -118)
📝 spotipy/oauth2.py (+123 -64)
spotipy/scope.py (+85 -0)
📝 spotipy/util.py (+0 -17)
📝 tests/integration/test_non_user_endpoints.py (+6 -0)
📝 tests/integration/test_user_endpoints.py (+19 -0)
tests/unit/test_scopes.py (+90 -0)

📄 Description

Added the Scopes enum. Made CacheHandler an abstract base class. Now if clients subclass this class and don't implement the required methods, they will get an error immediately upon initialization, instead of when the methods are first called. Added new endpoints.


🔄 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/665 **Author:** [@Peter-Schorn](https://github.com/Peter-Schorn) **Created:** 4/6/2021 **Status:** ✅ Merged **Merged:** 4/10/2021 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `v3` ← **Head:** `v3` --- ### 📝 Commits (10+) - [`6faf49c`](https://github.com/spotipy-dev/spotipy/commit/6faf49cbe3cc417cec6671308c184c0542ecc0c5) Added an exception clause that catches `FileNotFoundError` and logs a debug message in `SpotifyOAuth.get_cached_token`, `SpotifyPKCE.get_cached_token` and `SpotifyImplicitGrant.get_cached_token`. - [`8ae2cdd`](https://github.com/spotipy-dev/spotipy/commit/8ae2cddcff67262b18ff770218f59b3341919dc4) Changed docs for `auth` parameter of `Spotify.init` to `access token` instead of `authorization token`. In issue #599, a user confused the access token with the authorization code. - [`957a26a`](https://github.com/spotipy-dev/spotipy/commit/957a26af2b6fd831db9317768e8d41154d518ccc) Updated CHANGELOG.md - [`04b2b02`](https://github.com/spotipy-dev/spotipy/commit/04b2b02beebdecc8d29b44547cd749d41d8a7789) Removed `FileNotFoundError` because it does not exist in python 2.7 (*sigh*) and replaced it with a call to `os.path.exists`. - [`77a16dc`](https://github.com/spotipy-dev/spotipy/commit/77a16dcd110008a904e78fa326408b86671ddf91) Replaced ` os.path.exists` with `error.errno == errno.ENOENT` to supress errors when the cache file does not exist. - [`caaabd5`](https://github.com/spotipy-dev/spotipy/commit/caaabd5a96c721201307b65b462cba461fe0e434) Merge branch 'master' into master - [`1e6107e`](https://github.com/spotipy-dev/spotipy/commit/1e6107e8b6098b8d84518e615deb5e95720155cb) Changed docs for `search` to 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. - [`5493ec6`](https://github.com/spotipy-dev/spotipy/commit/5493ec68145a332f8fbe4a7aa245ebc806ba92ae) Removed duplicate word "multiple" from CHANGELOG - [`808946e`](https://github.com/spotipy-dev/spotipy/commit/808946e30290fa13463a63db9f111720f422f703) Merge branch 'master' into master - [`bc29688`](https://github.com/spotipy-dev/spotipy/commit/bc2968823d66fe0df41323a60effcac6e0e11bb9) Merge branch 'master' into master ### 📊 Changes **11 files changed** (+543 additions, -214 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pythonapp.yml` (+1 -1) 📝 `CHANGELOG.md` (+31 -6) 📝 `spotipy/__init__.py` (+1 -0) 📝 `spotipy/cache_handler.py` (+9 -8) 📝 `spotipy/client.py` (+178 -118) 📝 `spotipy/oauth2.py` (+123 -64) ➕ `spotipy/scope.py` (+85 -0) 📝 `spotipy/util.py` (+0 -17) 📝 `tests/integration/test_non_user_endpoints.py` (+6 -0) 📝 `tests/integration/test_user_endpoints.py` (+19 -0) ➕ `tests/unit/test_scopes.py` (+90 -0) </details> ### 📄 Description Added the `Scopes` enum. Made `CacheHandler` an abstract base class. Now if clients subclass this class and don't implement the required methods, they will get an error immediately upon initialization, instead of when the methods are first called. Added new endpoints. --- <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:06 +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#984
No description provided.