[PR #1220] Add type hinting to function args; remove support for deprecated versions 3.8 and 3.9 #1219

Open
opened 2026-02-28 00:04:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/1220
Author: @bvandercar-vt
Created: 12/2/2025
Status: 🔄 Open

Base: masterHead: feat/arg-types


📝 Commits (10+)

📊 Changes

11 files changed (+491 additions, -329 deletions)

View changed files

📝 .github/workflows/integration_tests.yml (+1 -1)
📝 .github/workflows/unit_tests.yml (+1 -1)
📝 CHANGELOG.md (+2 -0)
📝 setup.py (+1 -1)
📝 spotipy/cache_handler.py (+20 -16)
📝 spotipy/client.py (+319 -192)
📝 spotipy/exceptions.py (+10 -2)
📝 spotipy/oauth2.py (+107 -95)
📝 spotipy/util.py (+24 -18)
📝 tests/helpers.py (+5 -2)
📝 tests/unit/test_oauth.py (+1 -1)

📄 Description


🔄 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/1220 **Author:** [@bvandercar-vt](https://github.com/bvandercar-vt) **Created:** 12/2/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `feat/arg-types` --- ### 📝 Commits (10+) - [`efc3474`](https://github.com/spotipy-dev/spotipy/commit/efc3474e27323854315662f6c7820ad65fe3615a) feat: add types to args - [`7f91c16`](https://github.com/spotipy-dev/spotipy/commit/7f91c162667feec9b1a46bd2ee0b8fdfd0997a2b) style: whitespace - [`3bbafe9`](https://github.com/spotipy-dev/spotipy/commit/3bbafe9fd3e77335b0d2f24a302c21defc31ae25) fix: whitespace - [`89f7c73`](https://github.com/spotipy-dev/spotipy/commit/89f7c731bc5e4e6a3e06f036dd689c62d12006a8) changelog - [`0a797b5`](https://github.com/spotipy-dev/spotipy/commit/0a797b5cad8df79dbc13283510aed34dfd9c7f7d) fix import order - [`4328005`](https://github.com/spotipy-dev/spotipy/commit/4328005af8d72fc3d602199e8b4edba437ae690a) token_info dict type - [`1a5b638`](https://github.com/spotipy-dev/spotipy/commit/1a5b638a9bdb59ba22b74ffc8d5cfd5bbe7e1962) add typeddicts - [`badadd5`](https://github.com/spotipy-dev/spotipy/commit/badadd5c20a64526228f0e0ea34eb9ba62a891de) add back accidental deleted line - [`58e8527`](https://github.com/spotipy-dev/spotipy/commit/58e8527d0321dea7651e57a4582eb38dc1e788f0) add type - [`942ddf7`](https://github.com/spotipy-dev/spotipy/commit/942ddf7a3c2dc5962a5541af700fc9c686bd4d50) simple return type ### 📊 Changes **11 files changed** (+491 additions, -329 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/integration_tests.yml` (+1 -1) 📝 `.github/workflows/unit_tests.yml` (+1 -1) 📝 `CHANGELOG.md` (+2 -0) 📝 `setup.py` (+1 -1) 📝 `spotipy/cache_handler.py` (+20 -16) 📝 `spotipy/client.py` (+319 -192) 📝 `spotipy/exceptions.py` (+10 -2) 📝 `spotipy/oauth2.py` (+107 -95) 📝 `spotipy/util.py` (+24 -18) 📝 `tests/helpers.py` (+5 -2) 📝 `tests/unit/test_oauth.py` (+1 -1) </details> ### 📄 Description - Add Python types to function args. Typing is always better as it can catch errors before a script is ran. - Remove support for 3.8 and 3.9, as these are now deprecated. Allows us to use pipes in types (ie `str | None` instead of `Optional[str]` - Integration tests passing: https://github.com/bvandercar-vt/spotipy/actions/workflows/integration_tests.yml --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1219
No description provided.