[PR #609] [MERGED] Added more logging and fixed docs for search endpoint #962

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

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/609
Author: @Peter-Schorn
Created: 11/14/2020
Status: Merged
Merged: 11/15/2020
Merged by: @stephanebruckert

Base: masterHead: master


📝 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

3 files changed (+42 additions, -9 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 spotipy/client.py (+9 -7)
📝 spotipy/oauth2.py (+27 -2)

📄 Description

Logging the requests for retrieving the tokens and refreshing the tokens will make it easier to debug issues that users have with the library. For example, we could've solved #605 faster if these log messages were emitted. I also fixed the docs for the search endpoint to mention that you can search for multiple types at the same time.


🔄 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/609 **Author:** [@Peter-Schorn](https://github.com/Peter-Schorn) **Created:** 11/14/2020 **Status:** ✅ Merged **Merged:** 11/15/2020 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `master` ← **Head:** `master` --- ### 📝 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 **3 files changed** (+42 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `spotipy/client.py` (+9 -7) 📝 `spotipy/oauth2.py` (+27 -2) </details> ### 📄 Description Logging the requests for retrieving the tokens and refreshing the tokens will make it easier to debug issues that users have with the library. For example, we could've solved #605 faster if these log messages were emitted. I also fixed the docs for the search endpoint to mention that you *can* search for multiple types at the same time. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:02: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#962
No description provided.