r/Python • u/zurtex • Jun 19 '21
Discussion Is it time to move on from requests?
This is a genuine question in which I don't have enough context to know the answer. And I want to say requests has been one of the pillars of Python during it's phenomenal growth that allowed Python to keep going. And if the maintainers are burnt out they should happily take a break and be congratulated for that they did.
Requests is in feature freeze right now and that's fine for many mature libraries you don't want to be breaking things for users and dealing with endless support queries.
But that said I found it surprising when an issue came up with one of the tools I use called Airflow which is maintained under the Apache project and therefore has strict legal requirements on their dependency chain. One of requests dependencies did not meet this and therefore blocked many Apache projects so a pull request was made: https://github.com/psf/requests/pull/5797
You can read the full conversation yourself, but in summary the response took awhile to get to the point of being constructive but eventually was. After lots of back and forth and improvements to the new optional dependency and the code in the pull request everything looked good. But that was 3 weeks ago and there has been no response from the requests maintainers.
During this discussion it became clear to me that requests is more than in feature freeze, any pull request is being treated with suspicion. The maintainers say that they are waiting for urlib3 2.0 to be released until further improvements but as best as I can tell that has been in limbo for years.
However the world of HTTP requests has not stood still, there is SPDY, QUIC, and their formal specifications of HTTP 2.0 and 3.0. And neither has Python, lots of IO based libraries are now expected to provide some form of async API even if it's not the main API.
I know a call was put out for funding a requests 2.0 but it seems to me that there should be another call put out to the many rich corporations that now make lots of money of the Python ecosystem that requests is now stalled. And either needs new project management or to be forked or for competing libraries to be invested in.
I personally am going to start trying other libraries such as httpx when I start a new project. And hopefully overtime we can stop pinning the whole Python ecosystem on one very under-resourced library that the maintainers have been heroically keeping updated.
Thoughts? Am I over reacting? Do you have more information or context?
8
u/mikeupsidedown Jun 19 '21
This is a pretty interesting and at times disappointing PR from both sides.
At one point the decision was made to not make requests part of the standard library because it allowed the maintainers or requests to adapt to pr's much more quickly.
Is it time to move from requests? I would say that just because Airflow has some strict requirements place on it by the ASF doesn't mean other developers will be rushing to replace a tried and true library.
That said HTTPX is meant to be drop in place for Requests so if you feel the inclination to change out requests in a project it should be doable.
7
u/kylotan Jun 19 '21 edited Jun 20 '21
Personally I think it's a bit shitty that there's such a push to replace LGPL licences, which guarantee a degree of software freedom and sharing of value, with MIT-style ones, which allow corporations to enjoy the work of volunteers without having to give anything back. When you say "there should be another call put out to the many rich corporations that now make lots of money of the Python ecosystem" perhaps the first thing we do is not just mindlessly capitulate to the licences that enable precisely that one-way extraction of value?
I also think it's pretty shitty attitude that someone might file a PR and when it isn't accepted quickly enough, start suggesting that the package should be turned over to someone else. It's this weird entitlement to other people's work that I find distasteful.
5
u/james_pic Jun 19 '21
Whatever comes after Requests, it needs to find its way into the standard library. Too much of the async ecosystem is "batteries not included", and it's leading to balkanisation. Putting a good option in the standard library is a good way to head this off.
3
u/lisploli Jun 19 '21
No. Neither stability nor lgpl licensed code is a reason for me to use another library. Quite the opposite, actually.
0
u/VOIPConsultant Jun 19 '21
!RemindMe 3 days
0
u/[deleted] Jun 19 '21
[deleted] — view deleted comment