[PR #664] [CLOSED] replace Requests http client by Niquests #696

Closed
opened 2026-02-27 23:02:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/664
Author: @Ousret
Created: 10/15/2024
Status: Closed

Base: mainHead: feat-niquests


📝 Commits (7)

  • d811951 replace Requests http client by Niquests
  • e42c521 don't use a HTTP headers storage class for auth settings
  • f763319 fix mypy lint errors
  • a899d8f fix input_dict inline creation
  • 1e2c07f raise exception if body can't be decoded (unlikely)
  • 22d3c41 force CI reboot
  • ab4dcdf force CI reboot with transitive deps update

📊 Changes

13 files changed (+633 additions, -332 deletions)

View changed files

📝 .github/workflows/lint.yml (+2 -1)
📝 pdm.lock (+590 -303)
📝 pyproject.toml (+1 -2)
📝 tests/auth/test_oauth.py (+3 -3)
📝 tests/mixins/test_uploads.py (+1 -1)
📝 ytmusicapi/auth/browser.py (+1 -1)
📝 ytmusicapi/auth/oauth/credentials.py (+1 -1)
📝 ytmusicapi/auth/oauth/token.py (+2 -3)
📝 ytmusicapi/mixins/_protocol.py (+1 -1)
📝 ytmusicapi/mixins/browsing.py (+13 -1)
📝 ytmusicapi/mixins/uploads.py (+2 -2)
📝 ytmusicapi/setup.py (+1 -1)
📝 ytmusicapi/ytmusic.py (+15 -12)

📄 Description

This PR effectively replace the http client Requests for Niquests.
Niquests is a drop-in replacement for Requests that is no longer under feature freeze.

This new client support HTTP/2, and HTTP/3 by default and offers both sync and async interfaces. It supports all the latest shiny features you would expect from an http client.

If you were interested on merging, I will be interested to propose a followup PR that will propose a script that generate
the async part of ytmusicapi automatically. If you want to.

disclaimer: I maintain Niquests.


🔄 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/sigma67/ytmusicapi/pull/664 **Author:** [@Ousret](https://github.com/Ousret) **Created:** 10/15/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat-niquests` --- ### 📝 Commits (7) - [`d811951`](https://github.com/sigma67/ytmusicapi/commit/d81195100b40306c430f2273c30679eeb4cfdad0) replace Requests http client by Niquests - [`e42c521`](https://github.com/sigma67/ytmusicapi/commit/e42c52148c7a602e2189d127d7e61dba153575a0) don't use a HTTP headers storage class for auth settings - [`f763319`](https://github.com/sigma67/ytmusicapi/commit/f763319b4fdba535baf4d21e6c6be65da649b45a) fix mypy lint errors - [`a899d8f`](https://github.com/sigma67/ytmusicapi/commit/a899d8f260b9eac404de0cd6333bf40b8ea523ec) fix input_dict inline creation - [`1e2c07f`](https://github.com/sigma67/ytmusicapi/commit/1e2c07f55e399986aafd42e972b49fe1c414008c) raise exception if body can't be decoded (unlikely) - [`22d3c41`](https://github.com/sigma67/ytmusicapi/commit/22d3c41ab0aca7408e15cf454cc8583dc235cfc6) force CI reboot - [`ab4dcdf`](https://github.com/sigma67/ytmusicapi/commit/ab4dcdf14e000f52b5e30599280ae9a2ad5c9586) force CI reboot with transitive deps update ### 📊 Changes **13 files changed** (+633 additions, -332 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/lint.yml` (+2 -1) 📝 `pdm.lock` (+590 -303) 📝 `pyproject.toml` (+1 -2) 📝 `tests/auth/test_oauth.py` (+3 -3) 📝 `tests/mixins/test_uploads.py` (+1 -1) 📝 `ytmusicapi/auth/browser.py` (+1 -1) 📝 `ytmusicapi/auth/oauth/credentials.py` (+1 -1) 📝 `ytmusicapi/auth/oauth/token.py` (+2 -3) 📝 `ytmusicapi/mixins/_protocol.py` (+1 -1) 📝 `ytmusicapi/mixins/browsing.py` (+13 -1) 📝 `ytmusicapi/mixins/uploads.py` (+2 -2) 📝 `ytmusicapi/setup.py` (+1 -1) 📝 `ytmusicapi/ytmusic.py` (+15 -12) </details> ### 📄 Description This PR effectively replace the http client Requests for [Niquests](https://github.com/jawah/niquests). Niquests is a drop-in replacement for Requests that is no longer under feature freeze. This new client support HTTP/2, and HTTP/3 by default and offers both sync and async interfaces. It supports all the latest shiny features you would expect from an http client. If you were interested on merging, I will be interested to propose a followup PR that will propose a script that generate the async part of ytmusicapi automatically. If you want to. *disclaimer:* _I maintain Niquests._ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 23:02:02 +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/ytmusicapi#696
No description provided.