pkkid / python-plexapi

Python bindings for the Plex API.
BSD 3-Clause "New" or "Revised" License
1.15k stars 199 forks source link

replace http client Requests to compatible Niquests #1471

Open Ousret opened 1 month ago

Ousret commented 1 month ago

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 thrilled to propose a followup PR that will propose a script that generate the async part of plex-client automatically.

This PR is a low footprint change. I did not change the "alert" part, based on WS, because there's something we can't support: "reusing existing socket instance". Would it be a breaking change according to you?

disclaimer: I maintain Niquests.

Type of change

Please delete options that are not relevant.

Checklist:

glensc commented 4 weeks ago

The http2/http3 is not use for plex media servers (support only http11), but async functions could have improvement to parallelism. can't comment plex.tv requests, haven't checked what they support.