Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace requests with niquests or httpx? #457

Open
tobixen opened this issue Nov 24, 2024 · 1 comment
Open

Replace requests with niquests or httpx? #457

tobixen opened this issue Nov 24, 2024 · 1 comment

Comments

@tobixen
Copy link
Member

tobixen commented Nov 24, 2024

@ArtemIsmagilov suggested to replace the requests library with niquests in #455, and raised my awareness that the requests library is likely at a dead end. I'm a bit wary of changes here, for two reasons:

  • The authorization part is very fragile due to weird server setups - several time I've been doing minor changes here, and long time after it has been released as part of HomeAssistant, and people start complaining.
  • Due to recent supply-chain attacks I'm wary of adding new dependencies. So far the niquests package is maintained by one maintainer and has gotten relatively few eyeballs.

So I've decided that this change will be merged into the master branch, but only be released officially in version 2.0 of the library. I assume there will be at least a 1.5-release before that still based on requests.

Then @sim0nx suggested using httpx rather than niquests, as this package has been around for a while, has more maintainers and basically has the same feature set.

I raise this issue to allow people to drop thoughts on this.

(as for the requests library, the 2.x-version line has been in a feature freeze for ages, 3.0-version is long overdue. I also found that the project owner has received a significant amount of fundraised money to get 3.0 done. It may seem like the money has been spent without significant visible progress on getting 3.0 released. Among the things needed is a possibility for doing things async, support for HTTP/2 and various other things. I also think the authentication code belongs to the requests-library and not in the CalDAV library)

@tobixen
Copy link
Member Author

tobixen commented Nov 27, 2024

I have an impression that HomeAssistant is one of the main drivers of end users to the caldav project. They already have httpx and aiohttp (and requests) in the dependency list, but not niquests. To get upgrades smoothly into the homeassistant project I suppose httpx is preferred. I suppose all the code has to be rewritten to be async to be able to use aiohttp, while with httpx (and niquests) it will be possible to develop the library so that users can use it both in a synchronous and asynchronous manner. I suppose. Haven't looked much into it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant