-
Notifications
You must be signed in to change notification settings - Fork 336
Make hiredis an optional(extra) requirement #663
Comments
Your containers use case sounds reasonable, I will consider this. |
Thanks. Just let me know what you think. :) |
I guess hiredis should be opt-out, not opt-in (sorry for the reverse in the unedited version of the comment). See corresponding |
Thanks, Andrew, I have forgotten this trick. Will look into this. |
@asvetlov You mean hiredis should be opt-out, not opt-in(seems flipped), so the current behavior is the preferred way. Did I understand you correctly? I found those |
Sorry for flipping, I did mean that hiredis is opt-out. Let's go to the roots: why do you want to skip |
Nope, I completely agree with your opinion, faster implementation should be preferred most of the time. But in some cases, pure python parser would be just enough. I want to have hiredis as an opt-in in my container use case, because installing Here's the comparison table:
FROM python:3.8-alpine
RUN apk add --update build-base So just to build hiredis wheel, I get >150MB bigger image. To disable building hiredis, I have to deal with workarounds since pip doesn't have an option to skip dependency installation in
Instead of:
in my Additionally, here's how |
I understand your need, alpine linux is a problem for C Extensions building. Perhaps you are confused by Previously, if aiohttp was unable to get the compilation toolset it falls to pure-python version without speedups silently. This doesn't work well: people get the aiohttp slowdown without any notice. |
Yes, I misunderstood the meaning of I get your point here, closing this issue. I'll keep looking forward to changes in pip. |
I know that there were already some discussions about it in #197, #317 and #394.
But please take a look at pypa/pip#7339. Because aioredis has forced hiredis dependency, I should rely on workaround methods.
If aioredis had hiredis as an optional(extra) requirement, then my requirements.txt would be like this:
and others who want better performance, would write their requirements.txt like this:
I think it's very clear solution, and is already adopted by another aio-libs family, aiohttp.
Make hiredis an optional requirement, and recommend to use
pip install aioredis[hiredis]
for users who want speedups, how do you think about it?The text was updated successfully, but these errors were encountered: