[PR #961] [MERGED] Codebase Refactor for v3 #1095

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

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/961
Author: @HighnessAtharva
Created: 4/8/2023
Status: Merged
Merged: 1/16/2025
Merged by: @stephanebruckert

Base: v3_rebase_rebaseHead: v3


📝 Commits (10+)

  • f3d1192 Update changelog and setup to v3
  • f7ae328 Fixed audio_features API wrapper function return structure (#653)
  • 07fec53 V3 (#665)
  • 4fe6350 Sync branches (#667)
  • 0b6ede6 Added MemoryCacheHandler, a cache handler that simply stores the token info in memory as an instance attribute of this class.
  • bc7343c Fixed a bug in CacheFileHandler.__init__: The documentation says that the username will be retrieved from the environment, but it wasn't.
  • aa9652f Merge branch 'v3' into master
  • b6c3961 Merge pull request #1 from Peter-Schorn/master
  • bd80181 Renamed the auth parameter of Spotify.__init__ to access_token for better clarity.
  • 8973fc2 Fixed lint issues

📊 Changes

28 files changed (+335 additions, -330 deletions)

View changed files

📝 CHANGELOG.md (+54 -45)
📝 CONTRIBUTING.md (+8 -9)
📝 README.md (+7 -5)
📝 TUTORIAL.md (+17 -6)
📝 docs/conf.py (+1 -1)
📝 docs/index.rst (+1 -1)
📝 docs/requirements.txt (+1 -1)
📝 examples/app.py (+1 -3)
📝 examples/artist_albums.py (+2 -5)
📝 examples/artist_discography.py (+2 -5)
📝 examples/artist_recommendations.py (+2 -5)
examples/playlist_add_items.py (+12 -0)
📝 examples/playlist_all_non_local_tracks.py (+1 -2)
📝 examples/remove_specific_tracks_from_playlist.py (+1 -2)
📝 examples/search.py (+1 -5)
📝 examples/show_featured_playlists.py (+1 -4)
📝 examples/show_new_releases.py (+1 -4)
📝 examples/show_related.py (+2 -6)
📝 examples/show_user.py (+1 -5)
📝 examples/simple_search_artist_image_url.py (+2 -6)

...and 8 more files

📄 Description

workerB
Implemented suggestions for #652. Handles all proposed changes in #960
Most of these changes include:-

  • Using if expressions than if conditions list comprehensions instead of a for loop for smaller logical blocks.
  • Usage of f-strings ( I saw that the env supports 3.4 but f-strings have been added from Python 3.6). So should I refactor this?
  • Simplifying if/else code blocks to be more concise.
  • Merge nested conditional clauses.

🔄 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/961 **Author:** [@HighnessAtharva](https://github.com/HighnessAtharva) **Created:** 4/8/2023 **Status:** ✅ Merged **Merged:** 1/16/2025 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `v3_rebase_rebase` ← **Head:** `v3` --- ### 📝 Commits (10+) - [`f3d1192`](https://github.com/spotipy-dev/spotipy/commit/f3d1192c38399f1e76ed8043b70cce0447b36f1a) Update changelog and setup to v3 - [`f7ae328`](https://github.com/spotipy-dev/spotipy/commit/f7ae3285018b8cdf6733e059c3f9cb3656195b16) Fixed audio_features API wrapper function return structure (#653) - [`07fec53`](https://github.com/spotipy-dev/spotipy/commit/07fec53288bd097576637d922865b3900e703952) V3 (#665) - [`4fe6350`](https://github.com/spotipy-dev/spotipy/commit/4fe6350cb4f29a78dada9edba123640f17c8cb36) Sync branches (#667) - [`0b6ede6`](https://github.com/spotipy-dev/spotipy/commit/0b6ede68766f095b97e5d5370cf6bd6b264dc720) Added `MemoryCacheHandler`, a cache handler that simply stores the token info in memory as an instance attribute of this class. - [`bc7343c`](https://github.com/spotipy-dev/spotipy/commit/bc7343c2061ee01e039b80b07ae39609726f962c) Fixed a bug in `CacheFileHandler.__init__`: The documentation says that the username will be retrieved from the environment, but it wasn't. - [`aa9652f`](https://github.com/spotipy-dev/spotipy/commit/aa9652f1fde1c0cd7849e74daa54bc93c5c17575) Merge branch 'v3' into master - [`b6c3961`](https://github.com/spotipy-dev/spotipy/commit/b6c3961d5f4438a67d74bf6d340736f92af643f4) Merge pull request #1 from Peter-Schorn/master - [`bd80181`](https://github.com/spotipy-dev/spotipy/commit/bd80181816ed7a2cd85730d95b6664a974e228db) Renamed the `auth` parameter of `Spotify.__init__` to `access_token` for better clarity. - [`8973fc2`](https://github.com/spotipy-dev/spotipy/commit/8973fc2e15a61162b286ade89cd3be17c9181958) Fixed lint issues ### 📊 Changes **28 files changed** (+335 additions, -330 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+54 -45) 📝 `CONTRIBUTING.md` (+8 -9) 📝 `README.md` (+7 -5) 📝 `TUTORIAL.md` (+17 -6) 📝 `docs/conf.py` (+1 -1) 📝 `docs/index.rst` (+1 -1) 📝 `docs/requirements.txt` (+1 -1) 📝 `examples/app.py` (+1 -3) 📝 `examples/artist_albums.py` (+2 -5) 📝 `examples/artist_discography.py` (+2 -5) 📝 `examples/artist_recommendations.py` (+2 -5) ➕ `examples/playlist_add_items.py` (+12 -0) 📝 `examples/playlist_all_non_local_tracks.py` (+1 -2) 📝 `examples/remove_specific_tracks_from_playlist.py` (+1 -2) 📝 `examples/search.py` (+1 -5) 📝 `examples/show_featured_playlists.py` (+1 -4) 📝 `examples/show_new_releases.py` (+1 -4) 📝 `examples/show_related.py` (+2 -6) 📝 `examples/show_user.py` (+1 -5) 📝 `examples/simple_search_artist_image_url.py` (+2 -6) _...and 8 more files_ </details> ### 📄 Description [![workerB](https://img.shields.io/endpoint?url=https%3A%2F%2Fworkerb.linearb.io%2Fv2%2Fbadge%2Fprivate%2FU2FsdGVkX19oW55oMhosH4KXU8N5OKL1WD5xSZ862o%2Fcollaboration.svg%3FcacheSeconds%3D60)](https://workerb.linearb.io/v2/badge/collaboration-page?magicLinkId=StsYWde) Implemented suggestions for #652. Handles all proposed changes in #960 Most of these changes include:- - Using if expressions than if conditions list comprehensions instead of a for loop for smaller logical blocks. - Usage of f-strings ( I saw that the env supports 3.4 but f-strings have been added from Python 3.6). So should I refactor this? - Simplifying if/else code blocks to be more concise. - Merge nested conditional clauses. --- <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:35 +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#1095
No description provided.